ECP-WarpX / impactx

high-performance modeling of beam dynamics in particle accelerators with collective effects
https://impactx.readthedocs.io
Other
27 stars 20 forks source link

OMP CTest runs fail on MacOS #344

Open n01r opened 1 year ago

n01r commented 1 year ago

When running ctest on the release build of ImpactX (30f93ec73ef30343d436ac51380bd38f928f8004, AMReX 23.04) on a MacBook Pro 35 tests out of 94 are failing after the run and TinyProfiler output, after AMReX announces that it finalizes.

E.g. here the error from FODO.run

Pinned Memory Usage:
------------------------------------------------------------------
Name                             Nalloc  Nfree    AvgMem    MaxMem
------------------------------------------------------------------
The_Pinned_Arena::Initialize()        1      1    95 KiB  8192 KiB
ImpactX::AddNParticles               27     27  2524   B   853 KiB
ParticleContainer::addParticles     846    846   400 KiB   853 KiB
------------------------------------------------------------------

AMReX (23.04) finalized
[MacBookPro:16898] *** Process received signal ***
[MacBookPro:16898] Signal: Segmentation fault: 11 (11)
[MacBookPro:16898] Signal code: Address not mapped (1)
[MacBookPro:16898] Failing at address: 0x10
[MacBookPro:16898] [ 0] 0   libsystem_platform.dylib            0x00007ff80e4055ed _sigtramp + 29
[MacBookPro:16898] [ 1] 0   ???                                 0x0000000000000021 0x0 + 33
[MacBookPro:16898] [ 2] 0   libomp.dylib                        0x000000010ff74342 __kmp_release_64 + 34
[MacBookPro:16898] [ 3] 0   libomp.dylib                        0x000000010ff4d027 _ZL17__kmp_reap_threadP8kmp_infoi + 471
[MacBookPro:16898] [ 4] 0   libomp.dylib                        0x000000010ff4a399 _ZL18__kmp_internal_endv + 185
[MacBookPro:16898] [ 5] 0   libomp.dylib                        0x000000010ff4a226 __kmp_internal_end_library + 518
[MacBookPro:16898] [ 6] 0   libsystem_c.dylib                   0x00007ff80e2a9ba1 __cxa_finalize_ranges + 409
[MacBookPro:16898] [ 7] 0   libsystem_c.dylib                   0x00007ff80e2a99bb exit + 35
[MacBookPro:16898] [ 8] 0   libdyld.dylib                       0x00007ff80e3ef8d3 _ZNK5dyld416LibSystemHelpers4exitEi + 11
[MacBookPro:16898] [ 9] 0   dyld                                0x00007ff80e07e458 start + 1960
[MacBookPro:16898] *** End of error message ***
<end of output>

MacOS Version 13.3.1 (22E261) (just updated today but also failed with previous version)

I am using Spack for the dependencies. This is the content of spack.yaml:

# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
  # add package specs to the `specs` list
  specs: [cmake, fftw, mpi, llvm-openmp, adios2, hdf5, pkgconfig, python, py-pip,
    py-pybind11, py-mpi4py]
  view: true
  concretizer:
    unify: true
  compilers:
  - compiler:
      spec: apple-clang@13.1.6
      paths:
        cc: /usr/bin/clang
        cxx: /usr/bin/clang++
        f77: null
        fc: null
      flags: {}
      operating_system: monterey
      target: x86_64
      modules: []
      environment: {}
      extra_rpaths: []
ax3l commented 1 year ago

I think this is rooted in an outdated Spack environment relying on an external XCode set of compilers, which were updated in between.

Can you tell if redoing your environment solves the problem?

ax3l commented 1 year ago

@n01r was this resolved? :)