0

In order to find a better minimum, I currently create and run multiple instances of openmdao problem with different initial guesses, then select the solution with the best performance. To make this process faster, I currently use Python's multiprocessing module and solve each openmdao problem in a parallel subprocess.

However, as my problem becomes more complex, I would like to parallelize the optimization process too (by using ParallelGroup and/or distributed components), and I'm unsure if mpi will interact with Python's multiprocessing in strange ways. Is there any openmdao features that will handle both parallelism in solving individual problems and multiple problem instances?

pkerichang
  • 60
  • 5

1 Answers1

2

You can run multiple instances of an OpenMDAO problem under MPI (without subprocesses) by splitting the comm and passing a sub-comm to the Problem constructor. See a basic example here:

https://github.com/OpenMDAO/OpenMDAO/blob/master/mpitest/test_mpi.py#L207-237

Your Problem can have ParallelGroup(s) and it will be fine as long as you give it a large enough comm.

swryan
  • 251
  • 1
  • 5
  • I would just add that you should only use Multiprocessing very carefully in combination with MPI. It would be much simpler to switch to a pure MPI based solution. where you manually split the comm and hand the sub-comms down to the problem. But just be careful about how you end up doing recording in that situation. – Justin Gray Nov 04 '15 at 20:11