eth-cscs / stackinator

Home Page:https://eth-cscs.github.io/stackinator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cray-mpich +cuda fails to build applications for Spack v0.19.0

bcumming opened this issue · comments

Building MPI packages with cray-mpich-binary+cuda fails for v0.19.0 and later of Spack.

The mpicc (specifically C language) compiler wrapper fails during the linking stage with the errors like the following:

/usr/bin/ld: /user-environment/linux-sles15-zen2/gcc-11.3.0/cray-mpich-binary-8.1.21.1-gcc-4k7oxj3rl75ztwko5s3lamdttacaue4p/lib/libmpi_gtl_cuda.so: undefined reference to `__gxx_personality_v0'

__gxx_personality is defined in libstdc++.

Two manual fixes have been shown to fix the issue:

  1. Patching the mpicc wrapper to add -lstdc++
  2. Patching libmpi_gtl_cuda.so to resolve its own dependency patchelf --add-needed libstdc++.so libmpi_gtl_cuda.so

Of these, the second is more robust, and can be implemented in cray-mpich-binary/package.py.