mpi#

MPI-based Parallelization Layer for OM.

This module contains a Parallelization Layer based on the MPI protocol.

class MpiTags(*values)#
die = 999#
dead = 1000#
data = 1001#
feedback = 1002#
class MpiParallelization(*, data_retrieval_layer, processing_layer, parameters)#

MPI-based Parallelization Layer for OM.

This class implements a Parallelization Layer based on the MPI protocol. The nodes communicate with each other using an implementation of the MPI protocol supported by the Python language (OpenMPI or MPICH).

This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.

Parameters:
start()#

Starts the MPI parallelization.

This function sets up the communication between OM’s collecting and processing nodes using the MPI protocol. The function starts the nodes and manages all of their interactions, organizing the receiving and dispatching of data and control commands over MPI channels.

Please see the documentation of the base Protocol class for additional information about this method.

Return type:

None

shutdown(*, msg='Reason not provided.')#

Shuts down the MPI parallelization.

This function stops OM, closing all the communication channels between the nodes and managing a controlled shutdown of OM’s resources. Additionally, it terminates the MPI processes in an orderly fashion.

Please see the documentation of the base Protocol class for additional information about this method.

Parameters:

msg (str) – Reason for shutting down. Defaults to “Reason not provided”.

Return type:

None