Chombo + EB + MF
3.2
|
#include "REAL.H"
#include <string>
#include "Vector.H"
#include "MayDay.H"
#include "Misc.H"
#include "BaseNamespaceHeader.H"
#include "BaseNamespaceFooter.H"
#include "SPMDI.H"
Go to the source code of this file.
Classes | |
class | SerialTask |
Macros | |
#define | _SPMD_H_ |
Functions | |
int | reportMPIStats () |
int | procID () |
local process ID More... | |
int | CHprocID () |
unsigned int | numProc () |
number of parallel processes More... | |
void | barrier (void) |
all ranks wait here to sync-up More... | |
template<class T > | |
int | linearSize (const T &inputT) |
template<class T > | |
void | linearIn (T &a_outputT, const void *const inBuf) |
template<class T > | |
void | linearOut (void *const a_outBuf, const T &inputT) |
template<class T > | |
void | broadcast (T &a_inAndOut, int a_src) |
broadcast to every process More... | |
template<> | |
int | linearSize (const long long &a_input) |
template<> | |
void | linearIn (long long &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const long long &a_inputT) |
template<> | |
int | linearSize (const int &a_input) |
template<> | |
int | linearSize (const unsigned long long &a_input) |
template<> | |
void | linearIn (int &a_outputT, const void *const inBuf) |
template<> | |
void | linearIn (unsigned long long &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const int &a_inputT) |
template<> | |
void | linearOut (void *const a_outBuf, const unsigned long long &a_inputT) |
template<> | |
int | linearSize (const long &a_input) |
template<> | |
void | linearIn (long &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const long &a_inputT) |
template<> | |
int | linearSize (const unsigned long &a_input) |
template<> | |
void | linearIn (unsigned long &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const unsigned long &a_inputT) |
template<> | |
int | linearSize (const float &a_input) |
template<> | |
int | linearSize (const double &a_input) |
template<> | |
void | linearIn (float &a_outputT, const void *const a_inBuf) |
template<> | |
void | linearIn (double &a_outputT, const void *const a_inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const float &a_inputT) |
template<> | |
void | linearOut (void *const a_outBuf, const double &a_inputT) |
template<> | |
int | linearSize (const std::string &a_input) |
template<> | |
void | linearIn (std::string &a_outputT, const void *const a_inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const std::string &a_inputT) |
template<> | |
int | linearSize (const Vector< int > &a_input) |
template<> | |
void | linearIn (Vector< int > &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const Vector< int > &a_inputT) |
template<> | |
int | linearSize (const Vector< unsigned long long > &a_input) |
template<> | |
void | linearIn (Vector< unsigned long long > &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const Vector< unsigned long long > &a_inputT) |
template<> | |
int | linearSize (const Vector< long > &a_input) |
template<> | |
void | linearIn (Vector< long > &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const Vector< long > &a_inputT) |
template<> | |
int | linearSize (const Vector< float > &a_input) |
template<> | |
void | linearIn (Vector< float > &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const Vector< float > &a_inputT) |
template<> | |
int | linearSize (const Vector< double > &a_input) |
template<> | |
void | linearIn (Vector< double > &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const Vector< double > &a_inputT) |
template<> | |
int | linearSize (const Vector< std::string > &a_input) |
template<> | |
void | linearIn (Vector< std::string > &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const Vector< std::string > &a_inputT) |
template<> | |
int | linearSize (const Vector< Vector< int > > &a_input) |
template<> | |
void | linearIn (Vector< Vector< int > > &a_outputT, const void *const inBuf) |
template<> | |
void | linearOut (void *const a_outBuf, const Vector< Vector< int > > &a_inputT) |
template<class T > | |
int | linearListSize (const Vector< T > &a_input) |
template<class T > | |
void | linearListIn (Vector< T > &a_outputT, const void *const a_inBuf) |
template<class T > | |
void | linearListOut (void *const a_outBuf, const Vector< T > &a_inputT) |
int | GetPID (int rank) |
int | GetRank (int pid) |
int | uniqueProc (const SerialTask::task &a_task) |
Variables | |
int | num_procs |
unsigned long long | CH_MAX_MPI_MESSAGE_SIZE |
unsigned long long | CH_MaxMPISendSize |
unsigned long long | CH_MaxMPIRecvSize |
#define _SPMD_H_ |
int reportMPIStats | ( | ) |
int procID | ( | ) |
local process ID
Returns the ID of the locally running process in the range 0 <= procID() < numProc(). This has no relation to the operating system pid. There is always a procID() == 0.
Referenced by blockWriteBufferToFile(), CHprocID(), ParticleData< P >::fillGhosts(), gatherBoxesAndOffsets(), linearOut(), ParticleData< P >::numOutcast(), ParticleData< P >::numParticles(), ParticleData< P >::numValid(), ParticleData< P >::remapOutcast(), MergeSolver< T >::solve(), write(), write_vect_to_header(), and WriteMultiData< T >::WriteMultiData().
|
inline |
References barrier(), broadcast(), gather(), linearIn(), linearListIn(), linearListOut(), linearListSize(), linearOut(), linearSize(), numProc(), and procID().
unsigned int numProc | ( | ) |
number of parallel processes
Returns the number of parallel processes running. Always returns at least 1.
Referenced by CHprocID(), ParticleData< P >::fillGhosts(), gatherBoxesAndOffsets(), getOffsets(), linearOut(), ParticleData< P >::numOutcast(), ParticleData< P >::numParticles(), ParticleData< P >::numValid(), ParticleData< P >::remapOutcast(), and BoxLayoutData< BaseFab< int > >::unpackReceivesToMe_append().
|
inline |
all ranks wait here to sync-up
All MPI ranks wait here to sync-up. Calls MPI_Barrier(comm)
Referenced by CHprocID(), and linearOut().
int linearSize | ( | const T & | inputT | ) |
Referenced by CHprocID(), MiniIVFAB< Real >::linearIn(), BaseIVFAB< Real >::linearIn(), BaseIFFAB< FaceStencil >::linearIn(), MiniIFFAB< Real >::linearIn(), IrregTag::Entry::linearIn(), BaseFab< Real >::linearIn(), MiniIVFAB< Real >::linearOut(), BaseIVFAB< Real >::linearOut(), BaseIFFAB< FaceStencil >::linearOut(), IrregTag::Entry::linearOut(), MiniIFFAB< Real >::linearOut(), BaseFab< Real >::linearOut(), BaseFab< Real >::linearSize(), MiniIVFAB< Real >::size(), BaseIVFAB< Real >::size(), BaseIFFAB< FaceStencil >::size(), MiniIFFAB< Real >::size(), VarCoefStencil::weight(), VoFStencil::weight(), and StdSetIVS::~StdSetIVS().
void linearIn | ( | T & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const T & | inputT | ||
) |
|
inline |
broadcast to every process
Broadcasts a_inAndOut to every process from process number a_src. It is an error if a_src < 0 or a_src >= numProc(). \
T must have have the following functions: \
int linearSize<T>(const T& inputT); \ void linearIn<T>(T& a_outputT, const void* const inBuf); \ void linearOut<T>(void* a_outBuf, const T& inputT); \
Referenced by CHprocID(), gatherBoxesAndOffsets(), getOffsets(), linearOut(), ParticleData< P >::numOutcast(), ParticleData< P >::numParticles(), and ParticleData< P >::numValid().
int linearSize | ( | const long long & | a_input | ) |
void linearIn | ( | long long & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const long long & | a_inputT | ||
) |
int linearSize | ( | const int & | a_input | ) |
int linearSize | ( | const unsigned long long & | a_input | ) |
void linearIn | ( | int & | a_outputT, |
const void *const | inBuf | ||
) |
void linearIn | ( | unsigned long long & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const int & | a_inputT | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const unsigned long long & | a_inputT | ||
) |
int linearSize | ( | const long & | a_input | ) |
void linearIn | ( | long & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const long & | a_inputT | ||
) |
int linearSize | ( | const unsigned long & | a_input | ) |
void linearIn | ( | unsigned long & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const unsigned long & | a_inputT | ||
) |
int linearSize | ( | const float & | a_input | ) |
int linearSize | ( | const double & | a_input | ) |
void linearIn | ( | float & | a_outputT, |
const void *const | a_inBuf | ||
) |
void linearIn | ( | double & | a_outputT, |
const void *const | a_inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const float & | a_inputT | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const double & | a_inputT | ||
) |
int linearSize | ( | const std::string & | a_input | ) |
void linearIn | ( | std::string & | a_outputT, |
const void *const | a_inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const std::string & | a_inputT | ||
) |
int linearSize | ( | const Vector< int > & | a_input | ) |
void linearIn | ( | Vector< int > & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const Vector< int > & | a_inputT | ||
) |
int linearSize | ( | const Vector< unsigned long long > & | a_input | ) |
void linearIn | ( | Vector< unsigned long long > & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const Vector< unsigned long long > & | a_inputT | ||
) |
int linearSize | ( | const Vector< long > & | a_input | ) |
void linearIn | ( | Vector< long > & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const Vector< long > & | a_inputT | ||
) |
int linearSize | ( | const Vector< float > & | a_input | ) |
void linearIn | ( | Vector< float > & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const Vector< float > & | a_inputT | ||
) |
int linearSize | ( | const Vector< double > & | a_input | ) |
void linearIn | ( | Vector< double > & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const Vector< double > & | a_inputT | ||
) |
int linearSize | ( | const Vector< std::string > & | a_input | ) |
void linearIn | ( | Vector< std::string > & | a_outputT, |
const void *const | inBuf | ||
) |
void linearOut | ( | void *const | a_outBuf, |
const Vector< std::string > & | a_inputT | ||
) |
int linearListSize | ( | const Vector< T > & | a_input | ) |
References linearSize(), and Vector< T >::size().
Referenced by CHprocID(), BaseIVFAB< Real >::linearIn(), BaseIFFAB< FaceStencil >::linearIn(), MiniIFFAB< Real >::linearIn(), BaseIVFAB< Real >::linearOut(), BaseIFFAB< FaceStencil >::linearOut(), MiniIFFAB< Real >::linearOut(), IFidTable::linearSize(), IrregTag::Entry::linearSize(), BaseIVFAB< Real >::size(), BaseIFFAB< FaceStencil >::size(), and MiniIFFAB< Real >::size().
void linearListIn | ( | Vector< T > & | a_outputT, |
const void *const | a_inBuf | ||
) |
References linearIn(), and Vector< T >::resize().
Referenced by CHprocID(), IFidTable::linearIn(), BaseIVFAB< Real >::linearIn(), BaseIFFAB< FaceStencil >::linearIn(), and MiniIFFAB< Real >::linearIn().
void linearListOut | ( | void *const | a_outBuf, |
const Vector< T > & | a_inputT | ||
) |
References linearOut(), linearSize(), and Vector< T >::size().
Referenced by CHprocID(), IFidTable::linearOut(), BaseIVFAB< Real >::linearOut(), BaseIFFAB< FaceStencil >::linearOut(), and MiniIFFAB< Real >::linearOut().
int GetPID | ( | int | rank | ) |
int GetRank | ( | int | pid | ) |
int uniqueProc | ( | const SerialTask::task & | a_task | ) |
Referenced by getOffsets().
int num_procs |
unsigned long long CH_MAX_MPI_MESSAGE_SIZE |
Referenced by BoxLayoutData< BaseFab< int > >::unpackReceivesToMe_append().
unsigned long long CH_MaxMPISendSize |
Referenced by linearOut(), and BoxLayoutData< BaseFab< int > >::unpackReceivesToMe_append().
unsigned long long CH_MaxMPIRecvSize |
Referenced by linearOut(), and BoxLayoutData< BaseFab< int > >::unpackReceivesToMe_append().