Public Member Functions | |
bool | containsMyRank () const |
ProcessorGroup * | createComplementProcGroup () const |
ProcessorGroup * | createProcGroup () const |
virtual MPIProcessorGroup * | deepCopy () const |
virtual ProcessorGroup * | fuse (const ProcessorGroup &) const |
const MPI_Comm * | getComm () const |
MPI_Comm | getWorldComm () |
void | intersect (ProcessorGroup &) |
MPIProcessorGroup (const CommInterface &interface) | |
MPIProcessorGroup (const CommInterface &interface, std::set< int > proc_ids, const MPI_Comm &world_comm=MPI_COMM_WORLD) | |
MPIProcessorGroup (const ProcessorGroup &proc_group, std::set< int > proc_ids) | |
MPIProcessorGroup (const CommInterface &interface, int pstart, int pend, const MPI_Comm &world_comm=MPI_COMM_WORLD) | |
MPIProcessorGroup (const MPIProcessorGroup &other) | |
int | myRank () const |
int | translateRank (const ProcessorGroup *group, int rank) const |
virtual | ~MPIProcessorGroup () |
Public Member Functions inherited from MEDCoupling::ProcessorGroup | |
bool | contains (int rank) const |
const CommInterface & | getCommInterface () const |
virtual const std::set< int > & | getProcIDs () const |
ProcessorGroup (const CommInterface &interface) | |
ProcessorGroup (const CommInterface &interface, std::set< int > proc_ids) | |
ProcessorGroup (const ProcessorGroup &proc_group, std::set< int > proc_ids) | |
ProcessorGroup (const ProcessorGroup &other) | |
ProcessorGroup (const CommInterface &interface, int start, int end) | |
int | size () const |
virtual | ~ProcessorGroup () |
Additional Inherited Members | |
Protected Attributes inherited from MEDCoupling::ProcessorGroup | |
const CommInterface | _comm_interface |
std::set< int > | _proc_ids |
The MPIProcessorGroup class represents a set of distinct "processors" (computation nodes) in a MPI code. It is used to define the MPI topology of code couplings.
Groups can be set up in various ways, the most common being the use of the MPIProcessorGroup(Comminterface, int pfirst, int plast)
constructor.
The following code excerpt creates two processor groups on respectively 3 and 2 processors.
int main() { MPI_Init(&argc,&argv); CommInterface comm_interface; MPIProcessorGroup codeA_group(comm_interface, 0, 2); // groups processors 0, 1 and 2 MPIProcessorGroup codeB_group(comm_interface, 3, 4); // groups processors 3 and 4 ... }
MEDCoupling::MPIProcessorGroup::MPIProcessorGroup | ( | const CommInterface & | interface | ) |
Creates a processor group that is based on all the processors of MPI_COMM_WORLD .This routine must be called by all processors in MPI_COMM_WORLD.
interface | CommInterface object giving access to the MPI communication layer |
References MEDCoupling::ProcessorGroup::_comm_interface, MEDCoupling::ProcessorGroup::_proc_ids, MEDCoupling::CommInterface::commGroup(), MEDCoupling::CommInterface::commSize(), and MEDCoupling::ProcessorGroup::size().
Referenced by createComplementProcGroup(), createProcGroup(), deepCopy(), and fuse().
MEDCoupling::MPIProcessorGroup::MPIProcessorGroup | ( | const CommInterface & | interface, |
std::set< int > | proc_ids, | ||
const MPI_Comm & | world_comm = MPI_COMM_WORLD |
||
) |
MEDCoupling::MPIProcessorGroup::MPIProcessorGroup | ( | const ProcessorGroup & | proc_group, |
std::set< int > | proc_ids | ||
) |
MEDCoupling::MPIProcessorGroup::MPIProcessorGroup | ( | const CommInterface & | comm_interface, |
int | pstart, | ||
int | pend, | ||
const MPI_Comm & | world_comm = MPI_COMM_WORLD |
||
) |
Creates a processor group that is based on the processors between pstart and pend. This routine must be called by all processors in MPI_COMM_WORLD.
comm_interface | CommInterface object giving access to the MPI communication layer |
pstart | id in MPI_COMM_WORLD of the first processor in the group |
pend | id in MPI_COMM_WORLD of the last processor in the group |
References MEDCoupling::ProcessorGroup::_comm_interface, MEDCoupling::CommInterface::commCreate(), MEDCoupling::CommInterface::commGroup(), MEDCoupling::CommInterface::commRank(), MEDCoupling::CommInterface::commSize(), MEDCoupling::CommInterface::groupFree(), and MEDCoupling::CommInterface::groupIncl().
MEDCoupling::MPIProcessorGroup::MPIProcessorGroup | ( | const MPIProcessorGroup & | other | ) |
|
virtual |
|
virtual |
Implements MEDCoupling::ProcessorGroup.
References MPIProcessorGroup().
|
virtual |
Adding processors of group group to local group.
group | group that is to be fused with current group |
Implements MEDCoupling::ProcessorGroup.
References MEDCoupling::ProcessorGroup::_comm_interface, MEDCoupling::ProcessorGroup::_proc_ids, MEDCoupling::ProcessorGroup::getProcIDs(), and MPIProcessorGroup().
|
virtual |
Implements MEDCoupling::ProcessorGroup.
|
virtual |
Implements MEDCoupling::ProcessorGroup.
Referenced by MEDCoupling::ExplicitCoincidentDEC::broadcastTopology().
|
virtual |
Implements MEDCoupling::ProcessorGroup.
|
virtual |
Translation of the rank id between two processor groups. This method translates rank rank on the current processor group to the rank on group pointed by group.
group | group from which the rank is expected |
rank | rank on group group of the processor which is to be translated |
Implements MEDCoupling::ProcessorGroup.
Referenced by MEDCoupling::StructuredCoincidentDEC::prepareSourceDE(), MEDCoupling::StructuredCoincidentDEC::prepareTargetDE(), MEDCoupling::ExplicitCoincidentDEC::prepareTargetDE(), MEDCoupling::StructuredCoincidentDEC::recvData(), MEDCoupling::ExplicitCoincidentDEC::recvData(), MEDCoupling::BlockTopology::serialize(), and MEDCoupling::ExplicitCoincidentDEC::transferMappingToSource().
const MPI_Comm* MEDCoupling::MPIProcessorGroup::getComm | ( | ) | const |
|
virtual |
Creates a processor group that is the complement of the current group inside MPI_COMM_WORLD
Implements MEDCoupling::ProcessorGroup.
References MEDCoupling::ProcessorGroup::_comm_interface, MEDCoupling::ProcessorGroup::_proc_ids, MPIProcessorGroup(), and MEDCoupling::CommInterface::worldSize().
|
virtual |
Implements MEDCoupling::ProcessorGroup.
References MEDCoupling::ProcessorGroup::_comm_interface, MEDCoupling::ProcessorGroup::_proc_ids, and MPIProcessorGroup().
MPI_Comm MEDCoupling::MPIProcessorGroup::getWorldComm | ( | ) |
Referenced by MEDCoupling::DisjointDEC::checkPartitionGroup().