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,
Lekshmi
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.
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
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
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.
Best,Hans Ekkehard
--
Prof. Dr. Hans Ekkehard PlesserHead, Data Science Section
Faculty of Science and TechnologyNorwegian 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