Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab_mpi.h
Go to the documentation of this file.
1 #ifndef MOAB_MPI_H
2 #define MOAB_MPI_H
3 #include "moab_mpi_config.h"
4 // following is to disable inclusion of an openmpi header that causes a compile warning
5 // since we don't use c++ mpi bindings, we don't need it, and doing this allows us to mark warnings as errors
6 #define OMPI_SKIP_MPICXX 1
7 
8 #ifndef __cplusplus
9 #include <mpi.h>
10 #elif !defined( MB_MPI_CXX_CONFLICT )
11 #ifndef MPICH_IGNORE_CXX_SEEK
12 #define MPICH_IGNORE_CXX_SEEK
13 #endif
14 #include <mpi.h>
15 #else
16 #include <stdio.h>
17 #ifdef SEEK_SET
18 #undef SEEK_SET
19 #ifdef MB_SEEK_SET
20 #define MB_RESTORE_SEEK_SET
21 #endif
22 #endif
23 #ifdef SEEK_CUR
24 #undef SEEK_CUR
25 #ifdef MB_SEEK_CUR
26 #define MB_RESTORE_SEEK_CUR
27 #endif
28 #endif
29 #ifdef SEEK_END
30 #undef SEEK_END
31 #ifdef MB_SEEK_END
32 #define MB_RESTORE_SEEK_END
33 #endif
34 #endif
35 #include <mpi.h>
36 #ifdef MB_RESTORE_SEEK_SET
37 #undef MB_RESTORE_SEEK_SET
38 #define SEEK_SET MB_SEEK_SET
39 #endif
40 #ifdef MB_RESTORE_SEEK_CUR
41 #undef MB_RESTORE_SEEK_CUR
42 #define SEEK_CUR MB_SEEK_CUR
43 #endif
44 #ifdef MB_RESTORE_SEEK_END
45 #undef MB_RESTORE_SEEK_END
46 #define SEEK_END MB_SEEK_END
47 #endif
48 #endif
49 
50 #endif