diff options
author | schnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2009-01-27 20:29:53 +0000 |
---|---|---|
committer | schnetter <schnetter@2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8> | 2009-01-27 20:29:53 +0000 |
commit | 08ad05622b1cb8233942a1cecc0bc29d04407c98 (patch) | |
tree | a4bce918dc7fc3c19ba7868e2688c2c7215c6a0c | |
parent | 5efc3f1a5ba813a6495b7d4ad4829a4a15e8a51d (diff) |
Do not require MPI
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@59 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8
-rw-r--r-- | src/slab.c | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -43,6 +43,9 @@ #ifdef CCTK_MPI # include <mpi.h> +# define HAVE_MPI 1 +#else +# define HAVE_MPI 0 #endif #include "slab.h" @@ -300,6 +303,30 @@ MPI_Allreduce (void * sendbuf, void * recvbuf, int count, return 0; } +typedef int MPI_Request; /* dummy */ +typedef int MPI_Status; /* dummy */ + +static int +MPI_Irecv (void *buf, int count, MPI_Datatype datatype, + int source, int tag, MPI_Comm comm, MPI_Request *request) +{ + abort(); +} + +static int +MPI_Isend (void *buf, int count, MPI_Datatype datatype, int dest, + int tag, MPI_Comm comm, MPI_Request *request) +{ + abort(); +} + +static int +MPI_Waitall (int count, MPI_Request *array_of_requests, + MPI_Status *array_of_statuses) +{ + abort(); +} + #endif @@ -1356,7 +1383,7 @@ Slab_MultiTransfer (cGH const * restrict const cctk CCTK_TimerStartI (timer_xfer); ifdebug fflush (stdout); - if (use_alltoallv) { + if (! HAVE_MPI || use_alltoallv) { MPI_Alltoallv (srcdata, srccount, srcoffset, srcdatatype, dstdata, dstcount, dstoffset, dstdatatype, comm); |