14 #ifndef COMMUNICATOR_MPI_INCLUDED
15 #define COMMUNICATOR_MPI_INCLUDED
34 static int init(
int *pargc,
char ***pargv);
38 static int setup(
int ninstance = 1);
40 static int setup(
const std::vector<int>& lattice_size,
41 std::vector<int>& grid_size,
47 #ifdef ENABLE_MULTI_INSTANCE
48 static bool is_primary_master();
54 #ifdef ENABLE_MULTI_INSTANCE
55 static int self_global();
56 static int world_id();
68 #ifdef ENABLE_MULTI_INSTANCE
69 static int sync_global();
81 static int reduce(
int count,
void *recv_buf,
void *send_buf, MPI_Datatype
type, MPI_Op op,
int pattern);
82 static int broadcast(
size_t size,
void *data,
int sender);
83 static int exchange(
size_t size,
void *recv_buf,
void *send_buf,
int idir,
int ipm,
int tag);
85 static int send_1to1(
size_t size,
void *recv_buf,
void *send_buf,
int send_to,
int recv_from,
int tag);
105 #ifdef ENABLE_MULTI_INSTANCE
106 static int m_n_instance;
107 static int m_instance_id;
109 static int m_global_rank;
110 static int m_global_size;
static int send_1to1(size_t size, void *recv_buf, void *send_buf, int send_to, int recv_from, int tag)
static int broadcast(size_t size, void *data, int sender)
static char default_grid_map[16]
static int setup(int ninstance=1)
Channel class for asynchronous communication.
static int init(int *pargc, char ***pargv)
Layout class for logical organisation of parallel nodes.
static MPI_Comm & world()
retrieves current communicator.
static int broadcast_string(int count, string &data, int sender)
Communicator_impl & operator=(const Communicator_impl &)
static int reduce(int count, void *recv_buf, void *send_buf, MPI_Datatype type, MPI_Op op, int pattern)
static Channel * recv_init(int count, int idir, int ipm)
static Channel * send_init(int count, int idir, int ipm)
Communicator_impl(const Communicator_impl &)
MPI-realisation of communicator class implementation.
static int exchange(size_t size, void *recv_buf, void *send_buf, int idir, int ipm, int tag)