1 #ifndef PROFILER_SRC_MOLPRO_PROFILER_MPI_H_
2 #define PROFILER_SRC_MOLPRO_PROFILER_MPI_H_
7 #if defined(OMPI_MPI_H) || defined(MPI_INCLUDED)
16 #define MPI_Comm_c2f(x) x
17 using MPI_Comm = int64_t;
18 #define MPI_COMM_NULL 0
19 #define MPI_WIN_NULL 0
20 #define MPI_INFO_NULL 0
21 using MPI_Win = int64_t;
22 inline void _MPI_nullfunction(
const void* x) {}
23 #define MPI_Barrier(x) _MPI_nullfunction(&x)
24 #define MPI_Win_free(x) _MPI_nullfunction(x)
25 #define MPI_Win_allocate(x1, x2, x3, x4, x5, x6) _MPI_nullfunction(x5)
26 #define MPI_Win_lock(x1, x2, x3, x4) _MPI_nullfunction(&x4)
27 #define MPI_Win_unlock(x1, x2) _MPI_nullfunction(&x2)
50 MPI_Initialized(&flag);
73 MPI_Initialized(&flag);
76 return MPI_COMM_WORLD;
86 return MPI_Comm_f2c(PPIDD_Worker_comm());
90 if (GA_MPI_Comm() != NULL && GA_MPI_Comm() != MPI_COMM_NULL) {
96 return MPI_COMM_WORLD;
int finalize()
In MPI environment finalize; otherwise do nothing.
int rank_global()
Definition: mpi.h:109
MPI_Comm comm_self()
Return MPI_COMM_SELF in an MPI program, or an appropriate dummy if not.
Definition: mpi.h:47
MPI_Comm comm_global()
Return the MPI communicator containing all processes available for participation in computation....
Definition: mpi.h:70
int init()
In MPI environment initialize; otherwise do nothing. Intended to support MPI-agnostic programs.
int size_global()
Definition: mpi.h:101