schrodinger.utils.openmpi module

Provide functions for integration with OpenMPI.

class schrodinger.utils.openmpi.EnvVar

Bases: StrEnum

LD_LIBRARY_PATH = 'LD_LIBRARY_PATH'
OPAL_PREFIX = 'OPAL_PREFIX'
PATH = 'PATH'
SCHRODINGER_OPENMPI = 'SCHRODINGER_OPENMPI'
schrodinger.utils.openmpi.get_openmpi_prefix() Path

Return the Open MPI installation prefix directory (OPAL_PREFIX).

The prefix is determined by checking the SCHRODINGER_OPENMPI environment variable first. If it is not set, defaults to the bundled Open MPI installation in our suite.

Returns:

path to the Open MPI base directory (OPAL_PREFIX)

schrodinger.utils.openmpi.get_openmpi_env() Dict[str, str]

Get environment variables needed to configure for Open MPI execution.

Returns:

dictionary containing needed Open MPI environment variables. This needs to be merged with global environment before launching MPI jobs.