CoreNeuron icon indicating copy to clipboard operation
CoreNeuron copied to clipboard

Coreneuron doesn't build properly with AppleClang and libomp (via brew) on OSX

Open pramodk opened this issue 3 years ago • 0 comments

Describe the issue

If we install OpenMP runtime via brew and try to build CoreNEURON with AppleClang then building as well as running tests fail.

To Reproduce

brew install libomp

# cd to build dir
cmake ..
make -j

Consolidate compiler generated dependencies of target corenrn_mpi
[ 31%] Building CXX object coreneuron/CMakeFiles/corenrn_mpi.dir/mpi/lib/nrnmpi.cpp.o
/Users/kumbhar/workarena/repos/bbp/coreneuron/coreneuron/mpi/lib/nrnmpi.cpp:18:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^~~~~~~

Expected behavior

Build should be successful with or without libomp.

System (please complete the following information)

  • OS: Mac OS
  • Compiler: AppleClang

Additional context

  • See the BBP slack discussion
  • AppleClang never ships OpenMP. Recently MacOS CI images on Azure & GitHub are coming with libomp and that's when we are seeing the issue

pramodk avatar May 12 '22 18:05 pramodk