3.1.4.2. c3po.mpi.MPICollaborativeDataManager module

Inheritance diagram of c3po.mpi.MPICollaborativeDataManager

Contain the class MPICollaborativeDataManager.

class c3po.mpi.MPICollaborativeDataManager.MPICollaborativeDataManager(dataManagers, mpiComm=None)

Bases: CollaborativeDataManager

MPICollaborativeDataManager is the MPI collaborative version of c3po.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 MPIRemote is present, MPICollaborativeDataManager uses 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 MPICollaborativeDataManager object.

Has the same form than CollaborativeDataManager.__init__() but can also contain MPIRemote objects.

When at least one MPIRemote is present (or if mpiComm is not None), MPICollaborativeDataManager uses 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:
cloneEmpty()

Return a clone of self without copying the data.

Returns:

An empty clone of self.

Return type:

MPICollaborativeDataManager

dot(other)

Return the scalar product of self with other.

Parameters:

other (MPICollaborativeDataManager) – A MPICollaborativeDataManager consistent with self.

Return type:

The scalar product of self with other.

Raises:

Exception – If self and other are not consistent.

norm2()

Return the norm 2.

Return type:

sqrt(sum_i(val[i] * val[i])) where val[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.