3.1.4.7. c3po.mpi.MPIDomainDecompositionDataManager module
Contain the class MPIDomainDecompositionDataManager.
- class c3po.mpi.MPIDomainDecompositionDataManager.MPIDomainDecompositionDataManager(mpiComm)
Bases:
LocalDataManagerMPIDomainDecompositionDataManageris the MPI collaborative version of thec3po.DataManager.DataManagerin which all processes have locally only a part of the data.Can replace, without impact, a
c3po.LocalDataManager.LocalDataManagerfor a calculation on a single process, if the MPI environment is available.MPIDomainDecompositionDataManagerbehaves a little bit like aMPICollaborativeDataManagerbuilt with only oneLocalDataManagerand ampiComm. However, unlikeMPICollaborativeDataManagerwhich will be expanded byMPIExchanger, and therefore seen as a simpleLocalDataManagerin this case,MPIDomainDecompositionDataManagerwill be directly handled byMPIExchanger. This is usually preferable when using ac3po.mpi.mpiExchangeMethods.MPIExchangeMethod.MPIExchangeMethodas exchange method.- __init__(mpiComm)
Build a
MPIDomainDecompositionDataManagerobject.- 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 theMPIDomainDecompositionDataManager).
- 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.
- getLocalView()
Return a new
LocalDataManagerthat holds the same data thanself- Returns:
A
LocalDataManagerthat holds the same data thanself- Return type:
- getMPIComm()
(Optional) Return the MPI communicator used by the code for parallel computations.
- Returns:
mpi4py communicator.
- Return type:
- 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.