mpi
MPI-based Parallelization Layer for OM.
This module contains a Parallelization Layer based on the MPI protocol.
MpiParallelization
Bases: OmParallelizationProtocol
See documentation of the __init__
function.
__init__(*, data_retrieval_layer, processing_layer, monitor_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:
Name | Type | Description | Default |
---|---|---|---|
data_retrieval_layer |
OmDataRetrievalProtocol
|
A class defining how data and data events are retrieved and handled. |
required |
processing_layer |
OmProcessingProtocol
|
A class defining how retrieved data is processed. |
required |
monitor_parameters |
MonitorParameters
|
An object storing OM's configuration parameters. |
required |
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.
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:
Name | Type | Description | Default |
---|---|---|---|
msg |
str
|
Reason for shutting down. Defaults to "Reason not provided". |
'Reason not provided.'
|