TopFarm MPI documentation
Hi All,
Fist all thank you for this project, it is some great work.
We are looking at optimizing some substantial wind farms and therefore we will need the ability to run Topfarm with mpi. There is nothing in the documentation around running Topfarm with MPI, but after some digging through the code it would seem that all the mpi references are passed straight through to openmdao with off course relies on petsc.
Therefore in an attempt to get Topfarm running with mpi i compiled petsc4py with mpi-support and I changed the standard optimization example to the following:
start = datetime.now()
state = optimize_iea37_locs(36,16, EasySimpleGADriver(run_parallel=True) )
end = datetime.now()
duration = end-start
print(f'Optimization took {duration} seconds')
Then running the script with mpi (mpirun -np 5 python3 mpiTest.py -parallel) produces 5 prints:
Optimization took 0:02:02.763891 seconds
Optimization took 0:02:08.836114 seconds
Optimization took 0:02:13.858876 seconds
Optimization took 0:02:24.279714 seconds
Optimization took 0:02:30.471063 seconds
This suggests that mpi is running 5 instances of the script instead of 1 parallel instance. Does anyone have any pointers on how to get it to run the optimization in parallel?
Regards, Hilbert