From 08ad05622b1cb8233942a1cecc0bc29d04407c98 Mon Sep 17 00:00:00 2001 From: schnetter Date: Tue, 27 Jan 2009 20:29:53 +0000 Subject: Do not require MPI git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/Slab/trunk@59 2e825fa2-fb71-486d-8b7f-a5ff3f0f6cb8 --- src/slab.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/slab.c b/src/slab.c index 40d8d84..f02848b 100644 --- a/src/slab.c +++ b/src/slab.c @@ -43,6 +43,9 @@ #ifdef CCTK_MPI # include +# 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); -- cgit v1.2.3