Chombo + EB  3.0
Classes | Macros | Functions | Variables
SPMD.H File Reference
#include "REAL.H"
#include <string>
#include "Vector.H"
#include "MayDay.H"
#include "Misc.H"
#include "BaseNamespaceHeader.H"
#include "BaseNamespaceFooter.H"
#include "SPMDI.H"
Include dependency graph for SPMD.H:
This graph shows which files directly or indirectly include this file:

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 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
 
long long CH_MAX_MPI_MESSAGE_SIZE
 
long long CH_MaxMPISendSize
 
long long CH_MaxMPIRecvSize
 

Macro Definition Documentation

◆ _SPMD_H_

#define _SPMD_H_

Function Documentation

◆ reportMPIStats()

int reportMPIStats ( )

◆ procID()

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(), gatherBoxesAndOffsets(), linearOut(), MergeSolver< T >::solve(), and write().

◆ CHprocID()

int CHprocID ( )
inline

◆ numProc()

unsigned int numProc ( )

number of parallel processes

Returns the number of parallel processes running. Always returns at least 1.

Referenced by CHprocID(), gatherBoxesAndOffsets(), getOffsets(), linearOut(), and BoxLayoutData< EBFluxFAB >::unpackReceivesToMe_append().

◆ barrier()

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

◆ linearSize() [1/15]

template<class T >
int linearSize ( const T &  inputT)

◆ linearIn() [1/15]

template<class T >
void linearIn ( T &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [1/15]

template<class T >
void linearOut ( void *const  a_outBuf,
const T &  inputT 
)

◆ broadcast()

template<class T >
void broadcast ( T &  a_inAndOut,
int  a_src 
)
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(), and linearOut().

◆ linearSize() [2/15]

template<>
int linearSize ( const int &  a_input)

◆ linearSize() [3/15]

template<>
int linearSize ( const unsigned long long &  a_input)

◆ linearIn() [2/15]

template<>
void linearIn ( int &  a_outputT,
const void *const  inBuf 
)

◆ linearIn() [3/15]

template<>
void linearIn ( unsigned long long &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [2/15]

template<>
void linearOut ( void *const  a_outBuf,
const int &  a_inputT 
)

◆ linearOut() [3/15]

template<>
void linearOut ( void *const  a_outBuf,
const unsigned long long &  a_inputT 
)

◆ linearSize() [4/15]

template<>
int linearSize ( const long &  a_input)

◆ linearIn() [4/15]

template<>
void linearIn ( long &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [4/15]

template<>
void linearOut ( void *const  a_outBuf,
const long &  a_inputT 
)

◆ linearSize() [5/15]

template<>
int linearSize ( const unsigned long &  a_input)

◆ linearIn() [5/15]

template<>
void linearIn ( unsigned long &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [5/15]

template<>
void linearOut ( void *const  a_outBuf,
const unsigned long &  a_inputT 
)

◆ linearSize() [6/15]

template<>
int linearSize ( const float &  a_input)

◆ linearSize() [7/15]

template<>
int linearSize ( const double &  a_input)

◆ linearIn() [6/15]

template<>
void linearIn ( float &  a_outputT,
const void *const  a_inBuf 
)

◆ linearIn() [7/15]

template<>
void linearIn ( double &  a_outputT,
const void *const  a_inBuf 
)

◆ linearOut() [6/15]

template<>
void linearOut ( void *const  a_outBuf,
const float &  a_inputT 
)

◆ linearOut() [7/15]

template<>
void linearOut ( void *const  a_outBuf,
const double &  a_inputT 
)

◆ linearSize() [8/15]

template<>
int linearSize ( const std::string &  a_input)

◆ linearIn() [8/15]

template<>
void linearIn ( std::string &  a_outputT,
const void *const  a_inBuf 
)

◆ linearOut() [8/15]

template<>
void linearOut ( void *const  a_outBuf,
const std::string &  a_inputT 
)

◆ linearSize() [9/15]

template<>
int linearSize ( const Vector< int > &  a_input)

◆ linearIn() [9/15]

template<>
void linearIn ( Vector< int > &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [9/15]

template<>
void linearOut ( void *const  a_outBuf,
const Vector< int > &  a_inputT 
)

◆ linearSize() [10/15]

template<>
int linearSize ( const Vector< unsigned long long > &  a_input)

◆ linearIn() [10/15]

template<>
void linearIn ( Vector< unsigned long long > &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [10/15]

template<>
void linearOut ( void *const  a_outBuf,
const Vector< unsigned long long > &  a_inputT 
)

◆ linearSize() [11/15]

template<>
int linearSize ( const Vector< long > &  a_input)

◆ linearIn() [11/15]

template<>
void linearIn ( Vector< long > &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [11/15]

template<>
void linearOut ( void *const  a_outBuf,
const Vector< long > &  a_inputT 
)

◆ linearSize() [12/15]

template<>
int linearSize ( const Vector< float > &  a_input)

◆ linearIn() [12/15]

template<>
void linearIn ( Vector< float > &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [12/15]

template<>
void linearOut ( void *const  a_outBuf,
const Vector< float > &  a_inputT 
)

◆ linearSize() [13/15]

template<>
int linearSize ( const Vector< double > &  a_input)

◆ linearIn() [13/15]

template<>
void linearIn ( Vector< double > &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [13/15]

template<>
void linearOut ( void *const  a_outBuf,
const Vector< double > &  a_inputT 
)

◆ linearSize() [14/15]

template<>
int linearSize ( const Vector< std::string > &  a_input)

◆ linearIn() [14/15]

template<>
void linearIn ( Vector< std::string > &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [14/15]

template<>
void linearOut ( void *const  a_outBuf,
const Vector< std::string > &  a_inputT 
)

◆ linearSize() [15/15]

template<>
int linearSize ( const Vector< Vector< int > > &  a_input)

◆ linearIn() [15/15]

template<>
void linearIn ( Vector< Vector< int > > &  a_outputT,
const void *const  inBuf 
)

◆ linearOut() [15/15]

template<>
void linearOut ( void *const  a_outBuf,
const Vector< Vector< int > > &  a_inputT 
)

◆ linearListSize()

template<class T >
int linearListSize ( const Vector< T > &  a_input)

◆ linearListIn()

template<class T >
void linearListIn ( Vector< T > &  a_outputT,
const void *const  a_inBuf 
)

◆ linearListOut()

template<class T >
void linearListOut ( void *const  a_outBuf,
const Vector< T > &  a_inputT 
)

◆ GetPID()

int GetPID ( int  rank)

◆ GetRank()

int GetRank ( int  pid)

◆ uniqueProc()

int uniqueProc ( const SerialTask::task a_task)

Referenced by getOffsets().

Variable Documentation

◆ num_procs

int num_procs

◆ CH_MAX_MPI_MESSAGE_SIZE

long long CH_MAX_MPI_MESSAGE_SIZE

◆ CH_MaxMPISendSize

long long CH_MaxMPISendSize

◆ CH_MaxMPIRecvSize

long long CH_MaxMPIRecvSize