Skip to content

Commit 878b9ab

Browse files
committed
Workaround for compiler error with OpenMPI
See open-mpi/ompi#5157 (comment) for an explanation of this "hack that you can do that's gross but safe". I agree that it's gross but they've at least got their workaround macro nicely namespaced so it shouldn't interact with other code or other MPI implementations. Without some workaround, including OpenMPI's mpi.h in C++ code is a compiler warning on many compilers and a compiler *error* on others, including the last couple g++ releases. I can't build nekRS without this.
1 parent 280acd2 commit 878b9ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/nrssys.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
#define dlongString "long long int"
5858
#endif
5959

60+
// Workaround for https://github.com/open-mpi/ompi/issues/5157
61+
#define OMPI_SKIP_MPICXX 1
62+
6063
#include <mpi.h>
6164
#include "occa.hpp"
6265
#include "ogs.hpp"

0 commit comments

Comments
 (0)