Processor Groups

Functions

 ParaMEDMEM::MPIProcessorGroup::MPIProcessorGroup (const CommInterface &interface)
 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

Detailed Description

Overview

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);
   
 ...
 }
 

Function Documentation

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.

Parameters:
interface CommInterface object giving access to the MPI communication layer

Referenced by ParaMEDMEM::MPIProcessorGroup::createComplementProcGroup(), ParaMEDMEM::MPIProcessorGroup::createProcGroup(), and ParaMEDMEM::MPIProcessorGroup::fuse().

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.

Parameters:
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
int ParaMEDMEM::MPIProcessorGroup::translateRank ( const ProcessorGroup *  group,
int  rank 
) const [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.

Parameters:
group group from which the rank is expected
rank rank on group group of the processor which is to be translated
Returns:
rank on local group

Referenced by ParaMEDMEM::StructuredCoincidentDEC::prepareSourceDE(), ParaMEDMEM::StructuredCoincidentDEC::prepareTargetDE(), ParaMEDMEM::ExplicitCoincidentDEC::prepareTargetDE(), ParaMEDMEM::StructuredCoincidentDEC::recvData(), ParaMEDMEM::ExplicitCoincidentDEC::recvData(), and ParaMEDMEM::ExplicitCoincidentDEC::transferMappingToSource().

ProcessorGroup * ParaMEDMEM::MPIProcessorGroup::createComplementProcGroup (  )  const [inherited]

Creates a processor group that is the complement of the current group inside MPI_COMM_WORLD

Returns:
pointer to the new ProcessorGroup structure.

References ParaMEDMEM::MPIProcessorGroup::MPIProcessorGroup().

ProcessorGroup * ParaMEDMEM::MPIProcessorGroup::fuse ( const ProcessorGroup &  group  )  const [virtual, inherited]

Adding processors of group group to local group.

Parameters:
group group that is to be fused with current group
Returns:
new group formed by the fusion of local group and group.

References ParaMEDMEM::MPIProcessorGroup::MPIProcessorGroup().

Generated on Sat May 1 01:31:48 2010 for Med Memory Users' Guide by  doxygen 1.6.3