Added functions for pinning memory that is sent over the network. TODO pack to and from pinned memory selectively (currently P2P results are overwritten with data in pinned memory)

This commit is contained in:
jpekkila
2020-04-06 14:09:12 +03:00
parent cc9d3f1b9c
commit 37f1c841a3
2 changed files with 229 additions and 0 deletions

View File

@@ -5,12 +5,17 @@
#include <mpi.h>
#define AC_MPI_UNIDIRECTIONAL_COMM (0)
#define AC_MPI_RT_PINNING (1)
#endif // AC_MPI_ENABLED
typedef struct {
int3 dims;
AcReal* data;
#if (AC_MPI_ENABLED && AC_MPI_RT_PINNING)
AcReal* data_pinned;
#endif // (AC_MPI_ENABLED && AC_MPI_RT_PINNING)
#if (AC_MPI_ENABLED && AC_MPI_UNIDIRECTIONAL_COMM)
MPI_Win win; // MPI window for RMA
#endif // (AC_MPI_ENABLED && AC_MPI_UNIDIRECTIONAL_COMM)