From ac8adc4833daa18913ee765132345ad1c1a228b9 Mon Sep 17 00:00:00 2001 From: eschnett Date: Sat, 2 Oct 2010 18:26:12 +0000 Subject: Add MPI_Bcast in the case that there is no MPI Fix data type incompatibility in that case as well [Patch from Ian Hinder] git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@73 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8 --- src/slab.cc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/slab.cc b/src/slab.cc index 17ddb0c..3af399a 100644 --- a/src/slab.cc +++ b/src/slab.cc @@ -219,6 +219,16 @@ MPI_Barrier (MPI_Comm comm) return 0; } +static int +MPI_Bcast (void * buffer, int count, + MPI_Datatype datatype, int root, MPI_Comm comm) +{ + assert (buffer); + assert (count >= 0); + assert (root == 0); + return 0; +} + static int MPI_Comm_size (MPI_Comm comm, int * size) { @@ -381,16 +391,16 @@ Slab_InitMPIDatatypes () #ifndef CCTK_MPI switch (sizeof(int)) { #ifdef HAVE_CCTK_INT1 - case sizeof(CCTK_INT1): MPI_INT = CCTK_VARIABLE_INT1; break; + case sizeof(CCTK_INT1): MPI_INT = CACTUS_MPI_INT1; break; #endif #ifdef HAVE_CCTK_INT2 - case sizeof(CCTK_INT2): MPI_INT = CCTK_VARIABLE_INT2; break; + case sizeof(CCTK_INT2): MPI_INT = CACTUS_MPI_INT2; break; #endif #ifdef HAVE_CCTK_INT4 - case sizeof(CCTK_INT4): MPI_INT = CCTK_VARIABLE_INT4; break; + case sizeof(CCTK_INT4): MPI_INT = CACTUS_MPI_INT4; break; #endif #ifdef HAVE_CCTK_INT8 - case sizeof(CCTK_INT8): MPI_INT = CCTK_VARIABLE_INT8; break; + case sizeof(CCTK_INT8): MPI_INT = CACTUS_MPI_INT8; break; #endif default: assert(0); } -- cgit v1.2.3