3.1.4.7. c3po.mpi.MPIDomainDecompositionDataManager module

Inheritance diagram of c3po.mpi.MPIDomainDecompositionDataManager

Contain the class MPIDomainDecompositionDataManager.

class c3po.mpi.MPIDomainDecompositionDataManager.MPIDomainDecompositionDataManager(mpiComm)

Bases: LocalDataManager

MPIDomainDecompositionDataManager is the MPI collaborative version of the c3po.DataManager.DataManager in which all processes have locally only a part of the data.

Can replace, without impact, a c3po.LocalDataManager.LocalDataManager for a calculation on a single process, if the MPI environment is available.

MPIDomainDecompositionDataManager behaves a little bit like a MPICollaborativeDataManager built with only one LocalDataManager and a mpiComm. However, unlike MPICollaborativeDataManager which will be expanded by MPIExchanger, and therefore seen as a simple LocalDataManager in this case, MPIDomainDecompositionDataManager will be directly handled by MPIExchanger. This is usually preferable when using a c3po.mpi.mpiExchangeMethods.MPIExchangeMethod.MPIExchangeMethod as exchange method.

__init__(mpiComm)

Build a MPIDomainDecompositionDataManager object.

Parameters:

mpiComm – MPI communicator. It must be shared by all processes involved in the MPIDomainDecompositionDataManager (and all processes of this MPI communicator must be involed in the MPIDomainDecompositionDataManager).

cloneEmpty()

Return a clone of self without copying the data.

Returns:

An empty clone of self.

Return type:

MPIDomainDecompositionDataManager

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.

getLocalView()

Return a new LocalDataManager that holds the same data than self

Returns:

A LocalDataManager that holds the same data than self

Return type:

LocalDataManager

getMPIComm()

(Optional) Return the MPI communicator used by the code for parallel computations.

Returns:

mpi4py communicator.

Return type:

mpi4py.MPI.Comm

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.