From dcbd2cbadc5568f97ca14e8bce2a355a813c85eb Mon Sep 17 00:00:00 2001 From: schnetter Date: Wed, 28 Jul 2004 09:35:56 +0000 Subject: Define MPI_INT when compiling without MPI. git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@35 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8 --- src/slab.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/slab.c b/src/slab.c index e1b4ada..f2bc3bd 100644 --- a/src/slab.c +++ b/src/slab.c @@ -192,6 +192,8 @@ typedef enum { CACTUS_MPI_COMPLEX32 = CCTK_VARIABLE_COMPLEX32 } MPI_Datatype; +static MPI_Datatype MPI_INT; + typedef enum { MPI_MIN, MPI_MAX } MPI_Op; static int @@ -330,6 +332,24 @@ Slab_InitMPIDatatypes (void) MPI_Type_commit (&CACTUS_MPI_COMPLEX32); # endif #endif + +#ifndef CCTK_MPI + switch (sizeof(int)) { +#ifdef CCTK_INT1 + case sizeof(CCTK_INT1): MPI_INT = CCTK_VARIABLE_INT1; break; +#endif +#ifdef CCTK_INT2 + case sizeof(CCTK_INT2): MPI_INT = CCTK_VARIABLE_INT2; break; +#endif +#ifdef CCTK_INT4 + case sizeof(CCTK_INT4): MPI_INT = CCTK_VARIABLE_INT4; break; +#endif +#ifdef CCTK_INT8 + case sizeof(CCTK_INT8): MPI_INT = CCTK_VARIABLE_INT8; break; +#endif + default: assert(0); + } +#endif } -- cgit v1.2.3