Nektar++
|
A global linear system. More...
#include <CommMpi.h>
Public Member Functions | |
CommMpi (int narg, char *arg[]) | |
virtual | ~CommMpi () |
MPI_Comm | GetComm () |
![]() | |
Comm (int narg, char *arg[]) | |
virtual | ~Comm () |
void | Finalise () |
int | GetSize () |
Returns number of processes. More... | |
int | GetRank () |
const std::string & | GetType () const |
void | Block () |
Block execution until all processes reach this point. More... | |
NekDouble | Wtime () |
Return the time in seconds. More... | |
template<class T > | |
void | Send (int pProc, T &pData) |
template<class T > | |
void | Recv (int pProc, T &pData) |
template<class T > | |
void | SendRecv (int pSendProc, T &pSendData, int pRecvProc, T &pRecvData) |
template<class T > | |
void | SendRecvReplace (int pSendProc, int pRecvProc, T &pData) |
template<class T > | |
void | AllReduce (T &pData, enum ReduceOperator pOp) |
template<class T > | |
void | AlltoAll (T &pSendData, T &pRecvData) |
template<class T1 , class T2 > | |
void | AlltoAllv (T1 &pSendData, T2 &pSendDataSizeMap, T2 &pSendDataOffsetMap, T1 &pRecvData, T2 &pRecvDataSizeMap, T2 &pRecvDataOffsetMap) |
template<class T > | |
void | AllGather (T &pSendData, T &pRecvData) |
template<class T > | |
void | AllGatherv (T &pSendData, T &pRecvData, Array< OneD, int > &pRecvDataSizeMap, Array< OneD, int > &pRecvDataOffsetMap) |
template<class T > | |
void | AllGatherv (T &pRecvData, Array< OneD, int > &pRecvDataSizeMap, Array< OneD, int > &pRecvDataOffsetMap) |
template<class T > | |
void | Bcast (T &data, int rootProc) |
template<class T > | |
void | Exscan (T &pData, const enum ReduceOperator pOp, T &ans) |
template<class T > | |
T | Gather (const int rootProc, T &val) |
template<class T > | |
T | Scatter (const int rootProc, T &pData) |
CommSharedPtr | CommCreateIf (int flag) |
If the flag is non-zero create a new communicator. More... | |
void | SplitComm (int pRows, int pColumns) |
Splits this communicator into a grid of size pRows*pColumns and creates row and column communicators. By default the communicator is a single row. More... | |
CommSharedPtr | GetRowComm () |
Retrieve the row communicator to which this process belongs. More... | |
CommSharedPtr | GetColumnComm () |
Retrieve the column communicator to which this process belongs. More... | |
bool | TreatAsRankZero (void) |
bool | IsSerial (void) |
bool | RemoveExistingFiles (void) |
Static Public Member Functions | |
static CommSharedPtr | create (int narg, char *arg[]) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static std::string | className |
Name of class. More... | |
Protected Member Functions | |
CommMpi (MPI_Comm pComm) | |
CommMpi () | |
virtual void | v_Finalise () |
virtual int | v_GetRank () |
virtual void | v_Block () |
virtual double | v_Wtime () |
virtual bool | v_TreatAsRankZero (void) |
virtual bool | v_IsSerial (void) |
virtual void | v_Send (void *buf, int count, CommDataType dt, int dest) |
virtual void | v_Recv (void *buf, int count, CommDataType dt, int source) |
virtual void | v_SendRecv (void *sendbuf, int sendcount, CommDataType sendtype, int dest, void *recvbuf, int recvcount, CommDataType recvtype, int source) |
virtual void | v_SendRecvReplace (void *buf, int count, CommDataType dt, int pSendProc, int pRecvProc) |
virtual void | v_AllReduce (void *buf, int count, CommDataType dt, enum ReduceOperator pOp) |
virtual void | v_AlltoAll (void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, int recvcount, CommDataType recvtype) |
virtual void | v_AlltoAllv (void *sendbuf, int sendcounts[], int sensdispls[], CommDataType sendtype, void *recvbuf, int recvcounts[], int rdispls[], CommDataType recvtype) |
virtual void | v_AllGather (void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, int recvcount, CommDataType recvtype) |
virtual void | v_AllGatherv (void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, int recvcounts[], int rdispls[], CommDataType recvtype) |
virtual void | v_AllGatherv (void *recvbuf, int recvcounts[], int rdispls[], CommDataType recvtype) |
virtual void | v_Bcast (void *buffer, int count, CommDataType dt, int root) |
virtual void | v_Exscan (Array< OneD, unsigned long long > &pData, const enum ReduceOperator pOp, Array< OneD, unsigned long long > &ans) |
virtual void | v_Gather (void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, int recvcount, CommDataType recvtype, int root) |
virtual void | v_Scatter (void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, int recvcount, CommDataType recvtype, int root) |
virtual void | v_SplitComm (int pRows, int pColumns) |
virtual CommSharedPtr | v_CommCreateIf (int flag) |
![]() | |
Comm () | |
virtual bool | v_RemoveExistingFiles (void) |
Protected Attributes | |
MPI_Comm | m_comm |
int | m_rank |
![]() | |
int | m_size |
Number of processes. More... | |
std::string | m_type |
Type of communication. More... | |
CommSharedPtr | m_commRow |
Row communicator. More... | |
CommSharedPtr | m_commColumn |
Column communicator. More... | |
Nektar::LibUtilities::CommMpi::CommMpi | ( | int | narg, |
char * | arg[] | ||
) |
Definition at line 52 of file CommMpi.cpp.
References ASSERTL0, m_comm, m_rank, Nektar::LibUtilities::Comm::m_size, and Nektar::LibUtilities::Comm::m_type.
|
virtual |
|
protected |
Definition at line 78 of file CommMpi.cpp.
References m_comm, m_rank, Nektar::LibUtilities::Comm::m_size, and Nektar::LibUtilities::Comm::m_type.
|
inlineprotected |
Definition at line 84 of file CommMpi.h.
References v_AllGather(), v_AllGatherv(), v_AllReduce(), v_AlltoAll(), v_AlltoAllv(), v_Bcast(), v_Block(), v_CommCreateIf(), v_Exscan(), v_Finalise(), v_Gather(), v_GetRank(), v_IsSerial(), v_Recv(), v_Scatter(), v_Send(), v_SendRecv(), v_SendRecvReplace(), v_SplitComm(), v_TreatAsRankZero(), and v_Wtime().
Referenced by v_CommCreateIf(), and v_SplitComm().
|
inlinestatic |
Creates an instance of this class.
Definition at line 64 of file CommMpi.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
MPI_Comm Nektar::LibUtilities::CommMpi::GetComm | ( | ) |
Definition at line 103 of file CommMpi.cpp.
References m_comm.
Referenced by Nektar::MultiRegions::GlobalLinSysPETSc::GlobalLinSysPETSc().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 292 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 301 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 311 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 236 of file CommMpi.cpp.
References ASSERTL0, Nektar::LibUtilities::Comm::GetSize(), m_comm, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceMin, and Nektar::LibUtilities::ReduceSum.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 266 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 278 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 320 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 166 of file CommMpi.cpp.
References m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Create a new communicator if the flag is non-zero.
Implements Nektar::LibUtilities::Comm.
Definition at line 405 of file CommMpi.cpp.
References CommMpi(), and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 326 of file CommMpi.cpp.
References ASSERTL0, m_comm, Nektar::LibUtilities::MPI_UNSIGNED_LONG_LONG, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceMin, and Nektar::LibUtilities::ReduceSum.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Reimplemented in Nektar::LibUtilities::CommCwipi.
Definition at line 111 of file CommMpi.cpp.
Referenced by CommMpi(), and Nektar::LibUtilities::CommCwipi::v_Finalise().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 353 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 127 of file CommMpi.cpp.
References m_rank.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 151 of file CommMpi.cpp.
References Nektar::LibUtilities::Comm::m_size.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 197 of file CommMpi.cpp.
References m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 363 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 182 of file CommMpi.cpp.
References m_comm, and MPISYNC.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 207 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 222 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
Referenced by CommMpi().
|
protectedvirtual |
Processes are considered as a grid of size pRows*pColumns. Comm objects are created corresponding to the rows and columns of this grid. The row and column to which this process belongs is stored in m_commRow and m_commColumn.
Implements Nektar::LibUtilities::Comm.
Definition at line 378 of file CommMpi.cpp.
References ASSERTL0, CommMpi(), m_comm, Nektar::LibUtilities::Comm::m_commColumn, Nektar::LibUtilities::Comm::m_commRow, m_rank, and Nektar::LibUtilities::Comm::m_size.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 135 of file CommMpi.cpp.
References m_rank.
Referenced by CommMpi().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 174 of file CommMpi.cpp.
Referenced by CommMpi().
|
static |
Name of class.
|
protected |
Definition at line 79 of file CommMpi.h.
Referenced by Nektar::LibUtilities::CommCwipi::CommCwipi(), CommMpi(), GetComm(), v_AllGather(), v_AllGatherv(), v_AllReduce(), v_AlltoAll(), v_AlltoAllv(), v_Bcast(), v_Block(), v_CommCreateIf(), v_Exscan(), v_Gather(), v_Recv(), v_Scatter(), v_Send(), v_SendRecv(), v_SendRecvReplace(), v_SplitComm(), and ~CommMpi().
|
protected |
Definition at line 80 of file CommMpi.h.
Referenced by Nektar::LibUtilities::CommCwipi::CommCwipi(), CommMpi(), v_GetRank(), v_SplitComm(), and v_TreatAsRankZero().