HiRep 0.1
Loading...
Searching...
No Matches
hr_mpi.h
Go to the documentation of this file.
1
6#ifndef HR_MPI_H
7#define HR_MPI_H
8
9//For OpenMPI we need to disable the non-standard C++ interface
10//this is enabled by defaults for C++ / CUDA code
11//if OpenMPI is compiled for supporting it
12//can be disabled re-compiling OpenMPI with configure --disable-mpi-cxx
13#ifdef WITH_MPI
14#define OMPI_SKIP_MPICXX
15#include <mpi.h>
16
17#define MPI_CHECK(stmt) \
18 do { \
19 int mpi_errno = (stmt); \
20 if (MPI_SUCCESS != mpi_errno) { \
21 char mesg[MPI_MAX_ERROR_STRING]; \
22 int mesglen; \
23 MPI_Error_string(mpi_eerno, mesg, &mesglen); \
24 lprintf("MPI", 0, "[%s] ERROR: %s\n", __func__, mesg); \
25 error(1, 1, "File: " __FILE__, " Line: " __LINE__); \
26 } \
27 } while (0)
28
29#endif
30
31#endif