aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2004-07-28 09:35:56 +0000
committerschnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8>2004-07-28 09:35:56 +0000
commitdcbd2cbadc5568f97ca14e8bce2a355a813c85eb (patch)
tree426b5c0a9c3a19618b0c9853f7b8eb02f7239f6b
parent61c1c7243f4d6e401deb99fb93730afdcae4b9e6 (diff)
Define MPI_INT when compiling without MPI.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@35 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8
-rw-r--r--src/slab.c20
1 files changed, 20 insertions, 0 deletions
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
}