Skip to content

[email protected] +cuda cuda_arch=90 fails build: AMReX_BlockMutex.cpp.o: Error 139: Segmentation fault (core dumped) #38556

@eugeneswalker

Description

@eugeneswalker

Steps to reproduce the issue

[email protected] +cuda cuda_arch=90 fails to build using:

  • spack@develop (5c6c3b4 from Sun Jun 18 07:17:19 2023 -0400)
  • GCC 11.1.0
  • CUDA 11.8.0
  • Ubuntu 20.04, X86_64

Concrete spec: amrex.spec.json.txt

Concretization
 -   [email protected]%[email protected]~amrdata+cuda~eb~fortran~hdf5~hypre~ipo+linear_solvers+mpi~openmp~particles~petsc~pic~plotfile_tools~rocm~shared~sundials~sycl~tiny_profile build_system=cmake build_type=Release cuda_arch=90 dimensions=3 generator=make precision=double arch=linux-ubuntu20.04-x86_64
[+]      ^[email protected]%[email protected]~doc+ncurses+ownlibs~qt build_system=generic build_type=Release arch=linux-ubuntu20.04-x86_64
[+]          ^[email protected]%[email protected]~symlinks+termlib abi=none build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]          ^[email protected]%[email protected]~docs~shared build_system=generic certs=mozilla arch=linux-ubuntu20.04-x86_64
[+]              ^ca-certificates-mozilla@2023-01-10%[email protected] build_system=generic arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected]+cpanm+open+shared+threads build_system=generic arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected]+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected]~debug~pic+shared build_system=generic arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected]+optimize+pic+shared build_system=makefile arch=linux-ubuntu20.04-x86_64
[+]      ^[email protected]%[email protected]~allow-unsupported-compilers~dev build_system=generic arch=linux-ubuntu20.04-x86_64
[+]          ^[email protected]%[email protected]~python build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected]+pic build_system=autotools libs=shared,static arch=linux-ubuntu20.04-x86_64
[+]      ^[email protected]%[email protected]~guile build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]      ^[email protected]%[email protected]~argobots~cuda+fortran~hwloc+hydra+libxml2+pci~rocm+romio~slurm~two_level_namespace~vci~verbs~wrapperrpath build_system=autotools datatype-engine=auto device=ch4 netmod=ofi pmi=pmi arch=linux-ubuntu20.04-x86_64
[+]          ^[email protected]%[email protected] build_system=autotools patches=440b954 arch=linux-ubuntu20.04-x86_64
[+]          ^[email protected]%[email protected]~debug~kdreg build_system=autotools fabrics=rxm,sockets,tcp,udp arch=linux-ubuntu20.04-x86_64
[+]          ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]          ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]          ^[email protected]%[email protected]~cuda~rocm build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected] build_system=autotools patches=35c4492,7793209,a49dd5b arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected]+sigsegv build_system=autotools patches=9dc5fbd,bfdffa7 arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]              ^[email protected]%[email protected]+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=0d98e93,f2fd060 arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected]+libbsd build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]                      ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]                          ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected]+bzip2+curses+git~libunistring+libxml2+tar+xz build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]                      ^[email protected]%[email protected] build_system=autotools zip=pigz arch=linux-ubuntu20.04-x86_64
[+]                          ^[email protected]%[email protected] build_system=makefile arch=linux-ubuntu20.04-x86_64
[+]                          ^[email protected]%[email protected]+programs build_system=makefile compression=none libs=shared,static arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected]~obsolete_api build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected] build_system=autotools patches=bbf97f1 arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected]+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-ubuntu20.04-x86_64
[+]                  ^[email protected]%[email protected] build_system=autotools arch=linux-ubuntu20.04-x86_64

Error:

$> spack install -f ./amrex.spec.json
...
==> Installing amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he
==> No binary for amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he found: installing from source
==> Using cached archive: /spack/var/spack/cache/_source-cache/archive/3b/3bddcb07cce3e65e06cac35005c30820d311ce47ae54b46e4af333fa272b236b.tar.gz
==> No patches needed for amrex
==> amrex: Executing phase: 'cmake'
==> amrex: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    '/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-11.1.0/gmake-4.4.1-lp2ol6q2quzz7sjtfkrxeczlsvzukkzk/bin/make' '-j16'

12 errors found in build log:
     134    [ 15%] Building CUDA object Src/CMakeFiles/amrex_3d.dir/Base/AMReX_Arena.cpp.o
     135    cd /tmp/root/spack-stage/spack-stage-amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he/spack-build-5a63psa/Src && /spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-11.1.0/cuda-11.8.0-e5qmi3yner
            ocnxupx3epemw25cezxkoo/bin/nvcc -forward-unknown-to-host-compiler -ccbin=/usr/bin/g++ -DAMREX_SPACEDIM=3 --options-file CMakeFiles/amrex_3d.dir/includes_CUDA.rsp -O3 -DNDEBUG -std=c++1
            7 --generate-code=arch=compute_90,code=[compute_90,sm_90] --expt-relaxed-constexpr --expt-extended-lambda -Xcudafe --diag_suppress=esa_on_defaulted_function_ignored -maxrregcount=255 -
            Xcudafe --display_error_number --Wext-lambda-captures-this --Werror ext-lambda-captures-this --Werror cross-execution-space-call --use_fast_math --generate-line-info -Xcompiler=-Werror
            =return-type -Xcompiler -pthread -MD -MT Src/CMakeFiles/amrex_3d.dir/Base/AMReX_Arena.cpp.o -MF CMakeFiles/amrex_3d.dir/Base/AMReX_Arena.cpp.o.d -x cu -rdc=true -c /tmp/root/spack-stag
            e/spack-stage-amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he/spack-src/Src/Base/AMReX_Arena.cpp -o CMakeFiles/amrex_3d.dir/Base/AMReX_Arena.cpp.o
     136    [ 16%] Building CUDA object Src/CMakeFiles/amrex_3d.dir/Base/AMReX_BArena.cpp.o
     137    cd /tmp/root/spack-stage/spack-stage-amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he/spack-build-5a63psa/Src && /spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-11.1.0/cuda-11.8.0-e5qmi3yner
            ocnxupx3epemw25cezxkoo/bin/nvcc -forward-unknown-to-host-compiler -ccbin=/usr/bin/g++ -DAMREX_SPACEDIM=3 --options-file CMakeFiles/amrex_3d.dir/includes_CUDA.rsp -O3 -DNDEBUG -std=c++1
            7 --generate-code=arch=compute_90,code=[compute_90,sm_90] --expt-relaxed-constexpr --expt-extended-lambda -Xcudafe --diag_suppress=esa_on_defaulted_function_ignored -maxrregcount=255 -
            Xcudafe --display_error_number --Wext-lambda-captures-this --Werror ext-lambda-captures-this --Werror cross-execution-space-call --use_fast_math --generate-line-info -Xcompiler=-Werror
            =return-type -Xcompiler -pthread -MD -MT Src/CMakeFiles/amrex_3d.dir/Base/AMReX_BArena.cpp.o -MF CMakeFiles/amrex_3d.dir/Base/AMReX_BArena.cpp.o.d -x cu -rdc=true -c /tmp/root/spack-st
            age/spack-stage-amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he/spack-src/Src/Base/AMReX_BArena.cpp -o CMakeFiles/amrex_3d.dir/Base/AMReX_BArena.cpp.o
     138    [ 17%] Building CUDA object Src/CMakeFiles/amrex_3d.dir/Base/AMReX_CArena.cpp.o
     139    cd /tmp/root/spack-stage/spack-stage-amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he/spack-build-5a63psa/Src && /spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-11.1.0/cuda-11.8.0-e5qmi3yner
            ocnxupx3epemw25cezxkoo/bin/nvcc -forward-unknown-to-host-compiler -ccbin=/usr/bin/g++ -DAMREX_SPACEDIM=3 --options-file CMakeFiles/amrex_3d.dir/includes_CUDA.rsp -O3 -DNDEBUG -std=c++1
            7 --generate-code=arch=compute_90,code=[compute_90,sm_90] --expt-relaxed-constexpr --expt-extended-lambda -Xcudafe --diag_suppress=esa_on_defaulted_function_ignored -maxrregcount=255 -
            Xcudafe --display_error_number --Wext-lambda-captures-this --Werror ext-lambda-captures-this --Werror cross-execution-space-call --use_fast_math --generate-line-info -Xcompiler=-Werror
            =return-type -Xcompiler -pthread -MD -MT Src/CMakeFiles/amrex_3d.dir/Base/AMReX_CArena.cpp.o -MF CMakeFiles/amrex_3d.dir/Base/AMReX_CArena.cpp.o.d -x cu -rdc=true -c /tmp/root/spack-st
            age/spack-stage-amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he/spack-src/Src/Base/AMReX_CArena.cpp -o CMakeFiles/amrex_3d.dir/Base/AMReX_CArena.cpp.o
  >> 140    Segmentation fault (core dumped)
  >> 141    make[2]: *** [Src/CMakeFiles/amrex_3d.dir/build.make:80: Src/CMakeFiles/amrex_3d.dir/Base/AMReX_BlockMutex.cpp.o] Error 139
     142    make[2]: *** Waiting for unfinished jobs....
  >> 143    Segmentation fault (core dumped)
  >> 144    make[2]: *** [Src/CMakeFiles/amrex_3d.dir/build.make:200: Src/CMakeFiles/amrex_3d.dir/Base/AMReX_Random.cpp.o] Error 139
  >> 145    Segmentation fault (core dumped)
  >> 146    make[2]: *** [Src/CMakeFiles/amrex_3d.dir/build.make:215: Src/CMakeFiles/amrex_3d.dir/Base/AMReX_DistributionMapping.cpp.o] Error 139
  >> 147    Segmentation fault (core dumped)
  >> 148    make[2]: *** [Src/CMakeFiles/amrex_3d.dir/build.make:245: Src/CMakeFiles/amrex_3d.dir/Base/AMReX_ForkJoin.cpp.o] Error 139
  >> 149    Segmentation fault (core dumped)
  >> 150    make[2]: *** [Src/CMakeFiles/amrex_3d.dir/build.make:275: Src/CMakeFiles/amrex_3d.dir/Base/AMReX_VisMF.cpp.o] Error 139
     151    make[2]: Leaving directory '/tmp/root/spack-stage/spack-stage-amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he/spack-build-5a63psa'
  >> 152    make[1]: *** [CMakeFiles/Makefile2:217: Src/CMakeFiles/amrex_3d.dir/all] Error 2
     153    make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-amrex-23.06-5a63psa3tefjb6xr6idhjistjxwci7he/spack-build-5a63psa'
  >> 154    make: *** [Makefile:139: all] Error 2

Error message

Error message
see aboec

Information on your system

  • Spack: 0.21.0.dev0 (5c6c3b4)
  • Python: 3.8.10
  • Platform: linux-ubuntu20.04-cascadelake
  • Concretizer: clingo

Additional information

spack-build-env.txt
spack-build-out.txt

@WeiqunZhang @asalmgren @etpalmer63 @ax3l @wspear @nchaimov

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions