diff options
author | eschnett <eschnett@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2010-10-02 18:26:12 +0000 |
---|---|---|
committer | eschnett <eschnett@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2010-10-02 18:26:12 +0000 |
commit | ac8adc4833daa18913ee765132345ad1c1a228b9 (patch) | |
tree | 94e6f99392f13502032bf91be59a7c8d363a0336 | |
parent | 0b05f14aa0d2d7fd6ec45c78a10a2ac58cff734b (diff) |
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
-rw-r--r-- | src/slab.cc | 18 |
1 files 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 @@ -220,6 +220,16 @@ MPI_Barrier (MPI_Comm comm) } 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) { *size = 1; @@ -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); } |