Classes | |
struct | Mpi_typemap |
class | Message |
Namespaces | |
namespace | util |
Functions | |
int | MyProc () |
Returns processor number of calling program. | |
int | NProcs () |
Returns number of CPUs involved in the computation. | |
int | NProcsCFD () |
Returns number of CPUs to use in CFD portion of computation. | |
bool | IOProcessor () |
Is this CPU the I/O Processor? | |
int | IOProcessorNumber () |
The CPU number of the I/O Processor. | |
MPI_Comm | Communicator () |
BoxLib's Parallel Communicator, probably MPI_COMM_WORLD. | |
void | StartParallel (int *argc=0, char ***argv=0) |
Perform any needed parallel initialization. | |
void | Gather (Real *sendbuf, int sendcount, Real *recvbuf, int root) |
Parallel gather. | |
std::vector< size_t > | Gather (const size_t &t, int root) |
ParallelDescriptor::Message | Send (const std::vector< size_t > &buf, int dst_pid, int tag) |
ParallelDescriptor::Message | Recv (std::vector< size_t > &buf, int src_pid, int tag) |
ParallelDescriptor::Message | Recv (std::vector< char > &buf, int src_pid, int tag) |
void | EndParallel () |
Perform any needed parallel finalization. | |
void | Abort () |
Issue architecture specific Abort. | |
void | Abort (int errorcode) |
Abort with specified error code. | |
const char * | ErrorString (int errcode) |
ErrorString return string associated with error internal error condition. | |
void | Barrier () |
void | Barrier (MPI_Comm) |
void | Test (MPI_Request &request, int &flag, MPI_Status &status) |
void | Comm_dup (MPI_Comm comm, MPI_Comm &newcomm) |
void | ReduceRealMax (Real &rvar) |
Real max reduction. | |
void | ReduceRealMin (Real &rvar) |
Real min reduction. | |
void | ReduceRealSum (Real &rvar) |
Real sum reduction. | |
void | ReduceRealMax (Real &rvar, int cpu) |
Real max reduction to specified cpu. | |
void | ReduceRealMin (Real &rvar, int cpu) |
Real min reduction to specified cpu. | |
void | ReduceRealSum (Real &rvar, int cpu) |
Real sum reduction to specified cpu. | |
void | ReduceLongAnd (long &rvar) |
Long and-wise reduction. | |
void | ReduceLongSum (long &rvar) |
Long sum reduction. | |
void | ReduceLongMax (long &rvar) |
Long max reduction. | |
void | ReduceLongMin (long &rvar) |
Long min reduction. | |
void | ReduceLongAnd (long &rvar, int cpu) |
Long and-wise reduction to specified cpu. | |
void | ReduceLongSum (long &rvar, int cpu) |
Long sum reduction to specified cpu. | |
void | ReduceLongMax (long &rvar, int cpu) |
Long max reduction to specified cpu. | |
void | ReduceLongMin (long &rvar, int cpu) |
Long min reduction to specified cpu. | |
void | ReduceIntSum (int &rvar) |
Integer sum reduction. | |
void | ReduceIntMax (int &rvar) |
Integer max reduction. | |
void | ReduceIntMin (int &rvar) |
Integer min reduction. | |
void | ReduceIntSum (int &rvar, int cpu) |
Integer sum reduction to specified cpu. | |
void | ReduceIntMax (int &rvar, int cpu) |
Integer max reduction to specified cpu. | |
void | ReduceIntMin (int &rvar, int cpu) |
Integer min reduction to specified cpu. | |
void | ReduceBoolAnd (bool &rvar) |
And-wise boolean reduction. | |
void | ReduceBoolOr (bool &rvar) |
Or-wise boolean reduction. | |
void | ReduceBoolAnd (bool &rvar, int cpu) |
And-wise boolean reduction to specified cpu. | |
void | ReduceBoolOr (bool &rvar, int cpu) |
Or-wise boolean reduction to specified cpu. | |
double | second () |
Returns wall-clock seconds since start of execution. | |
void | Waitsome (Array< MPI_Request > &reqs, int &completed, Array< int > &indx, Array< MPI_Status > &status) |
int | SeqNum () |
Returns sequential message sequence numbers in range 1000-9000. | |
template<class T> | |
Message | Asend (const T *, size_t n, int pid, int tag) |
template<class T> | |
Message | Asend (const T *, size_t n, int pid, int tag, MPI_Comm comm) |
template<class T> | |
Message | Asend (const std::vector< T > &buf, int pid, int tag) |
template<class T> | |
Message | Arecv (T *, size_t n, int pid, int tag) |
template<class T> | |
Message | Arecv (T *, size_t n, int pid, int tag, MPI_Comm comm) |
template<class T> | |
Message | Arecv (std::vector< T > &buf, int pid, int tag) |
template<class T> | |
Message | Send (const T *buf, size_t n, int dst_pid, int tag) |
template<class T> | |
Message | Recv (T *, size_t n, int pid, int tag) |
template<class T> | |
void | Bcast (T *, size_t n, int root=0) |
template<class Op, class T> | |
T | Reduce (const T &t) |
template<class T, class T1> | |
void | Scatter (T *, size_t n, const T1 *, size_t n1, int root) |
template<class T, class T1> | |
void | Gather (const T *, size_t n, T1 *, size_t n1, int root) |
void | MPI_Error (const char *file, int line, const char *msg, int rc) |
Variables | |
int | m_MyId = -1 |
int | m_nProcs = -1 |
int | m_nProcsCFD = -1 |
MPI_Comm | m_comm |
const int | ioProcessor = 0 |
This class contains functions used for implementing parallelism.
void ParallelDescriptor::Abort | ( | int | ) |
Abort with specified error code.
void ParallelDescriptor::Abort | ( | ) |
Issue architecture specific Abort.
Referenced by BoxLib::Abort(), BoxLib::Assert(), and BoxLib::Error().
Message ParallelDescriptor::Arecv | ( | std::vector< T > & | buf, | |
int | pid, | |||
int | tag | |||
) | [inline] |
Message ParallelDescriptor::Arecv | ( | T * | buf, | |
size_t | n, | |||
int | pid, | |||
int | tag, | |||
MPI_Comm | comm | |||
) | [inline] |
Message ParallelDescriptor::Arecv | ( | T * | buf, | |
size_t | n, | |||
int | pid, | |||
int | tag | |||
) | [inline] |
Referenced by FabArrayCopyDescriptor< FAB >::CollectData(), and FabArray< FAB >::copy().
Message ParallelDescriptor::Asend | ( | const std::vector< T > & | buf, | |
int | pid, | |||
int | tag | |||
) | [inline] |
Message ParallelDescriptor::Asend | ( | const T * | buf, | |
size_t | n, | |||
int | pid, | |||
int | tag, | |||
MPI_Comm | comm | |||
) | [inline] |
Message ParallelDescriptor::Asend | ( | const T * | buf, | |
size_t | n, | |||
int | pid, | |||
int | tag | |||
) | [inline] |
void ParallelDescriptor::Barrier | ( | MPI_Comm | ) |
void ParallelDescriptor::Barrier | ( | ) |
Referenced by MFIter::isValid(), and mma_dump().
void ParallelDescriptor::Bcast | ( | T * | t, | |
size_t | n, | |||
int | root = 0 | |||
) | [inline] |
Referenced by FabArray< FAB >::copy().
MPI_Comm ParallelDescriptor::Communicator | ( | ) |
BoxLib's Parallel Communicator, probably MPI_COMM_WORLD.
References m_comm.
Referenced by VisMF::Header::Header(), and VisMF::Write().
void ParallelDescriptor::EndParallel | ( | ) |
Perform any needed parallel finalization.
This MUST be the last routine in this class called from within a program.
Referenced by BoxLib::Finalize().
const char * ParallelDescriptor::ErrorString | ( | int | ) |
ErrorString return string associated with error internal error condition.
void ParallelDescriptor::Gather | ( | const T * | t, | |
size_t | n, | |||
T1 * | t1, | |||
size_t | n1, | |||
int | root | |||
) | [inline] |
std::vector< size_t > ParallelDescriptor::Gather | ( | const size_t & | t, | |
int | root | |||
) |
bool ParallelDescriptor::IOProcessor | ( | ) |
Is this CPU the I/O Processor?
References BL_ASSERT, ioProcessor, and m_MyId.
Referenced by ParmParse::Finalize(), VisMF::Header::Header(), mma_dump(), and VisMF::Write().
int ParallelDescriptor::IOProcessorNumber | ( | ) |
The CPU number of the I/O Processor.
References ioProcessor.
Referenced by VisMF::Header::Header(), and VisMF::Write().
void ParallelDescriptor::MPI_Error | ( | const char * | file, | |
int | line, | |||
const char * | msg, | |||
int | rc | |||
) |
int ParallelDescriptor::MyProc | ( | ) |
Returns processor number of calling program.
References BL_ASSERT, and m_MyId.
Referenced by FabArrayCopyDescriptor< FAB >::AddBoxDoIt(), DistributionMapping::AddToCache(), BuildFBsirec(), FabArrayCopyDescriptor< FAB >::CollectData(), FabArray< FAB >::copy(), DistributionMapping::DistributionMapping(), MultiFab::FillBoundary(), BoxLib::Initialize(), DistributionMapping::KnapSackProcessorMap(), MFIter::MFIter(), mma_dump(), MFIter::operator++(), FabArrayCopyDescriptor< FAB >::PrintStats(), DistributionMapping::RoundRobinProcessorMap(), FabArray< FAB >::setFab(), and VisMF::Write().
int ParallelDescriptor::NProcs | ( | ) |
Returns number of CPUs involved in the computation.
References BL_ASSERT, and m_nProcs.
Referenced by BuildFBsirec(), FabArrayCopyDescriptor< FAB >::CollectData(), FabArray< FAB >::copy(), VisMF::Header::Header(), mma_dump(), and VisMF::Write().
int ParallelDescriptor::NProcsCFD | ( | ) |
Returns number of CPUs to use in CFD portion of computation.
References BL_ASSERT, m_nProcsCFD, and ParallelDescriptor::util::SetNProcsCFD().
Referenced by FabArray< FAB >::define().
Message ParallelDescriptor::Recv | ( | T * | buf, | |
size_t | n, | |||
int | pid, | |||
int | tag | |||
) | [inline] |
Message ParallelDescriptor::Recv | ( | std::vector< char > & | buf, | |
int | src_pid, | |||
int | tag | |||
) |
Message ParallelDescriptor::Recv | ( | std::vector< size_t > & | buf, | |
int | src_pid, | |||
int | tag | |||
) |
T ParallelDescriptor::Reduce | ( | const T & | t | ) | [inline] |
void ParallelDescriptor::ReduceBoolAnd | ( | bool & | , | |
int | ||||
) |
And-wise boolean reduction to specified cpu.
void ParallelDescriptor::ReduceBoolAnd | ( | bool & | ) |
And-wise boolean reduction.
void ParallelDescriptor::ReduceBoolOr | ( | bool & | , | |
int | ||||
) |
Or-wise boolean reduction to specified cpu.
void ParallelDescriptor::ReduceBoolOr | ( | bool & | ) |
Or-wise boolean reduction.
void ParallelDescriptor::ReduceIntMax | ( | int & | , | |
int | ||||
) |
Integer max reduction to specified cpu.
void ParallelDescriptor::ReduceIntMax | ( | int & | ) |
Integer max reduction.
void ParallelDescriptor::ReduceIntMin | ( | int & | , | |
int | ||||
) |
Integer min reduction to specified cpu.
void ParallelDescriptor::ReduceIntMin | ( | int & | ) |
Integer min reduction.
void ParallelDescriptor::ReduceIntSum | ( | int & | , | |
int | ||||
) |
Integer sum reduction to specified cpu.
void ParallelDescriptor::ReduceIntSum | ( | int & | ) |
Integer sum reduction.
void ParallelDescriptor::ReduceLongAnd | ( | long & | , | |
int | ||||
) |
Long and-wise reduction to specified cpu.
void ParallelDescriptor::ReduceLongAnd | ( | long & | ) |
void ParallelDescriptor::ReduceLongMax | ( | long & | , | |
int | ||||
) |
Long max reduction to specified cpu.
void ParallelDescriptor::ReduceLongMax | ( | long & | ) |
Long max reduction.
void ParallelDescriptor::ReduceLongMin | ( | long & | , | |
int | ||||
) |
Long min reduction to specified cpu.
void ParallelDescriptor::ReduceLongMin | ( | long & | ) |
Long min reduction.
void ParallelDescriptor::ReduceLongSum | ( | long & | , | |
int | ||||
) |
Long sum reduction to specified cpu.
void ParallelDescriptor::ReduceLongSum | ( | long & | ) |
Long sum reduction.
void ParallelDescriptor::ReduceRealMax | ( | Real & | , | |
int | ||||
) |
Real max reduction to specified cpu.
void ParallelDescriptor::ReduceRealMax | ( | Real & | ) |
void ParallelDescriptor::ReduceRealMin | ( | Real & | , | |
int | ||||
) |
Real min reduction to specified cpu.
void ParallelDescriptor::ReduceRealMin | ( | Real & | ) |
void ParallelDescriptor::ReduceRealSum | ( | Real & | , | |
int | ||||
) |
Real sum reduction to specified cpu.
void ParallelDescriptor::ReduceRealSum | ( | Real & | ) |
Real sum reduction.
void ParallelDescriptor::Scatter | ( | T * | t, | |
size_t | n, | |||
const T1 * | t1, | |||
size_t | n1, | |||
int | root | |||
) | [inline] |
double ParallelDescriptor::second | ( | ) |
Message ParallelDescriptor::Send | ( | const T * | buf, | |
size_t | n, | |||
int | dst_pid, | |||
int | tag | |||
) | [inline] |
Message ParallelDescriptor::Send | ( | const std::vector< size_t > & | buf, | |
int | dst_pid, | |||
int | tag | |||
) |
Referenced by FabArrayCopyDescriptor< FAB >::CollectData(), and FabArray< FAB >::copy().
int ParallelDescriptor::SeqNum | ( | ) |
Returns sequential message sequence numbers in range 1000-9000.
Referenced by FabArrayCopyDescriptor< FAB >::CollectData(), FabArray< FAB >::copy(), VisMF::Header::Header(), and VisMF::Write().
void ParallelDescriptor::StartParallel | ( | int * | , | |
char *** | ||||
) |
Perform any needed parallel initialization.
BL_USE_MPI
This MUST be the first routine in this class called from within a program.
References m_comm, m_MyId, m_nProcs, and m_nProcsCFD.
Referenced by BoxLib::Initialize().
void ParallelDescriptor::Test | ( | MPI_Request & | , | |
int & | , | |||
MPI_Status & | ||||
) |
void ParallelDescriptor::Waitsome | ( | Array< MPI_Request > & | reqs, | |
int & | completed, | |||
Array< int > & | indx, | |||
Array< MPI_Status > & | status | |||
) |
Referenced by FabArrayCopyDescriptor< FAB >::CollectData(), and FabArray< FAB >::copy().
const int ParallelDescriptor::ioProcessor = 0 |
Referenced by IOProcessor(), and IOProcessorNumber().
Referenced by Communicator(), and StartParallel().
int ParallelDescriptor::m_MyId = -1 |
Referenced by IOProcessor(), MyProc(), and StartParallel().
int ParallelDescriptor::m_nProcs = -1 |
Referenced by NProcs(), and StartParallel().
int ParallelDescriptor::m_nProcsCFD = -1 |
Referenced by NProcsCFD(), and StartParallel().