Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MEDCoupling::CommInterface Class Reference

Public Member Functions

int allGather (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) const
 
int allReduce (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) const
 
int allToAll (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) const
 
int allToAllV (void *sendbuf, int *sendcounts, int *senddispls, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *recvdispls, MPI_Datatype recvtype, MPI_Comm comm) const
 
int barrier (MPI_Comm comm) const
 
int broadcast (void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) const
 
int cancel (MPI_Request *request) const
 
int commCreate (MPI_Comm comm, MPI_Group group, MPI_Comm *comm_output) const
 
int commFree (MPI_Comm *comm) const
 
int commGroup (MPI_Comm comm, MPI_Group *group) const
 
 CommInterface ()
 
int commRank (MPI_Comm comm, int *rank) const
 
int commSize (MPI_Comm comm, int *size) const
 
int errorString (int errorcode, char *string, int *resultlen) const
 
int getCount (MPI_Status *status, MPI_Datatype datatype, int *count) const
 
int groupFree (MPI_Group *group) const
 
int groupIncl (MPI_Group group, int size, int *ranks, MPI_Group *group_output) const
 
int Iprobe (int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status) const
 
int Irecv (void *buffer, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) const
 
int Isend (void *buffer, int count, MPI_Datatype datatype, int target, int tag, MPI_Comm comm, MPI_Request *request) const
 
int probe (int source, int tag, MPI_Comm comm, MPI_Status *status) const
 
int recv (void *buffer, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) const
 
int reduce (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) const
 
int requestFree (MPI_Request *request) const
 
int send (void *buffer, int count, MPI_Datatype datatype, int target, int tag, MPI_Comm comm) const
 
int sendRecv (void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status)
 
int test (MPI_Request *request, int *flag, MPI_Status *status) const
 
int testall (int count, MPI_Request *array_of_requests, int *flag, MPI_Status *array_of_status) const
 
int testany (int count, MPI_Request *array_of_requests, int *index, int *flag, MPI_Status *status) const
 
int testCancelled (MPI_Status *status, int *flag) const
 
int testsome (int incount, MPI_Request *array_of_requests, int *outcount, int *array_of_indices, MPI_Status *array_of_status) const
 
int wait (MPI_Request *request, MPI_Status *status) const
 
int waitall (int count, MPI_Request *array_of_requests, MPI_Status *array_of_status) const
 
int waitany (int count, MPI_Request *array_of_requests, int *index, MPI_Status *status) const
 
int waitsome (int incount, MPI_Request *array_of_requests, int *outcount, int *array_of_indices, MPI_Status *array_of_status) const
 
int worldSize () const
 
virtual ~CommInterface ()
 

Detailed Description

The class CommInterface is the gateway to the MPI library. It is a wrapper around all MPI calls, thus trying to abstract the rest of the code from using the direct MPI API (but this is not strictly respected overall in practice ...). It is used in all the DEC related classes.

It is typically instanciated after the MPI_Init() call in a program and is afterwards passed as a parameter to the constructors of various parallel objects so that they access the MPI library via this common interface.

As an example, the following code excerpt initializes a processor group made of the zero processor.

   #include "CommInterface.hxx"
   #include "ProcessorGroup.hxx"

   int main(int argc, char** argv)
   {
   //initialization
   MPI_Init(&argc, &argv);
   MEDCoupling::CommInterface comm_interface;

   //setting up a processor group with proc 0
   set<int> procs;
   procs.insert(0);
   MEDCoupling::ProcessorGroup group(procs, comm_interface);

   //cleanup
   MPI_Finalize();
   }

Constructor & Destructor Documentation

MEDCoupling::CommInterface::CommInterface ( )
MEDCoupling::CommInterface::~CommInterface ( )
virtual

Member Function Documentation

int MEDCoupling::CommInterface::commSize ( MPI_Comm  comm,
int *  size 
) const
int MEDCoupling::CommInterface::commRank ( MPI_Comm  comm,
int *  rank 
) const
int MEDCoupling::CommInterface::commGroup ( MPI_Comm  comm,
MPI_Group *  group 
) const
int MEDCoupling::CommInterface::groupIncl ( MPI_Group  group,
int  size,
int *  ranks,
MPI_Group *  group_output 
) const
int MEDCoupling::CommInterface::commCreate ( MPI_Comm  comm,
MPI_Group  group,
MPI_Comm *  comm_output 
) const
int MEDCoupling::CommInterface::commFree ( MPI_Comm *  comm) const
int MEDCoupling::CommInterface::send ( void *  buffer,
int  count,
MPI_Datatype  datatype,
int  target,
int  tag,
MPI_Comm  comm 
) const
int MEDCoupling::CommInterface::recv ( void *  buffer,
int  count,
MPI_Datatype  datatype,
int  source,
int  tag,
MPI_Comm  comm,
MPI_Status *  status 
) const
int MEDCoupling::CommInterface::sendRecv ( void *  sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
int  dest,
int  sendtag,
void *  recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
int  source,
int  recvtag,
MPI_Comm  comm,
MPI_Status *  status 
)
int MEDCoupling::CommInterface::Isend ( void *  buffer,
int  count,
MPI_Datatype  datatype,
int  target,
int  tag,
MPI_Comm  comm,
MPI_Request *  request 
) const
int MEDCoupling::CommInterface::Irecv ( void *  buffer,
int  count,
MPI_Datatype  datatype,
int  source,
int  tag,
MPI_Comm  comm,
MPI_Request *  request 
) const
int MEDCoupling::CommInterface::wait ( MPI_Request *  request,
MPI_Status *  status 
) const
int MEDCoupling::CommInterface::test ( MPI_Request *  request,
int *  flag,
MPI_Status *  status 
) const
int MEDCoupling::CommInterface::requestFree ( MPI_Request *  request) const
int MEDCoupling::CommInterface::waitany ( int  count,
MPI_Request *  array_of_requests,
int *  index,
MPI_Status *  status 
) const
int MEDCoupling::CommInterface::testany ( int  count,
MPI_Request *  array_of_requests,
int *  index,
int *  flag,
MPI_Status *  status 
) const
int MEDCoupling::CommInterface::waitall ( int  count,
MPI_Request *  array_of_requests,
MPI_Status *  array_of_status 
) const
int MEDCoupling::CommInterface::testall ( int  count,
MPI_Request *  array_of_requests,
int *  flag,
MPI_Status *  array_of_status 
) const
int MEDCoupling::CommInterface::waitsome ( int  incount,
MPI_Request *  array_of_requests,
int *  outcount,
int *  array_of_indices,
MPI_Status *  array_of_status 
) const
int MEDCoupling::CommInterface::testsome ( int  incount,
MPI_Request *  array_of_requests,
int *  outcount,
int *  array_of_indices,
MPI_Status *  array_of_status 
) const
int MEDCoupling::CommInterface::probe ( int  source,
int  tag,
MPI_Comm  comm,
MPI_Status *  status 
) const
int MEDCoupling::CommInterface::Iprobe ( int  source,
int  tag,
MPI_Comm  comm,
int *  flag,
MPI_Status *  status 
) const
int MEDCoupling::CommInterface::cancel ( MPI_Request *  request) const
int MEDCoupling::CommInterface::testCancelled ( MPI_Status *  status,
int *  flag 
) const
int MEDCoupling::CommInterface::barrier ( MPI_Comm  comm) const
int MEDCoupling::CommInterface::errorString ( int  errorcode,
char *  string,
int *  resultlen 
) const
int MEDCoupling::CommInterface::getCount ( MPI_Status *  status,
MPI_Datatype  datatype,
int *  count 
) const
int MEDCoupling::CommInterface::broadcast ( void *  buffer,
int  count,
MPI_Datatype  datatype,
int  root,
MPI_Comm  comm 
) const
int MEDCoupling::CommInterface::allGather ( void *  sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
MPI_Comm  comm 
) const
int MEDCoupling::CommInterface::allToAll ( void *  sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
MPI_Comm  comm 
) const
int MEDCoupling::CommInterface::allToAllV ( void *  sendbuf,
int *  sendcounts,
int *  senddispls,
MPI_Datatype  sendtype,
void *  recvbuf,
int *  recvcounts,
int *  recvdispls,
MPI_Datatype  recvtype,
MPI_Comm  comm 
) const
int MEDCoupling::CommInterface::reduce ( void *  sendbuf,
void *  recvbuf,
int  count,
MPI_Datatype  datatype,
MPI_Op  op,
int  root,
MPI_Comm  comm 
) const
int MEDCoupling::CommInterface::allReduce ( void *  sendbuf,
void *  recvbuf,
int  count,
MPI_Datatype  datatype,
MPI_Op  op,
MPI_Comm  comm 
) const