Hi Hans-Ekkehard,

While trying to manually install open-mpi I learned that my Xcode installation was out-of-date. After updating to Xcode 11, cmake went through and everything:

--------------------------------------------------------------------------------
NEST Configuration Summary
--------------------------------------------------------------------------------

Build type          : 
Target System       : Darwin
Cross Compiling     : FALSE
C compiler          : /usr/local/bin/gcc-9
C compiler flags    :  -O2 -Wall -fopenmp    -fdiagnostics-color=auto
C++ compiler        : /usr/local/bin/g++-9
C++ compiler flags  :  -std=c++11 -O2 -Wall -fopenmp  -fdiagnostics-color=auto
Build dynamic       : ON

Built-in modules    : models;precise;topology
User modules        : None
Python bindings     : Yes (Python 3.7.2: /Users/staude/.pyenv/shims/python)
       Includes     : /Users/staude/.pyenv/versions/3.7.2/include/python3.7m
       Libraries    : /Users/staude/.pyenv/versions/3.7.2/lib/libpython3.7m.a

Cython bindings     : Yes (Cython 0.29.13: /Users/staude/.pyenv/shims/cython)
Use threading       : Yes (OpenMP: -fopenmp)
Use GSL             : Yes (GSL 2.6)
    Includes        : /usr/local/Cellar/gsl/2.6/include
    Libraries       : /usr/local/Cellar/gsl/2.6/lib/libgsl.dylib;/usr/local/Cellar/gsl/2.6/lib/libgslcblas.dylib

Use Readline        : Yes (GNU Readline 4.2)
    Includes        : /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include
    Libraries       : /usr/lib/libreadline.dylib;/usr/lib/libncurses.dylib

Use libltdl         : Yes (LTDL 2.4.6)
    Includes        : /usr/local/include
    Libraries       : /usr/local/lib/libltdl.dylib

Use doxygen         : No
Use MPI             : Yes (MPI: /usr/local/bin/mpicxx)
    FLAGS           : 
    Includes        : /usr/local/Cellar/open-mpi/4.0.2/include
    Link Flags      : -L/usr/local/Cellar/libevent/2.1.11_1/lib
    Libraries       : /usr/local/Cellar/open-mpi/4.0.2/lib/libmpi.dylib

Use MUSIC           : Yes (MUSIC 1.1.15)
    Includes        : /usr/local/include
    Libraries       : /usr/local/lib/libmusic.dylib

Use libneurosim     : No
Use Boost           : No

———————————————————————————————————————

However, now make generates the error mentioned in https://nest-simulator.readthedocs.io/en/latest/installation/mac_install.html#troubleshooting:

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:128,
                 from /usr/local/Cellar/gcc/9.2.0_1/include/c++/9.2.0/cstdlib:75,
                 from /usr/local/Cellar/gcc/9.2.0_1/include/c++/9.2.0/bits/stl_algo.h:59,
                 from /usr/local/Cellar/gcc/9.2.0_1/include/c++/9.2.0/algorithm:62,
                 from /Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/sli/dictutils.h:27,
                 from /Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0/sli/dictutils.cc:23:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h:52:74: error: expected initializer before '__OSX_AVAILABLE_STARTING'
   52 | int   posix_memalign(void **__memptr, size_t __alignment, size_t __size) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0);

Sadly, the suggested command sudo xcode-select -s /Library/Developer/CommandLineTools/ does not help, same error.

Is there any experience what I could try?

Best,
Benjamin 

 

On 28. Oct 2019, at 13:19, Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no> wrote:


Hi Benjamin,

This is curious. My setup seems very similar (macOS 10.14.6 with the newest XCode and Clang 10, OpenMPI 4.0.1_2 from Homebrew) and it works out of the box. It is a long time since I had trouble compiling NEST with MPI on my system.

Could you run CMake again in an empty directory with additional flags

--trace --debug-output
and see if that generates some indication on what might go wrong with MPI detection?

In my case, I end up with the following configuration

Use MPI             : Yes (MPI: /usr/local/bin/mpicxx)
    FLAGS           : 
    Includes        : /usr/local/Cellar/open-mpi/4.0.1_2/include
    Link Flags      : -L/usr/local/Cellar/libevent/2.1.11_1/lib
    Libraries       : /usr/local/Cellar/open-mpi/4.0.1_2/lib/libmpi.dylib

You could also try with

-Dwith-mpi=/usr/local/Cellar/open-mpi/4.0.2/

but I haven't tested that.

Best,
Hans Ekkehard

On 28 Oct 2019, at 08:58, Benjamin Staude <benjamin.staude@gmail.com> wrote:

Hi Hans-Ekkehard,

Here is some info on my mpicxx installations (after a brew uninstall and brew install):

staude:bld staude$ which mpicxx
/usr/local/bin/mpicxx
staude:bld staude$ ls -la /usr/local/bin/mpicxx
lrwxr-xr-x  1 staude  admin  35 Oct 28 08:42 /usr/local/bin/mpicxx -> ../Cellar/open-mpi/4.0.2/bin/mpicxx
staude:bld staude$ mpicxx --version
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin


Does that help?

Best,
Benjamin

On 27. Oct 2019, at 22:01, Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no> wrote:
Hi Benjamin,

It is curious that MPI is not found on your system. Could you double check that you have installed open-mpi via Homebrew? What does

which mpicxx

return on your system?

Best,
Hans Ekkehard


On 26 Oct 2019, at 17:04, Benjamin Staude <benjamin.staude@gmail.com> wrote:

Hi Hans-Ekkehard,

Thanks for the support, that solved one issue. But now, I get the same for OPEN_MPI:

-- Could NOT find MPI_C (missing: MPI_C_WORKS) 
-- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS) 
-- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND) 

(I need open_mpi because I need the MUSIC interface). This is my cmake-call:

cmake \
-DCMAKE_C_COMPILER=gcc-9 \
-DCMAKE_CXX_COMPILER=g++-9 \
-Dwith-music=ON \
-Dwith-mpi=ON \
-Dwith-openmp=ON \
-DCMAKE_INSTALL_PREFIX=/Users/staude/.pyenv/versions/3.7.2/ \
/Users/staude/Projekte/RainerDunkel/SensoryNetwork/Skripte/snn/NEST/nest-simulator-2.18.0

And the output:

-- The CXX compiler identification is GNU 9.2.0
-- The C compiler identification is GNU 9.2.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/local/bin/g++-9
-- Check for working CXX compiler: /usr/local/bin/g++-9 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/local/bin/gcc-9
-- Check for working C compiler: /usr/local/bin/gcc-9 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file mach-o/dyld.h
-- Looking for include file mach-o/dyld.h - found
-- Looking for include file mach/mach.h
-- Looking for include file mach/mach.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for C++ include istream
-- Looking for C++ include istream - not found
-- Looking for C++ include ostream
-- Looking for C++ include ostream - not found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - not found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Check size of u_int16_t
-- Check size of u_int16_t - done
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Check size of u_int64_t
-- Check size of u_int64_t - done
-- Check size of uint64_t
-- Check size of uint64_t - done
-- Looking for NAN
-- Looking for NAN - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for M_E
-- Looking for M_E - found
-- Looking for M_PI
-- Looking for M_PI - found
-- Looking for expm1
-- Looking for expm1 - found
-- Host triple: x86_64-apple-darwin
-- Target triple: x86_64-apple-darwin
-- Found LTDL: /usr/local/lib/libltdl.dylib (found version "2.4.6") 
-- Found Readline: /usr/lib/libreadline.dylib (found version "4.2") 
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Found GSL: /usr/local/Cellar/gsl/2.6/include (found version "2.6") 
-- Found PythonInterp: /Users/staude/.pyenv/shims/python (found version "3.7.2") 
-- Found PythonLibs: /Users/staude/.pyenv/versions/3.7.2/lib/libpython3.7m.a (found suitable exact version "3.7.2") 
-- Found Cython: /Users/staude/.pyenv/shims/cython (found version "0.29.13") 
-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- Found OpenMP: TRUE   
-- Could NOT find MPI_C (missing: MPI_C_WORKS) 
-- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS) 
-- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND) 
CMake Error at cmake/ProcessOptions.cmake:528 (message):
 MUSIC requires -Dwith-mpi=ON.
Call Stack (most recent call first):
 CMakeLists.txt:167 (nest_process_with_music)


And the cmake-version:
cmake --version
cmake version 3.15.3


On 26. Oct 2019, at 14:11, Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no> wrote:


Hi Benjamin,

The CMake output shows that you are using the AppleClang compiler, which does not support OpenMP. If you want to use that compiler, you need to turn off OpenMP with -Dwith-openmp=OFF.

If you want NEST with OpenMP on the Mac, I would recommend using the GCC compiler installed via Homebrew, see

https://nest-simulator.readthedocs.io/en/latest/installation/mac_install.html

for instructions.

Best,
Hans Ekkehard


On 25 Oct 2019, at 18:12, Benjamin Staude <benjamin.staude@gmail.com> wrote:

Hi there,

I am trying to install nest under OSX Mojave and run into the following cmake-error (see below for a full trace):


-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) 
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) 

I already tried various tricks (http://stechschulte.net/2016/03/20/openmp-osx-cmake.html, https://stackoverflow.com/questions/48825416/missing-openmp-c-flags-openmp-c-lib-names), but had no success. Does anybody have experience?

Thanks in advance,
Benjamin



#########################################################

-- The CXX compiler identification is AppleClang 9.0.0.9000038
-- The C compiler identification is AppleClang 9.0.0.9000038
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file mach-o/dyld.h
-- Looking for include file mach-o/dyld.h - found
-- Looking for include file mach/mach.h
-- Looking for include file mach/mach.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for C++ include istream
-- Looking for C++ include istream - found
-- Looking for C++ include ostream
-- Looking for C++ include ostream - found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Check size of u_int16_t
-- Check size of u_int16_t - done
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Check size of u_int64_t
-- Check size of u_int64_t - done
-- Check size of uint64_t
-- Check size of uint64_t - done
-- Looking for NAN
-- Looking for NAN - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for M_E
-- Looking for M_E - found
-- Looking for M_PI
-- Looking for M_PI - found
-- Looking for expm1
-- Looking for expm1 - found
-- Host triple: x86_64-apple-darwin
-- Target triple: x86_64-apple-darwin
-- Found LTDL: /usr/local/lib/libltdl.dylib (found version "2.4.6") 
-- Found Readline: /usr/lib/libreadline.dylib (found version "4.2") 
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Found GSL: /usr/local/Cellar/gsl/2.6/include (found version "2.6") 
-- Found PythonInterp: /Users/staude/.pyenv/shims/python (found version "3.7.2") 
-- Found PythonLibs: /Users/staude/.pyenv/versions/3.7.2/lib/libpython3.7m.a (found suitable exact version "3.7.2") 
-- Found Cython: /Users/staude/.pyenv/shims/cython (found version "0.29.13") 
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) 
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) 
CMake Error at cmake/ProcessOptions.cmake:452 (message):
CMake can not find OpenMP.
Call Stack (most recent call first):
CMakeLists.txt:164 (nest_process_with_openmp)

_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org

--

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


-- -- -- 
Dr. Benjamin Staude  |  Paul-Lincke-Ufer 7  |  10999 Berlin  |  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@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

 -- -- -- 
Dr. Benjamin Staude  |  Paul-Lincke-Ufer 7  |  10999 Berlin  |  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@nmbu.no
Home  http://arken.nmbu.no/~plesser


 -- -- -- 
Dr. Benjamin Staude  |  Paul-Lincke-Ufer 7  |  10999 Berlin  |  benjamin.staude@gmail.com