From 0d4a692225165fe4a87a01ab81c9d8b5579a4484 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 15 Jul 2008 12:15:02 -0500 Subject: CarpetInterp2: Use dist namespace when creating MPI datatype --- Carpet/CarpetInterp2/src/fasterp.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Carpet/CarpetInterp2') diff --git a/Carpet/CarpetInterp2/src/fasterp.cc b/Carpet/CarpetInterp2/src/fasterp.cc index 44a2e8d6d..1c945710f 100644 --- a/Carpet/CarpetInterp2/src/fasterp.cc +++ b/Carpet/CarpetInterp2/src/fasterp.cc @@ -26,10 +26,10 @@ namespace CarpetInterp2 { if (not initialised) { static fasterp_iloc_t s; #define ARRSIZE(m) (sizeof(s.m) / sizeof(s.m[0])) -#define OFFSET(m) ((char*)&(s.m) - (char*)&(s)) +#define OFFSET(m) ((char*)&(s.m) - (char*)&(s)) // offsetof doesn't work (why?) #define SIZE (sizeof(s)) CCTK_REAL rdummy; - mpi_struct_descr_t const descr[] = { + dist::mpi_struct_descr_t const descr[] = { { 1, OFFSET(m ), MPI_INT }, { 1, OFFSET(rl ), MPI_INT }, { 1, OFFSET(c ), MPI_INT }, @@ -40,7 +40,8 @@ namespace CarpetInterp2 { #undef ARRSIZE #undef OFFSET #undef SIZE - create_mpi_datatype (sizeof(descr) / sizeof(descr[0]), descr, newtype); + dist::create_mpi_datatype + (sizeof(descr) / sizeof(descr[0]), descr, newtype); initialised = true; } return newtype; -- cgit v1.2.3