H Hans, Hi Benjamin,

    Some months back, one of our colleague had some issues and we fixed it with the following command:

cmake -DCMAKE_INSTALL_PREFIX:PATH=/../NEST/bld -DCMAKE_C_COMPILER=gcc -DOpenMP_C_FLAGS="-fopenmp -I/usr/local/opt/libomp/include" -DOpenMP_C_LIB_NAMES="omp" -DOpenMP_omp_LIBRARY=/usr/local/opt/libomp -DCMAKE_CXX_COMPILER=g++ -DOpenMP_CXX_FLAGS="-fopenmp -I/usr/local/opt/libomp/include" -DOpenMP_CXX_LIB_NAMES="omp" /../NEST/nest-simulator

Best regards,


On 29.10.19 16:04, Hans Ekkehard Plesser wrote:

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" \
      -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


which will make macOS ignore the duplicate libraries. Tests then pass, but behavior may be unpredictable.

Alternatively, one can create a Conda environment without MKL as describe on StackOverflow (https://stackoverflow.com/questions/38345519/how-to-install-scipy-without-mkl). I haven't tested this yet.

I also tried compiling with the Apple Clang, configuring as

   -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

based on https://iscinumpy.gitlab.io/post/omp-on-high-sierra/, but this failed when linking, since the library information probably is not used properly by our CMake script.

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

NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org
Rajalekshmi Deepu
Simulation Lab Neuroscience
Division HPC in Neuroscience         Phone:  +49 2461 61 8945
Jülich Supercomputing Centre (JSC)   E-mail: r.deepu@fz-juelich.de
Institute for Advanced Simulation    http://www.fz-juelich.de/ias/jsc
Forschungszentrum Jülich GmbH