3.1.4.2. c3po.mpi.MPICollaborativeDataManager module
Contain the class MPICollaborativeDataManager.
- class c3po.mpi.MPICollaborativeDataManager.MPICollaborativeDataManager(dataManagers, mpiComm=None)
Bases:
CollaborativeDataManagerMPICollaborativeDataManageris the MPI collaborative version ofc3po.CollaborativeDataManager.CollaborativeDataManager(for collaborative MPI paradigm).It allows to handle a set of
c3po.DataManager.DataManager(some of then being remote) as a single one. Thanks to this class, data can be distributed on different MPI processes but still used in the same way.When at least one
MPIRemoteis present,MPICollaborativeDataManageruses collective MPI communications: the object must be built and used in the same way for all the involved processes. They must all share the same communicator, and all the processes of that communicator must be involved.- __init__(dataManagers, mpiComm=None)
Build a
MPICollaborativeDataManagerobject.Has the same form than
CollaborativeDataManager.__init__()but can also containMPIRemoteobjects.When at least one
MPIRemoteis present (or ifmpiCommis not None),MPICollaborativeDataManageruses collective MPI communications: the object must be built and used in the same way for all the involved processes. They must all share the same communicator, and all the processes of that communicator must be involved.- Parameters:
dataManagers (list[DataManager]) – A list of
c3po.DataManager.DataManager.mpiComm – If not None, forces
MPICollaborativeDataManagerto use collective MPI communications and to use this communicator.
- cloneEmpty()
Return a clone of
selfwithout copying the data.- Returns:
An empty clone of
self.- Return type:
- dot(other)
Return the scalar product of
selfwithother.- Parameters:
other (MPICollaborativeDataManager) – A
MPICollaborativeDataManagerconsistent withself.- Return type:
The scalar product of
selfwithother.- Raises:
Exception – If
selfandotherare not consistent.
- norm2()
Return the norm 2.
- Return type:
sqrt(sum_i(val[i] * val[i]))whereval[i]stands for each scalar and each component of the MED fields.
- normMax()
Return the infinite norm.
- Return type:
The max of the absolute values of the scalars and of the infinite norms of the MED fields.