Functions | |
| ParaMEDMEM::MPIProcessorGroup.MPIProcessorGroup (const CommInterface &interface) | |
| ParaMEDMEM::MPIProcessorGroup.MPIProcessorGroup (const CommInterface &interface, std::set< int > proc_ids, const MPI_Comm &world_comm=MPI_COMM_WORLD) | |
| ParaMEDMEM::MPIProcessorGroup.MPIProcessorGroup (const CommInterface &interface, int pstart, int pend, const MPI_Comm &world_comm=MPI_COMM_WORLD) | |
| int | ParaMEDMEM::MPIProcessorGroup.translateRank (const ProcessorGroup *group, int rank) const |
| ProcessorGroup * | ParaMEDMEM::MPIProcessorGroup.createComplementProcGroup () const |
| virtual ProcessorGroup * | ParaMEDMEM::MPIProcessorGroup.fuse (const ProcessorGroup &) const |
| int | ParaMEDMEM::MPIProcessorGroup.myRank () const |
The MPIProcessorGroup class is used to set up processor groups that help to define the MPI topology of the couplings. They 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);
MPIProcessorGroup codeB_group(comm_interface, 3, 4);
...
}
| ParaMEDMEM.MPIProcessorGroup::MPIProcessorGroup | ( | const CommInterface & | interface | ) | [inherited] |
Creates a processor group that is based on all the MPI_COMM_WORLD processor.This routine must be called by all processors in MPI_COMM_WORLD.
| interface | CommInterface object giving access to the MPI communication layer |
References ParaMEDMEM.MPIProcessorGroup._comm, ParaMEDMEM.ProcessorGroup._comm_interface, ParaMEDMEM.MPIProcessorGroup._group, ParaMEDMEM.ProcessorGroup._proc_ids, ParaMEDMEM.MPIProcessorGroup._world_comm, ParaMEDMEM.CommInterface.commGroup(), ParaMEDMEM.CommInterface.commSize(), and ParaMEDMEM.ProcessorGroup.size().
| ParaMEDMEM.MPIProcessorGroup::MPIProcessorGroup | ( | const CommInterface & | interface, |
| std::set< int > | proc_ids, | ||
| const MPI_Comm & | world_comm = MPI_COMM_WORLD |
||
| ) | [inherited] |
Creates a processor group that is based on the processors included in proc_ids. This routine must be called by all processors in MPI_COMM_WORLD.
| interface | CommInterface object giving access to the MPI communication layer |
| proc_ids | set of ids that are to be integrated in the group. The ids number are to be understood in terms of MPI_COMM_WORLD ranks. |
References ParaMEDMEM.MPIProcessorGroup._comm, ParaMEDMEM.ProcessorGroup._comm_interface, ParaMEDMEM.MPIProcessorGroup._group, ParaMEDMEM.MPIProcessorGroup._world_comm, ParaMEDMEM.CommInterface.commCreate(), ParaMEDMEM.CommInterface.commGroup(), ParaMEDMEM.CommInterface.commRank(), ParaMEDMEM.CommInterface.commSize(), and ParaMEDMEM.CommInterface.groupIncl().
| ParaMEDMEM.MPIProcessorGroup::MPIProcessorGroup | ( | const CommInterface & | comm_interface, |
| int | pstart, | ||
| int | pend, | ||
| const MPI_Comm & | world_comm = MPI_COMM_WORLD |
||
| ) | [inherited] |
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 ParaMEDMEM.MPIProcessorGroup._comm, ParaMEDMEM.ProcessorGroup._comm_interface, ParaMEDMEM.MPIProcessorGroup._group, ParaMEDMEM.MPIProcessorGroup._world_comm, ParaMEDMEM.CommInterface.commCreate(), ParaMEDMEM.CommInterface.commGroup(), ParaMEDMEM.CommInterface.commRank(), ParaMEDMEM.CommInterface.commSize(), and ParaMEDMEM.CommInterface.groupIncl().
| int ParaMEDMEM.MPIProcessorGroup::translateRank | ( | const ProcessorGroup * | group, |
| int | rank | ||
| ) | const [virtual, inherited] |
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 ParaMEDMEM.ProcessorGroup.
References ParaMEDMEM.MPIProcessorGroup._group, and med_test1.group.
| ProcessorGroup * ParaMEDMEM.MPIProcessorGroup::createComplementProcGroup | ( | ) | const [virtual, inherited] |
Creates a processor group that is the complement of the current group inside MPI_COMM_WORLD
Implements ParaMEDMEM.ProcessorGroup.
References ParaMEDMEM.ProcessorGroup._comm_interface, ParaMEDMEM.ProcessorGroup._proc_ids, ParaMEDMEM.MPIProcessorGroup._world_comm, ParaMEDMEM.MPIProcessorGroup.MPIProcessorGroup(), and ParaMEDMEM.CommInterface.worldSize().
| ProcessorGroup * ParaMEDMEM.MPIProcessorGroup::fuse | ( | const ProcessorGroup & | group | ) | const [virtual, inherited] |
Adding processors of group group to local group.
| group | group that is to be fused with current group |
Implements ParaMEDMEM.ProcessorGroup.
References ParaMEDMEM.ProcessorGroup._comm_interface, ParaMEDMEM.ProcessorGroup._proc_ids, ParaMEDMEM.MPIProcessorGroup._world_comm, ParaMEDMEM.ProcessorGroup.getProcIDs(), and ParaMEDMEM.MPIProcessorGroup.MPIProcessorGroup().
| int ParaMEDMEM.MPIProcessorGroup::myRank | ( | ) | const [virtual, inherited] |
Implements ParaMEDMEM.ProcessorGroup.
References ParaMEDMEM.MPIProcessorGroup._comm, and test_NonCoincidentDEC.rank.