diff --git a/src/STUBS/mpi.cpp b/src/STUBS/mpi.cpp index 5fd6ad7795..43e0a7f02d 100644 --- a/src/STUBS/mpi.cpp +++ b/src/STUBS/mpi.cpp @@ -86,6 +86,11 @@ void MPI_Wait(MPI_Request *request, MPI_Status *status) printf("MPI Stub WARNING: Should not wait on message from self\n"); } +void MPI_Waitall(int n, MPI_Request *request, MPI_Status *status) +{ + printf("MPI Stub WARNING: Should not wait on message from self\n"); +} + void MPI_Waitany(int count, MPI_Request *request, int *index, MPI_Status *status) { diff --git a/src/STUBS/mpi.h b/src/STUBS/mpi.h index 2da314a7c0..654c9d5a95 100644 --- a/src/STUBS/mpi.h +++ b/src/STUBS/mpi.h @@ -11,6 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------ */ +#ifndef MPI_STUBS +#define MPI_STUBS + /* Dummy defs for MPI stubs */ #define MPI_COMM_WORLD 0 @@ -25,12 +28,19 @@ #define MPI_MAX 2 #define MPI_MIN 3 +#define MPI_ANY_SOURCE -1 + #define MPI_Comm int #define MPI_Request int -#define MPI_Status int #define MPI_Datatype int #define MPI_Op int +/* MPI data structs */ + +struct MPI_Status { + int MPI_SOURCE; +}; + /* Function prototypes for MPI stubs */ void MPI_Init(int *argc, char ***argv); @@ -49,6 +59,7 @@ void MPI_Recv(void *buf, int count, MPI_Datatype datatype, void MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request); void MPI_Wait(MPI_Request *request, MPI_Status *status); +void MPI_Waitall(int n, MPI_Request *request, MPI_Status *status); void MPI_Waitany(int count, MPI_Request *request, int *index, MPI_Status *status); void MPI_Sendrecv(void *sbuf, int scount, MPI_Datatype sdatatype, @@ -86,3 +97,5 @@ void MPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, void MPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm); + +#endif