mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-04 19:25:56 +01:00
MPI3 and shared memory support
This commit is contained in:
parent
c7cccaaa69
commit
5fe2b85cbd
@ -34,6 +34,9 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
|||||||
#ifdef GRID_COMMS_MPI
|
#ifdef GRID_COMMS_MPI
|
||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef GRID_COMMS_MPI3
|
||||||
|
#include <mpi.h>
|
||||||
|
#endif
|
||||||
#ifdef GRID_COMMS_SHMEM
|
#ifdef GRID_COMMS_SHMEM
|
||||||
#include <mpp/shmem.h>
|
#include <mpp/shmem.h>
|
||||||
#endif
|
#endif
|
||||||
@ -52,6 +55,29 @@ class CartesianCommunicator {
|
|||||||
#ifdef GRID_COMMS_MPI
|
#ifdef GRID_COMMS_MPI
|
||||||
MPI_Comm communicator;
|
MPI_Comm communicator;
|
||||||
typedef MPI_Request CommsRequest_t;
|
typedef MPI_Request CommsRequest_t;
|
||||||
|
#elif GRID_COMMS_MPI3
|
||||||
|
MPI_Comm communicator;
|
||||||
|
typedef MPI_Request CommsRequest_t;
|
||||||
|
|
||||||
|
const int MAXLOG2RANKSPERNODE = 16; // 65536 ranks per node adequate for now
|
||||||
|
|
||||||
|
std::vector<int> WorldDims;
|
||||||
|
std::vector<int> GroupDims;
|
||||||
|
std::vector<int> ShmDims;
|
||||||
|
|
||||||
|
std::vector<int> GroupCoor;
|
||||||
|
std::vector<int> ShmCoor;
|
||||||
|
std::vector<int> WorldCoor;
|
||||||
|
|
||||||
|
int GroupRank;
|
||||||
|
int ShmRank;
|
||||||
|
int WorldRank;
|
||||||
|
|
||||||
|
int GroupSize;
|
||||||
|
int ShmSize;
|
||||||
|
int WorldSize;
|
||||||
|
|
||||||
|
std::vector<int> LexicographicToWorldRank;
|
||||||
#else
|
#else
|
||||||
typedef int CommsRequest_t;
|
typedef int CommsRequest_t;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user