MPI Resources Module

Manages libensemble resources related to MPI tasks launched from nodes.

class mpi_resources.MPIResources(top_level_dir=None, central_mode=False, zero_resource_workers=[], allow_oversubscribe=False, launcher=None, cores_on_node=None, node_file=None, nodelist_env_slurm=None, nodelist_env_cobalt=None, nodelist_env_lsf=None, nodelist_env_lsf_shortform=None)

Bases: libensemble.resources.resources.Resources

Manages resources provided to MPI tasks launched from workers.

static task_partition(num_procs, num_nodes, ranks_per_node, machinefile=None)

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

get_resources(num_procs=None, num_nodes=None, ranks_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/ranks_per_node)

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

create_machinefile(machinefile=None, num_procs=None, num_nodes=None, ranks_per_node=None, hyperthreads=False)

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

get_hostlist(num_nodes=None)

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