diff options
author | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 1999-06-24 12:40:02 +0000 |
---|---|---|
committer | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 1999-06-24 12:40:02 +0000 |
commit | 8e35b92e7c6989ce709c18680379afcb0a3f763b (patch) | |
tree | eb2a0c2ebe7775338f18ec340eb94532d4cdc329 /src/include/pugh.h | |
parent | 8c90c44c03159a9d1aeee1074ddcfa9fcf12d7b5 (diff) |
Enabled pugh to handle all CCTK_VARIABLE_??? types in communication.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@61 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/include/pugh.h')
-rw-r--r-- | src/include/pugh.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/include/pugh.h b/src/include/pugh.h index 3589a4d..15154d3 100644 --- a/src/include/pugh.h +++ b/src/include/pugh.h @@ -24,7 +24,7 @@ */ /* include the system dependent defines */ -#include "config.h" +#include "cctk.h" /* FIXME */ /* 3 ways up shutting down: */ @@ -59,13 +59,34 @@ void cactus_free(void *); #include "mpi.h" #endif -/* Handle precision */ +/*** + Define the different datatypes used for MPI communication + NOTE: the complex datatype is defined in SetupPGH.c + ***/ +/* char type is easy */ +#define PUGH_MPI_CHAR MPI_CHAR + +/* floating points are precision-dependent */ +#define PUGH_MPI_REAL4 MPI_FLOAT #ifdef SINGLE_PRECISION -#define PUGH_MPI_TYPE MPI_FLOAT +#define PUGH_MPI_REAL MPI_FLOAT #else -#define PUGH_MPI_TYPE MPI_DOUBLE +#define PUGH_MPI_REAL MPI_DOUBLE +#endif + +/* integers are architecture specific: + PUGH_MPI_INT is used for communicating CCTK_INTs + PUGH_MPI_INT4 is used to explicitely communicate 4 byte integers */ +#ifdef CCTK_INTEGER_PRECISION_8 +#define PUGH_MPI_INT (sizeof (int) == 8 ? MPI_INT : MPI_LONG) +#elif CCTK_INTEGER_PRECISION_4 +#define PUGH_MPI_INT (sizeof (int) == 8 ? MPI_SHORT : MPI_INT) +#elif CCTK_INTEGER_PRECISION_2 +#define PUGH_MPI_INT MPI_SHORT #endif +#define PUGH_MPI_INT4 (sizeof (int) == 8 ? MPI_SHORT : MPI_INT) + #include "pugh_constants.h" #include "pGF.h" |