From c6c1afe2acc4a4ee234da78b43e40ddb5a8a9b59 Mon Sep 17 00:00:00 2001
From: Michael Kuron <mkuron@icp.uni-stuttgart.de>
Date: Tue, 4 Aug 2020 11:08:13 +0200
Subject: [PATCH] Disable dlopen trick on OpenMPI >= 3.0.0

---
 src/python_coupling/helper/ModuleInit.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/python_coupling/helper/ModuleInit.cpp b/src/python_coupling/helper/ModuleInit.cpp
index 0058c7a71..e917ff50b 100644
--- a/src/python_coupling/helper/ModuleInit.cpp
+++ b/src/python_coupling/helper/ModuleInit.cpp
@@ -26,7 +26,7 @@
 #include "core/debug/CheckFunctions.h"
 
 // Workaround for OpenMPI library: it dynamically loads plugins which causes trouble when walberla itself is a shared lib
-#if defined(OPEN_MPI) && !defined(_WIN32)
+#if defined(OPEN_MPI) && !defined(_WIN32) && OMPI_MAJOR_VERSION < 3
 #define OPEN_MPI_WORKAROUND
 #include <dlfcn.h>
 #endif
-- 
GitLab