Hi Benjamin,
This seems to be a deeper problem on OSX, see
Interestingly, it works for me on Mojave.
The quick-fix would be to build NEST with MPI but without OpenMP using the Clang compiler.
With llvm and libomp from brew installed, the following also works for me
cmake -E env LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" \
cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/install \
-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ \
-Dwith-mpi=ON ../src
This builds NEST using the Clang compiler from llvm with OpenMP and MPI support. The only problem is that some Python tests crash, complaining about two different OpenMP libraries imported (libomp and libiomp5, where the latter comes from Anaconda's
MKL library). One can (with a certain risk of problems) set
KMP_DUPLICATE_LIB_OK=TRUE
which will make macOS ignore the duplicate libraries. Tests then pass, but behavior may be unpredictable.
I also tried compiling with the Apple Clang, configuring as
cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/install \
-DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp" -DOpenMP_CXX_LIB_NAMES="omp" \
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp" -DOpenMP_C_LIB_NAMES="omp" \
-DOpenMP_omp_LIBRARY=/usr/local/lib/libomp.dylib \
-Dwith-mpi=ON ../src
Best,
Hans Ekkehard
--
Prof. Dr. Hans Ekkehard Plesser
Head, Data Science Section
Faculty of Science and Technology
Norwegian
University of
Life Sciences
PO
Box 5003, 1432 Aas,
Norway
Phone
+47 6723 1560
Email hans.ekkehard.plesser@nmbu.no
Home http://arken.nmbu.no/~plesser