28 #include <queso/Defines.h>
30 #ifdef QUESO_HAS_TRILINOS
31 #include <Epetra_MpiComm.h>
43 #define RawValue_MPI_COMM_SELF MPI_COMM_SELF
44 #define RawValue_MPI_IN_PLACE MPI_IN_PLACE
45 #define RawValue_MPI_ANY_SOURCE MPI_ANY_SOURCE
46 #define RawValue_MPI_CHAR MPI_CHAR
47 #define RawValue_MPI_INT MPI_INT
48 #define RawValue_MPI_DOUBLE MPI_DOUBLE
49 #define RawValue_MPI_UNSIGNED MPI_UNSIGNED
50 #define RawValue_MPI_MIN MPI_MIN
51 #define RawValue_MPI_MAX MPI_MAX
52 #define RawValue_MPI_SUM MPI_SUM
73 class BaseEnvironment;
122 RawType_MPI_Op op,
const char* whereMsg,
const char* whatMsg)
const;
136 const char* whereMsg,
const char* whatMsg)
const;
149 const char* whereMsg,
const char* whatMsg)
const;
164 const char* whereMsg,
const char* whatMsg)
const;
174 const char* whereMsg,
const char* whatMsg)
const;
183 const char* whereMsg,
const char* whatMsg)
const;
188 void syncPrintDebugMsg(
const char* msg,
unsigned int msgVerbosity,
unsigned int numUSecs)
const;
191 #ifdef QUESO_HAS_TRILINOS
192 const Epetra_MpiComm& epetraMpiComm()
const;
207 #ifdef QUESO_HAS_TRILINOS
210 Epetra_MpiComm* m_epetraMpiComm;
227 #endif // UQ_MPI_COMM_H
MPI_Comm RawType_MPI_Comm
int MyPID() const
Return my process ID.
MPI_Status RawType_MPI_Status
RawType_MPI_Comm m_rawComm
Embedded wrapped opaque MPI_Comm object.
void Barrier() const
Pause every process in *this communicator until all the processes reach this point.
int NumProc() const
Returns total number of processes.
const BaseEnvironment & m_env
void Send(void *buf, int count, RawType_MPI_Datatype datatype, int dest, int tag, const char *whereMsg, const char *whatMsg) const
Possibly blocking send of data from this process to another process.
MPI_Datatype RawType_MPI_Datatype
The QUESO MPI Communicator Class.
int m_worldRank
World rank.
void Gatherv(void *sendbuf, int sendcnt, RawType_MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int *displs, RawType_MPI_Datatype recvtype, int root, const char *whereMsg, const char *whatMsg) const
Gathers into specified locations from all processes in a group.
RawType_MPI_Comm Comm() const
Extract MPI Communicator from a MpiComm object.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
void Bcast(void *buffer, int count, RawType_MPI_Datatype datatype, int root, const char *whereMsg, const char *whatMsg) const
Broadcast values from the root process to the slave processes.
MpiComm & operator=(const MpiComm &rhs)
Assignment operator.
MpiComm()
Default Constructor.
void Recv(void *buf, int count, RawType_MPI_Datatype datatype, int source, int tag, RawType_MPI_Status *status, const char *whereMsg, const char *whatMsg) const
Blocking receive of data from this process to another process.
int m_myPid
Process ID of this process.
void Gather(void *sendbuf, int sendcnt, RawType_MPI_Datatype sendtype, void *recvbuf, int recvcount, RawType_MPI_Datatype recvtype, int root, const char *whereMsg, const char *whatMsg) const
Gather values from each process to collect on all processes.
void Allreduce(void *sendbuf, void *recvbuf, int count, RawType_MPI_Datatype datatype, RawType_MPI_Op op, const char *whereMsg, const char *whatMsg) const
Combines values from all processes and distributes the result back to all processes.
void syncPrintDebugMsg(const char *msg, unsigned int msgVerbosity, unsigned int numUSecs) const
Synchronizes all the processes and print debug message.
void copy(const MpiComm &src)
Copies from an existing MpiComm instance.
MPI_Group RawType_MPI_Group