src/include/h5core/h5.h

- typedef MPI_Comm to int if we compile serial code
- suppress warning about unused variables in definition of MPI_Comm_size() and MPI_Comm_rank()
This commit is contained in:
2015-10-08 16:57:12 +02:00
parent 73c07240c2
commit 4e42972ebb
+3 -2
View File
@@ -15,9 +15,10 @@
// dummy MPI calls for serial code
#if !defined (PARALLEL_IO)
typedef int MPI_Comm;
#define MPI_Init(argc, argv)
#define MPI_Comm_size(comm, nprocs) { *nprocs = 1; }
#define MPI_Comm_rank(comm, myproc) { *myproc = 0; }
#define MPI_Comm_size(comm, nprocs) {(void)comm; *nprocs = 1; }
#define MPI_Comm_rank(comm, myproc) {(void)comm; *myproc = 0; }
#define MPI_Finalize()
#define MPI_COMM_WORLD (0)
#define MPI_COMM_SELF (1)