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
On 29.10.19 16:04, Hans Ekkehard Plesser wrote:
Hi Benjamin,
This seems to be a deeper problem on OSX, see
https://stackoverflow.com/questions/58144137/gcc-missing-headers-on-macos10…
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-m…).
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 Plesser
Head, Data Science Section
Faculty of Science and Technology
Norwegian Universityof Life Sciences
PO Box 5003, 1432Aas, Norway
Phone +47 6723 1560
Emailhans.ekkehard.plesser(a)nmbu.no
Homehttp://arken.nmbu.no/~plesser
_______________________________________________
NEST Users mailing list -- users(a)nest-simulator.org
To unsubscribe send an email to users-leave(a)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(a)fz-juelich.de
Institute for Advanced Simulation