mpi_wrap.py

A bunch of MPI utilities.

class openmdao.core.mpi_wrap.FakeComm[source]

Bases: object

Who needs a real Comm when you have a fake one.

openmdao.core.mpi_wrap.MultiProcFailCheck(*args, **kwds)[source]

Wrap this around code that you want to globally fail if it fails on any MPI process in MPI_WORLD. If not running under MPI, don’t handle any exceptions.

openmdao.core.mpi_wrap.debug(*msg)[source]
openmdao.core.mpi_wrap.under_mpirun()[source]

Return True if we’re being executed under mpirun.

openmdao.core.mpi_wrap.use_proc_files()[source]

Calling this will cause stdout/stderr from each MPI process to be written to a separate file in the current directory named <rank>.out.