18#ifndef __ESCRIPT_ESYSMPI_H__
19#define __ESCRIPT_ESYSMPI_H__
23#include <escript/DataTypes.h>
28#include <boost/shared_ptr.hpp>
37#ifdef ESYS_INDEXTYPE_LONG
38#define MPI_DIM_T MPI_LONG
40#define MPI_DIM_T MPI_INT
50 #define MPI_COMM_WORLD 91
51 #define MPI_COMM_NULL 0
58 #define MPI_OP_NULL 17
71 return ((
'S'<< 24) + (
'u' << 16) + (
'b' << 8) +
'W')%1010201;
76typedef boost::shared_ptr<JMPI_>
JMPI;
104 const int q = k/size;
120 std::stringstream ss;
121 ss << fileName <<
'.';
134 return msg_tag_counter;
143 msg_tag_counter %= 1010201;
149 msg_tag_counter = value%1010201;
165#pragma clang diagnostic push
166#pragma clang diagnostic ignored "-Wunused-private-field"
168#pragma clang diagnostic pop
201 out=((double) clock())/CLOCKS_PER_SEC;
#define MPI_COMM_NULL
Definition EsysMPI.h:51
int MPI_Op
Definition EsysMPI.h:46
int MPI_Request
Definition EsysMPI.h:45
int MPI_Comm
Definition EsysMPI.h:44
int MPI_Status
Definition EsysMPI.h:47
int mod_rank(int k) const
Definition EsysMPI.h:99
void incCounter(int i=1)
increments the message tag counter by i
Definition EsysMPI.h:138
bool isValid() const
returns true if this has a valid MPI communicator
Definition EsysMPI.h:153
void setCounter(int value)
sets the message tag counter to value
Definition EsysMPI.h:147
int msg_tag_counter
Definition EsysMPI.h:169
bool ownscomm
Definition EsysMPI.h:167
std::string appendRankToFileName(const std::string &fileName) const
appends MPI rank to a file name if MPI size > 1
Definition EsysMPI.h:116
int counter() const
returns the current value of the message tag counter
Definition EsysMPI.h:132
int size
Definition EsysMPI.h:158
MPI_Comm comm
Definition EsysMPI.h:160
int rank
Definition EsysMPI.h:159
NoCOMM_WORLD()
Definition EsysMPI.cpp:224
~NoCOMM_WORLD()
Definition EsysMPI.cpp:232
static bool active()
Definition EsysMPI.cpp:237
#define ESCRIPT_DLL_API
Definition escriptcore/src/system_dep.h:30
index_t dim_t
Definition DataTypes.h:66
int index_t
type for array/matrix indices used both globally and on each rank
Definition DataTypes.h:61
Definition AbstractContinuousDomain.cpp:23
bool checkResult(int res, int &mres, const JMPI &info)
Everyone puts in their error code and everyone gets the largest one.
Definition EsysMPI.cpp:110
int getSubWorldTag()
tag reserved for use by SubWorld code This value should be higher than the modulus used in JMPI_::set...
Definition EsysMPI.h:69
JMPI makeInfo(MPI_Comm comm, bool owncom)
Definition EsysMPI.cpp:29
double gettime()
returns the current ticks for timing
Definition EsysMPI.h:192
bool shipString(const char *src, char **dest, MPI_Comm &comm)
Definition EsysMPI.cpp:164
boost::shared_ptr< JMPI_ > JMPI
Definition EsysMPI.h:76