Nektar++
|
A global linear system. More...
#include <CommMpi.h>
Public Member Functions | |
CommMpi (int narg, char *arg[]) | |
virtual | ~CommMpi () |
MPI_Comm | GetComm () |
Public Member Functions inherited from Nektar::LibUtilities::Comm | |
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 T > | |
void | AlltoAllv (Array< OneD, T > &pSendData, Array< OneD, int > &pSendDataSizeMap, Array< OneD, int > &pSendDataOffsetMap, Array< OneD, 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 | 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 | |
virtual void | v_Finalise () |
virtual int | v_GetRank () |
virtual void | v_Block () |
virtual double | v_Wtime () |
virtual bool | v_TreatAsRankZero (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_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) |
Protected Member Functions inherited from Nektar::LibUtilities::Comm | |
Comm () | |
virtual bool | v_RemoveExistingFiles (void) |
Private Member Functions | |
CommMpi (MPI_Comm pComm) | |
Private Attributes | |
MPI_Comm | m_comm |
int | m_rank |
Additional Inherited Members | |
Protected Attributes inherited from Nektar::LibUtilities::Comm | |
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 53 of file CommMpi.cpp.
References ASSERTL0, m_comm, m_rank, Nektar::LibUtilities::Comm::m_size, and Nektar::LibUtilities::Comm::m_type.
Referenced by v_CommCreateIf(), and v_SplitComm().
|
virtual |
Definition at line 91 of file CommMpi.cpp.
|
private |
Definition at line 79 of file CommMpi.cpp.
References m_comm, m_rank, Nektar::LibUtilities::Comm::m_size, and Nektar::LibUtilities::Comm::m_type.
|
inlinestatic |
Creates an instance of this class.
Definition at line 65 of file CommMpi.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
MPI_Comm Nektar::LibUtilities::CommMpi::GetComm | ( | ) |
Definition at line 98 of file CommMpi.cpp.
References m_comm.
Referenced by Nektar::MultiRegions::GlobalLinSysPETSc::GlobalLinSysPETSc().
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 216 of file CommMpi.cpp.
References ASSERTL0, Nektar::LibUtilities::Comm::GetSize(), m_comm, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceMin, and Nektar::LibUtilities::ReduceSum.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 246 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 258 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 269 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 146 of file CommMpi.cpp.
References m_comm.
|
protectedvirtual |
Create a new communicator if the flag is non-zero.
Implements Nektar::LibUtilities::Comm.
Definition at line 354 of file CommMpi.cpp.
References CommMpi(), and m_comm.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 275 of file CommMpi.cpp.
References ASSERTL0, m_comm, Nektar::LibUtilities::MPI_UNSIGNED_LONG_LONG, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceMin, and Nektar::LibUtilities::ReduceSum.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 106 of file CommMpi.cpp.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 302 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 122 of file CommMpi.cpp.
References m_rank.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 177 of file CommMpi.cpp.
References m_comm.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 312 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 162 of file CommMpi.cpp.
References m_comm, and MPISYNC.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 187 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 202 of file CommMpi.cpp.
References ASSERTL0, and m_comm.
|
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 327 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.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 130 of file CommMpi.cpp.
References m_rank.
|
protectedvirtual |
Implements Nektar::LibUtilities::Comm.
Definition at line 154 of file CommMpi.cpp.
|
static |
Name of class.
|
private |
Definition at line 116 of file CommMpi.h.
Referenced by CommMpi(), GetComm(), 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(), and v_SplitComm().
|
private |
Definition at line 117 of file CommMpi.h.
Referenced by CommMpi(), v_GetRank(), v_SplitComm(), and v_TreatAsRankZero().