simsopt.util package¶
Submodules¶
simsopt.util.mpi module¶
This module contains the MpiPartition class.
This module should be completely self-contained, depending only on mpi4py and numpy, not on any other simsopt components.
-
class
simsopt.util.mpi.
MpiPartition
(ngroups=None, comm_world=mpi4py.MPI.COMM_WORLD)¶ Bases:
object
This module contains functions related to dividing up the set of MPI processors into groups, each of which can work together.
-
apart
(leaders_action, workers_action)¶ Send workers and group leaders off to their respective loops to wait for instructions from their group leader or proc0_world, respectively.
-
leaders_loop
(action)¶ actions should be a dict where the keys are possible integer constants, and the values are callable functions that are called when the corresponding key is sent from mobilize_leaders.
-
mobilize_leaders
(action_const)¶
-
mobilize_workers
(action_const)¶
-
stop_leaders
()¶
-
stop_workers
()¶
-
together
()¶ Bring workers and group leaders back from their respective loops.
-
worker_loop
(action)¶ actions should be a dict where the keys are possible integer constants, and the values are callable functions that are called when the corresponding key is sent from mobilize_workers.
-
write
()¶ Dump info about the MPI configuration
-
-
simsopt.util.mpi.
log
(level=20)¶ Turn on logging. If MPI is available, the processor number will be added to all logging entries.