ParallelDescriptor Namespace Reference

: Parallel functions. More...


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>
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


Detailed Description

: Parallel functions.

This class contains functions used for implementing parallelism.


Function Documentation

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().

template<class T>
Message ParallelDescriptor::Arecv ( std::vector< T > &  buf,
int  pid,
int  tag 
) [inline]

template<class T>
Message ParallelDescriptor::Arecv ( T *  buf,
size_t  n,
int  pid,
int  tag,
MPI_Comm  comm 
) [inline]

template<class T>
Message ParallelDescriptor::Arecv ( T *  buf,
size_t  n,
int  pid,
int  tag 
) [inline]

template<class T>
Message ParallelDescriptor::Asend ( const std::vector< T > &  buf,
int  pid,
int  tag 
) [inline]

template<class T>
Message ParallelDescriptor::Asend ( const T *  buf,
size_t  n,
int  pid,
int  tag,
MPI_Comm  comm 
) [inline]

template<class T>
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().

template<class T>
void ParallelDescriptor::Bcast ( T *  t,
size_t  n,
int  root = 0 
) [inline]

Referenced by FabArray< FAB >::copy().

void ParallelDescriptor::Comm_dup ( MPI_Comm  ,
MPI_Comm  
)

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.

template<class T, class T1>
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 
)

void ParallelDescriptor::Gather ( Real sendbuf,
int  nsend,
Real recvbuf,
int  root 
)

Parallel gather.

References BL_ASSERT.

Referenced by FabArrayCopyDescriptor< FAB >::CollectData().

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 (  ) 

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().

template<class T>
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 
)

template<class Op, class T>
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 &   ) 

Long and-wise reduction.

Referenced by FabArray< FAB >::ok().

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  ) 

Real max reduction.

Referenced by MultiFab::max().

void ParallelDescriptor::ReduceRealMin ( Real ,
int   
)

Real min reduction to specified cpu.

void ParallelDescriptor::ReduceRealMin ( Real  ) 

Real min reduction.

Referenced by MultiFab::min().

void ParallelDescriptor::ReduceRealSum ( Real ,
int   
)

Real sum reduction to specified cpu.

void ParallelDescriptor::ReduceRealSum ( Real  ) 

Real sum reduction.

template<class T, class T1>
void ParallelDescriptor::Scatter ( T *  t,
size_t  n,
const T1 *  t1,
size_t  n1,
int  root 
) [inline]

double ParallelDescriptor::second (  ) 

Returns wall-clock seconds since start of execution.

References BoxLib::wsecond().

template<class T>
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 
)

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 
)


Variable Documentation

Referenced by IOProcessor(), and IOProcessorNumber().

Referenced by Communicator(), and StartParallel().

Referenced by IOProcessor(), MyProc(), and StartParallel().

Referenced by NProcs(), and StartParallel().

Referenced by NProcsCFD(), and StartParallel().


Generated on Fri Nov 21 10:11:05 2008 for AMRParticlePaths by  doxygen 1.5.5