Description
Dear developers,
I have problems installing CRPropa on my system.
System Information:
- Operating system: MacOS Somona 14.5 (Apple M1)
- Laptop
- Python version: 3.12
- Swig version: 4.2.1
- Cmake version: 3.30.3
Did you install CRPropa from git or download a release?
I installed version 3.2.1-167-g61a6257e from git.
Things that I tried before asking for help:
I read and followed the installation instructions at https://crpropa.github.io/CRPropa3/ . Before writing this request I also checked previous installation issues at https://github.com/CRPropa/CRPropa3/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Ainstallation+ .
The installation seem successful, but I encountered several failures during the tests:
The following tests FAILED:
1 - testCore (Failed)
8 - testPropagation (Failed)
9 - testBreakCondition (Failed)
10 - testInteraction (Failed)
11 - testSource (Failed)
12 - testOutput (Failed)
13 - testFunctionalGroups (Failed)
14 - testAdiabaticCooling (Failed)
15 - testCandidateSplitting (Failed)
17 - testSimulationExecution (Failed)
18 - testDiffusionSDE (Failed)
20 - testPythonExtension (Failed)
Errors while running CTest
Output from these tests are in: /Users/andreasnossum/Documents/SourceCodes/CRPropa3/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
make: *** [test] Error 8
I ran this cmake command:
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/.local
-DENABLE_FFTW3F=ON
-DENABLE_OPENMP=ON
with this in the Zsh profile:
export PATH="/opt/homebrew/bin:$PATH"
export LD_LIBRARY_PATH="/opt/homebrew/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"
export PATH="/Users/andreasnossum/miniconda3/bin:$PATH"
export PYTHONPATH="/Users/andreasnossum/miniconda3/lib/python3.12/site-packages:$PYTHONPATH"
I specifically installed numpy version 1.26.4 from conda (homebrew would not allow me to install specific versions), to resolve some issues with linking I had earlier. With the cmake command above, I received the following output:
-- The Fortran compiler identification is GNU 14.2.0
-- The C compiler identification is AppleClang 15.0.0.15000309
-- The CXX compiler identification is AppleClang 15.0.0.15000309
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /opt/homebrew/bin/gfortran - skipped
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
With SIMD_EXTENSIONS "none" tricubic interpolation of vector grids is not possible. You should set SIMD_EXTENSION to a compatible value ("avx", "avx+fma", or -- depending on the build CPU -- "native"). Trilinear interpolation is still possible.
-- Build Type: Release
-- CRPropa version: 3.2.1-167-g61a6257e 61a6257 refs/heads/master
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
Using provided EIGEN
-- 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)
-- Found OpenMP_Fortran: -fopenmp (found version "4.5")
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) (found version "4.5")
-- Google perftools: NOT Found!
-- Include: GOOGLE_PERFTOOLS_INCLUDE_DIR-NOTFOUND
-- FFTW3 with single precision (FFTW3F): Found!
-- Include: /opt/homebrew/include
-- Library: /opt/homebrew/lib/libfftw3f.dylib
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
-- muParser: Found!
-- Include: /opt/homebrew/Cellar/muparser/2.3.4/include
-- Library: /opt/homebrew/Cellar/muparser/2.3.4/lib/libmuparser.dylib
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Found HDF5: hdf5-shared (found version "1.14.3") found components: C
-- Use absolute RPATH /Users/andreasnossum/.local/lib
-- Downloading data files from sciebo ~ 73 MB
-- Extracting data file
Error copying directory from "/Users/andreasnossum/Documents/SourceCodes/CRPropa3/build/data-2024-04-30/data" to "/Users/andreasnossum/Documents/SourceCodes/CRPropa3/build/data/".
-- Build of documentation disabeled. Enable with BUILD_DOC=On
-- Found Python: /opt/homebrew/Frameworks/Python.framework/Versions/3.12/bin/python3.12 (found suitable version "3.12.6", minimum required is "3.0") found components: Interpreter Development NumPy Development.Module Development.Embed
-- Found SWIG: /opt/homebrew/bin/swig (found suitable version "4.2.1", minimum required is "3.0")
-- Python: Found!
-- version 3.12.6
-- executable: /opt/homebrew/Frameworks/Python.framework/Versions/3.12/bin/python3.12
-- libraries: /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/lib/libpython3.12.dylib
-- headers: /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12
-- site packages: /opt/homebrew/lib/python3.12/site-packages
-- development libraries: Found!
-- package install directory: /opt/homebrew/lib/python3.12/site-packages
-- NumPy: Found!
-- headers: /Users/andreasnossum/miniconda3/lib/python3.12/site-packages/numpy/core/include (version 1.26.4)
-- Configuring done (15.8s)
-- Generating done (0.1s)
CMake Warning:
Manually-specified variables were not used by the project:
ENABLE_FFTW3F
I suspected that something was wrong since it could not find OpenMP, so I tried the workaround by installing LLVM, and added these lines to the cmake command (and corresponding environment variables in the zsh profile + specifying apple-m1 in the flags):
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang
-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++
-DCMAKE_C_FLAGS="-stdlib=libc++ -mcpu=apple-m1"
-DCMAKE_CXX_FLAGS="-stdlib=libc++ -mcpu=apple-m1"
It then found the OpenMP and used Clang instead of AppleClang:
-- The C compiler identification is Clang 18.1.8
-- The CXX compiler identification is Clang 18.1.8
and
-- Found OpenMP_C: -fopenmp=libomp (found version "5.1")
-- Found OpenMP_CXX: -fopenmp=libomp (found version "5.1")
-- Found OpenMP_Fortran: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "5.1")
but it resulted in:
35% tests passed, 13 tests failed out of 20
Total Test time (real) = 6.66 sec
The following tests FAILED:
1 - testCore (SIGTRAP)
3 - testModuleList (SIGTRAP)
8 - testPropagation (SIGTRAP)
9 - testBreakCondition (SIGTRAP)
10 - testInteraction (SIGTRAP)
11 - testSource (SIGTRAP)
12 - testOutput (SIGTRAP)
13 - testFunctionalGroups (SIGTRAP)
14 - testAdiabaticCooling (SIGTRAP)
15 - testCandidateSplitting (SIGTRAP)
17 - testSimulationExecution (SIGTRAP)
18 - testDiffusionSDE (SIGTRAP)
20 - testPythonExtension (SIGTRAP)
Errors while running CTest
Output from these tests are in: /Users/andreasnossum/Documents/SourceCodes/CRPropa3/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
make: *** [test] Error 8
and then a system message saying that Python quit unexpectedly. Where do I go from here? I have been trying to fix this for quite some time now, but to no success, so any help is much appreciated!