GEOS-DEV / GEOS

GEOS Simulation Framework
GNU Lesser General Public License v2.1
211 stars 85 forks source link

"nvlink" link error with symbol sizes mismatched in coreComponents (libphysicsSolvers.a) #2856

Open drmichaeltcvx opened 10 months ago

drmichaeltcvx commented 10 months ago

Describe the bug Nvidia linker reports that a symbol (class) appears to have different sizes in coreComponents (libphysicsSolvers.a).

It seems that the definitions for _ZN4geos13finiteElement18ImplicitKernelBaseINS_20CellElementSubRegionENS_12constitutive11PorousSolidINS3_16ElasticIsotropicEEENS0_25H1_Wedge_Lagrange1_Gauss6ELi3ELi3EE14StackVariablesC1Ev$571

are not matching in two locations :

  1. ../lib/libphysicsSolvers.a:PoromechanicsEFEMKernels_CellElementSubRegion_PorousSolid-ElasticIsotropic-_H1_Wedge_Lagrange1_Gauss6.cpp.o , and

  2. ../lib/libphysicsSolvers.a:SolidMechanicsFixedStressThermoPoroElasticKernels_CellElementSubRegion_PorousSolid-ElasticIsotropic-_H1_Wedge_Lagrange1_Gauss6.cpp.o

To Reproduce Steps to reproduce the behavior:

  1. Clone latest GEOS / TPL
  2. Build with GCC 10.2.0 or 10.4.0 and CUDA 11.8 or CUDA 12.2
  3. Scroll down to '[ 88%] Built target physicsSolvers make -f coreComponents/mainInterface/CMakeFiles/mainInterface.dir/build.make coreComponents/mainInterface/CMakeFiles/mainInterface.dir/depend '
  4. See error
[ 88%] Linking CUDA device code CMakeFiles/geosx_core.dir/cmake_device_link.o
cd /dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/coreComponents && /data/saet/mtml/software/x86_64/cmake-3.24.1-linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/geosx_core.dir/dlink.txt --verbose=1
/vend/nvidia/cuda/v12.2/bin/nvcc -forward-unknown-to-host-compiler -ccbin=/data/saet/mtml/software/x86_64/RHEL7/hpcx-v2.17-gcc-mlnx_ofed-redhat7-cuda12-x86_64/ompi/bin/mpic++ -restrict -arch sm_80 --expt-extended-lambda --expt-relaxed-constexpr -Werror cross-execution-space-call,reorder,deprecated-declarations  -g -lineinfo  -restrict -arch sm_80 --expt-extended-lambda --expt-relaxed-constexpr -Werror cross-execution-space-call,reorder,deprecated-declarations  -O3 -DNDEBUG -Xcompiler -DNDEBUG -Xcompiler -Ofast   --generate-code=arch=compute_80,code=[compute_80,sm_80] -Xcompiler=-fopenmp -Xcompiler=-L/vend/nvidia/cuda/v12.2/lib64 -Xlinker=-rpath -Xlinker=/data/saet/mtml/software/x86_64/RHEL7/hpcx-v2.17-gcc-mlnx_ofed-redhat7-cuda12-x86_64/ompi/lib -Xlinker=--enable-new-dtags -Xcompiler=-pthread -Xcompiler=-fPIC -Wno-deprecated-gpu-targets -shared -dlink CMakeFiles/geosx_core.dir/__/cmake/blt/tests/internal/src/combine_static_library_test/dummy.cpp.o -o CMakeFiles/geosx_core.dir/cmake_device_link.o   -L/vend/nvidia/cuda/v12.2/targets/x86_64-linux/lib/stubs  -L/vend/nvidia/cuda/v12.2/targets/x86_64-linux/lib   ../lib/libcommon.a ../lib/libcodingUtilities.a ../lib/libdataRepository.a ../lib/libschema.a ../lib/libfunctions.a ../lib/libconstitutive.a ../lib/libmesh.a ../lib/libdenseLinearAlgebra.a ../lib/liblinearAlgebra.a ../lib/libfieldSpecification.a ../lib/libfiniteElement.a ../lib/libfiniteVolume.a ../lib/libdiscretizationMethods.a ../lib/libfileIO.a ../lib/libphysicsSolvers.a ../lib/libevents.a ../lib/libmainInterface.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/mathpresso/lib/libmathpresso.a 
...
/data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/fmt/lib64/libfmt.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/adiak/lib/libadiak.a /vend/nvidia/cuda/v12.2/lib64/libcudart_static.a -lpthread -lcudadevrt -lcudart_static -lmpi 
nvlink error   : Size doesn't match for '_ZN4geos13finiteElement18ImplicitKernelBaseINS_20CellElementSubRegionENS_12constitutive11PorousSolidINS3_16ElasticIsotropicEEENS0_25H1_Wedge_Lagrange1_Gauss6ELi3ELi3EE14StackVariablesC1Ev$571' in '../lib/libphysicsSolvers.a:PoromechanicsEFEMKernels_CellElementSubRegion_PorousSolid-ElasticIsotropic-_H1_Wedge_Lagrange1_Gauss6.cpp.o', first specified in '../lib/libphysicsSolvers.a:SolidMechanicsFixedStressThermoPoroElasticKernels_CellElementSubRegion_PorousSolid-ElasticIsotropic-_H1_Wedge_Lagrange1_Gauss6.cpp.o' (target: sm_80)
nvlink fatal   : merge_elf failed (target: sm_80)
make[2]: *** [coreComponents/CMakeFiles/geosx_core.dir/cmake_device_link.o] Error 1
make[2]: Target `coreComponents/CMakeFiles/geosx_core.dir/build' not remade because of errors.
make[2]: Leaving directory `/dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo'
make[1]: *** [coreComponents/CMakeFiles/geosx_core.dir/all] Error 2
make[1]: Target `all' not remade because of errors.
make[1]: Leaving directory `/dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo'
make: *** [all] Error 2

Expected behavior GPU-enabled GEOS used to build fine before ~ Nov 10

Screenshots

make[2]: Leaving directory `/dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo'
[ 88%] Built target mainInterface
make  -f coreComponents/CMakeFiles/geosx_core.dir/build.make coreComponents/CMakeFiles/geosx_core.dir/depend
make[2]: Entering directory `/dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo'
cd /dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo && /data/saet/mtml/software/x86_64/cmake-3.24.1-linux-x86_64/bin/cmake -E cmake_depends "Unix Makefiles" /dev/shm/mtml/src/GEOS/GEOS/src /dev/shm/mtml/src/GEOS/GEOS/src/coreComponents /dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo /dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/coreComponents /dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/coreComponents/CMakeFiles/geosx_core.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo'
make  -f coreComponents/CMakeFiles/geosx_core.dir/build.make coreComponents/CMakeFiles/geosx_core.dir/build
make[2]: Entering directory `/dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo'
[ 88%] Building CXX object coreComponents/CMakeFiles/geosx_core.dir/__/cmake/blt/tests/internal/src/combine_static_library_test/dummy.cpp.o
cd /dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/coreComponents && /util/gcc/gcc-10.4.0/bin/g++ -DCAMP_HAVE_CUDA -DDIY_NO_THREADS -DMPICH_SKIP_MPICXX -DMPI_NO_CPPBIND -DNDEBUG -DOMPI_SKIP_MPICXX -D_MPICC_H -Dgeosx_core_EXPORTS -Dkiss_fft_scalar=double -I/dev/shm/mtml/src/GEOS/GEOS/src/coreComponents -I/dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/include -I/dev/shm/mtml/src/GEOS/GEOS/src/coreComponents/denseLinearAlgebra -I/dev/shm/mtml/src/GEOS/GEOS/src/coreComponents/constitutive/PVTPackage/PVTPackage/source -I/dev/shm/mtml/src/GEOS/GEOS/src/coreComponents/linearAlgebra -isystem /vend/nvidia/cuda/v12.2/include -isystem /data/saet/mtml/software/x86_64/RHEL7/hpcx-v2.17-gcc-mlnx_ofed-redhat7-cuda12-x86_64/ompi/include -isystem /data/saet/mtml/software/x86_64/RHEL7/hpcx-v2.17-gcc-mlnx_ofed-redhat7-cuda12-x86_64/ompi/include/openmpi -isystem /data/saet/mtml/software/x86_64/RHEL7/hpcx-v2.17-gcc-mlnx_ofed-redhat7-cuda12-x86_64/ompi/include/openmpi/opal/mca/hwloc/hwloc201/hwloc/include -isystem /data/saet/mtml/software/x86_64/RHEL7/hpcx-v2.17-gcc-mlnx_ofed-redhat7-cuda12-x86_64/ompi/include/openmpi/opal/mca/event/libevent2022/libevent -isystem /data/saet/mtml/software/x86_64/RHEL7/hpcx-v2.17-gcc-mlnx_ofed-redhat7-cuda12-x86_64/ompi/include/openmpi/opal/mca/event/libevent2022/libevent/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/raja/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/chai/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/caliper/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/pugixml/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/conduit/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/conduit/include/conduit -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/hdf5/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/fmt/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/adiak/include -isystem /dev/shm/mtml/src/GEOS/GEOS/src/thirdparty/fast_float/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/mathpresso/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/silo/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/parmetis/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/metis/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/scotch/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/vtk/include/vtk-9.2 -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/suitesparse/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/superlu_dist/include -isystem /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/hypre/include -isystem /dev/shm/mtml/src/GEOS/GEOS/src/thirdparty/optionparser/src -Wall -Wextra      -fopenmp  -Wall -Wextra -Wpedantic -pedantic-errors -Wshadow -Wfloat-equal -Wcast-align -Wcast-qual  -g  -O3  -Wno-error -pthread  -fno-fast-math -DNDEBUG   -fPIC -fopenmp -pthread -fcompare-debug-second -std=c++17 -MD -MT coreComponents/CMakeFiles/geosx_core.dir/__/cmake/blt/tests/internal/src/combine_static_library_test/dummy.cpp.o -MF CMakeFiles/geosx_core.dir/__/cmake/blt/tests/internal/src/combine_static_library_test/dummy.cpp.o.d -o CMakeFiles/geosx_core.dir/__/cmake/blt/tests/internal/src/combine_static_library_test/dummy.cpp.o -c /dev/shm/mtml/src/GEOS/GEOS/src/cmake/blt/tests/internal/src/combine_static_library_test/dummy.cpp
[ 88%] Linking CUDA device code CMakeFiles/geosx_core.dir/cmake_device_link.o
cd /dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/coreComponents && /data/saet/mtml/software/x86_64/cmake-3.24.1-linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/geosx_core.dir/dlink.txt --verbose=1
/vend/nvidia/cuda/v12.2/bin/nvcc -forward-unknown-to-host-compiler -ccbin=/data/saet/mtml/software/x86_64/RHEL7/hpcx-v2.17-gcc-mlnx_ofed-redhat7-cuda12-x86_64/ompi/bin/mpic++ -restrict -arch sm_80 --expt-extended-lambda --expt-relaxed-constexpr -Werror cross-execution-space-call,reorder,deprecated-declarations  -g -lineinfo  -restrict -arch sm_80 --expt-extended-lambda --expt-relaxed-constexpr -Werror cross-execution-space-call,reorder,deprecated-declarations  -O3 -DNDEBUG -Xcompiler -DNDEBUG -Xcompiler -Ofast   --generate-code=arch=compute_80,code=[compute_80,sm_80] -Xcompiler=-fopenmp -Xcompiler=-L/vend/nvidia/cuda/v12.2/lib64 -Xlinker=-rpath -Xlinker=/data/saet/mtml/software/x86_64/RHEL7/hpcx-v2.17-gcc-mlnx_ofed-redhat7-cuda12-x86_64/ompi/lib -Xlinker=--enable-new-dtags -Xcompiler=-pthread -Xcompiler=-fPIC -Wno-deprecated-gpu-targets -shared -dlink CMakeFiles/geosx_core.dir/__/cmake/blt/tests/internal/src/combine_static_library_test/dummy.cpp.o -o CMakeFiles/geosx_core.dir/cmake_device_link.o   -L/vend/nvidia/cuda/v12.2/targets/x86_64-linux/lib/stubs  -L/vend/nvidia/cuda/v12.2/targets/x86_64-linux/lib   ../lib/libcommon.a ../lib/libcodingUtilities.a ../lib/libdataRepository.a ../lib/libschema.a ../lib/libfunctions.a ../lib/libconstitutive.a ../lib/libmesh.a ../lib/libdenseLinearAlgebra.a ../lib/liblinearAlgebra.a ../lib/libfieldSpecification.a ../lib/libfiniteElement.a ../lib/libfiniteVolume.a ../lib/libdiscretizationMethods.a ../lib/libfileIO.a ../lib/libphysicsSolvers.a ../lib/libevents.a ../lib/libmainInterface.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/mathpresso/lib/libmathpresso.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/parmetis/lib/libparmetis.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/metis/lib/libmetis.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/scotch/lib/libptscotch.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/scotch/lib/libptscotcherr.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/scotch/lib/libscotch.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/scotch/lib/libscotcherr.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/hypre/lib/libHYPRE.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/silo/lib/libsiloh5.a ../lib/libPVTPackage.a ../lib/libhdf5_interface.a ../lib/liblvarray.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/pugixml/lib64/libpugixml.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/chai/lib/libchai.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/raja/lib/libRAJA.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/chai/lib/libumpire.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/raja/lib/libcamp.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/conduit/lib/libconduit_relay.a -lrt -lz -ldl -lm /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/conduit/lib/libconduit_blueprint.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/conduit/lib/libconduit.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/fmt/lib64/libfmt.a /data/saet/mtml/software/x86_64/RHEL7/GEOSTPL/0.2.0-Experimental/install-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo/adiak/lib/libadiak.a /vend/nvidia/cuda/v12.2/lib64/libcudart_static.a -lpthread -lcudadevrt -lcudart_static -lmpi 
nvlink error   : Size doesn't match for '_ZN4geos13finiteElement18ImplicitKernelBaseINS_20CellElementSubRegionENS_12constitutive11PorousSolidINS3_16ElasticIsotropicEEENS0_25H1_Wedge_Lagrange1_Gauss6ELi3ELi3EE14StackVariablesC1Ev$571' in '../lib/libphysicsSolvers.a:PoromechanicsEFEMKernels_CellElementSubRegion_PorousSolid-ElasticIsotropic-_H1_Wedge_Lagrange1_Gauss6.cpp.o', first specified in '../lib/libphysicsSolvers.a:SolidMechanicsFixedStressThermoPoroElasticKernels_CellElementSubRegion_PorousSolid-ElasticIsotropic-_H1_Wedge_Lagrange1_Gauss6.cpp.o' (target: sm_80)
nvlink fatal   : merge_elf failed (target: sm_80)
make[2]: *** [coreComponents/CMakeFiles/geosx_core.dir/cmake_device_link.o] Error 1
make[2]: Target `coreComponents/CMakeFiles/geosx_core.dir/build' not remade because of errors.
make[2]: Leaving directory `/dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo'
make[1]: *** [coreComponents/CMakeFiles/geosx_core.dir/all] Error 2
make[1]: Target `all' not remade because of errors.
make[1]: Leaving directory `/dev/shm/mtml/src/GEOS/GEOS/build-GPU-Hypre-GCC-CUDA_12.0-ompi_hpcx-OMP-relwithdebinfo'
make: *** [all] Error 2
...

Platform (please complete the following information):

Additional context Add any other context about the problem here.

wrtobin commented 9 months ago

This shouldn't work, but try eliminating the branch of this ifdef conditional you're not using in your compilation and see if that fixes it:

https://github.com/GEOS-DEV/GEOS/blob/develop/src/coreComponents/physicsSolvers/solidMechanics/kernels/FixedStressThermoPoromechanics.hpp#L119-L125

It is the only location in any of the StackVariables types involved in this specific issue where the size of the struct is dependent on the compilation context, so theoretically the same type instantiated in two different scopes with different visibility of the CALC_FEM_SHAPE_IN_KERNEL preproc macro would result in different struct layouts/sizes.

It is a subtype instead of the base type, which is what is actually reporting the error, so I don't expect it to change anything, but it is worthwhile to eliminate as a possibility.