MPI Resources Module

Manages libensemble resources related to MPI tasks launched from nodes.

exception mpi_resources.MPIResourcesException

Resources module exception.

mpi_resources.create_machinefile(resources, machinefile=None, num_procs=None, num_nodes=None, procs_per_node=None, hyperthreads=False)

Creates a machinefile based on user-supplied config options, completed by detected machine resources

mpi_resources.get_MPI_runner()

Return whether mpirun is openmpi or mpich

mpi_resources.get_MPI_variant()

Returns MPI base implementation

Returns

mpi_variant – MPI variant ‘aprun’ or ‘jsrun’ or ‘mpich’ or ‘openmpi’ or ‘srun’

Return type

string:

mpi_resources.get_hostlist(resources, num_nodes=None)

Creates a hostlist based on user-supplied config options.

completed by detected machine resources

mpi_resources.get_resources(resources, num_procs=None, num_nodes=None, procs_per_node=None, hyperthreads=False)

Reconciles user-supplied options with available worker resources to produce run configuration.

Detects resources available to worker, checks whether an existing user-supplied config is valid, and fills in any missing config information (i.e., num_procs/num_nodes/procs_per_node)

User-supplied config options are honored, and an exception is raised if these are infeasible.

mpi_resources.task_partition(num_procs, num_nodes, procs_per_node, machinefile=None)

Takes provided nprocs/nodes/ranks and outputs working configuration of procs/nodes/ranks or error