Hi Benjamin,
Thanks for asking, I have not continued to install nest on osx. I guess I will simply use
a vm with Ubuntu for the simulation.
Sorry we didn't get any further for now, but good that you have a work-around
available.
But since you’re asking: are you aware of an example of music in python that uses a
chain-like architecture? I only found one in c++.
I do now know one off-hand, but maybe someone else on the list does.
Best,
Hans Ekkehard
Best,
Benjamin
Am 06.11.2019 um 16:54 schrieb Hans Ekkehard Plesser
<hans.ekkehard.plesser@nmbu.no<mailto:hans.ekkehard.plesser@nmbu.no>>:
Hi Benjamin,
Have you made any progress in the meantime? Unfortunately, I have only very limited time
to explore this at the moment.
Best,
Hans Ekkehard
On 29 Oct 2019, at 20:28, Benjamin Staude
<benjamin.staude@gmail.com<mailto:benjamin.staude@gmail.com>> wrote:
Hi Hans Ekkehard, hi Lakshmi,
Thank you for your suggestions, unfortunately none have worked for me so far. Here’s what
happened:
-----------------------------------------------------------
HANS EKKEHARDS FIRST OPTION
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
Here, the cmake command went through, but make failed during
Scanning dependencies of target nestkernel
with lots of errors like:
In file included from
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/clopath_archiving_node.cpp:26:
In file included from
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/kernel_manager.h:27:
In file included from
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/connection_manager.h:42:
In file included from
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/source_table.h:35:
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/mpi_manager.h:313:3:
error: use of undeclared identifier 'MPI'
MPI::Intracomm comm;
Also, I am not sure if that really built without OpenMP. At least cmake outputs
-- Found Cython: /Users/staude/.pyenv/shims/cython (found version "0.29.13")
-- Found OpenMP_C: -fopenmp=libomp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp=libomp (found version "3.1")
-- Found OpenMP: TRUE (found version "3.1")
and the Nest Configuration Summary says:
C compiler : /usr/local/opt/llvm/bin/clang
C compiler flags : -O2 -Wall -fopenmp=libomp
C++ compiler : /usr/local/opt/llvm/bin/clang++
C++ compiler flags : -std=c++11 -O2 -Wall -fopenmp=libomp
-----------------------------------------------------------
HANS EKKEHARDS SECOND OPTION
Haven’t tried yet, but also don’t know really what I would have to do in practice...
-----------------------------------------------------------
HANS EKKEHARDS THIRD OPTION
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
That indeed failed during linking:
[ 24%] Linking CXX shared library libsli.dylib
Undefined symbols for architecture x86_64:
"___kmpc_critical", referenced from:
SLIInterpreter::message(int, char const*, char const*, char const*) const in
interpret.cc.o
"___kmpc_end_critical", referenced from:
SLIInterpreter::message(int, char const*, char const*, char const*) const in
interpret.cc.o
"___kmpc_global_thread_num", referenced from:
SLIInterpreter::message(int, char const*, char const*, char const*) const in
interpret.cc.o
"_omp_in_parallel", referenced from:
Name::insert(std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&) in name.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [sli/libsli.dylib] Error 1
make[1]: *** [sli/CMakeFiles/sli_lib.dir/all] Error 2
make: *** [all] Error 2
-----------------------------------------------------------
LEKSHMIS OPTION
When running your command, cmake worked fine, but make results in
clang: error: unsupported option '-fopenmp’
Also, I need the -Dwith-mpi=ON -Dwith-music=ON flags. If I set them, I get the familiar
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
during cmake. This I can fix by using the g++-9 compiler. But then I get lots of errors
during make. They start during
Scanning dependencies of target nestkernel
and look like this:
In file included from
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/source_table.h:35,
from
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/connection_manager.h:42,
from
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/kernel_manager.h:27,
from
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/common_synapse_properties.cpp:27:
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/nestkernel/mpi_manager.h:313:3:
error: 'MPI' does not name a type; did you mean 'M_PI'?
313 | MPI::Intracomm comm;
| ^~~
| M_PI
On 29. Oct 2019, at 16:36, Rajalekshmi Deepu
<r.deepu@fz-juelich.de<mailto:r.deepu@fz-juelich.de>> wrote:
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 University of Life Sciences
PO Box 5003, 1432 Aas, Norway
Phone +47 6723 1560
Email hans.ekkehard.plesser(a)nmbu.no
Home
http://arken.nmbu.no/~plesser
_______________________________________________
NEST Users mailing list --
users@nest-simulator.org<mailto:users@nest-simulator.org>
To unsubscribe send an email to
users-leave@nest-simulator.org<mailto: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<mailto:r.deepu@fz-juelich.de>
Institute for Advanced Simulation
http://www.fz-juelich.de/ias/jsc
Forschungszentrum Jülich GmbH
-- -- --
Dr. Benjamin Staude | Paul-Lincke-Ufer 7 | 10999 Berlin |
benjamin.staude@gmail.com<mailto:benjamin.staude@gmail.com>
--
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(a)nmbu.no
Home
http://arken.nmbu.no/~plesser
--
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(a)nmbu.no
Home
http://arken.nmbu.no/~plesser