Open Thomas-Ulrich opened 2 weeks ago
It looks like you might be getting a mix of the flang toolchain (from /opt/rocm) and the gfortran toolchain (from /usr). If that is what is happening, then as a workaround, you could potentially try setting the /opt/rocm flang as your Fortran compiler when building hipsolver.
Thank you! It seems the compilers are correctly set:
ulrichth@uan02:/project/project_465000831/spack_tandem> spack compiler info rocmcc
rocmcc@5.6.1:
paths:
cc = /appl/lumi/SW/CrayEnv/EB/rocm/5.6.1/bin/amdclang
cxx = /appl/lumi/SW/CrayEnv/EB/rocm/5.6.1/bin/amdclang++
f77 = /appl/lumi/SW/CrayEnv/EB/rocm/5.6.1/bin/amdflang
fc = /appl/lumi/SW/CrayEnv/EB/rocm/5.6.1/bin/amdflang
environment:
set:
RFE_811452_DISABLE = 1
Extra rpaths:
/appl/lumi/SW/CrayEnv/EB/rocm/5.6.1/lib
/appl/lumi/SW/CrayEnv/EB/rocm/5.6.1/lib64
/opt/cray/pe/gcc-libs
modules = []
operating system = sles15
rocmcc@5.2.3:
paths:
cc = /opt/rocm-5.2.3/bin/amdclang
cxx = /opt/rocm-5.2.3/bin/amdclang++
f77 = /opt/rocm-5.2.3/bin/amdflang
fc = /opt/rocm-5.2.3/bin/amdflang
modules = []
operating system = sles15
ulrichth@uan02:/project/project_465000831/spack_tandem> spack compiler info gcc
gcc@11.2.0:
paths:
cc = /opt/cray/pe/gcc/11.2.0/bin/gcc
cxx = /opt/cray/pe/gcc/11.2.0/bin/g++
f77 = /opt/cray/pe/gcc/11.2.0/bin/gfortran
fc = /opt/cray/pe/gcc/11.2.0/bin/gfortran
modules = []
operating system = sles15
gcc@12.2.0:
paths:
cc = /opt/cray/pe/gcc/12.2.0/bin/gcc
cxx = /opt/cray/pe/gcc/12.2.0/bin/g++
f77 = /opt/cray/pe/gcc/12.2.0/bin/gfortran
fc = /opt/cray/pe/gcc/12.2.0/bin/gfortran
modules = []
operating system = sles15
gcc@7.5.0:
paths:
cc = /usr/bin/gcc
cxx = /usr/bin/g++
f77 = /usr/bin/gfortran
fc = /usr/bin/gfortran
modules = []
operating system = sles15
So you would suggest trying to change fc in compilers.yaml for gcc@12.2.0, just for this install?
Yes. If that works, it's a good indicator my analysis is correct, though I would only suggest it as a temporary workaround until the root cause can be fixed. I expect that a better solution could be found, but I am travelling and not able to investigate further.
When I return in July, I will introduce a build option into hipsolver for disabling the Fortran component. That is not a real fix either, but it would have been another useful workaround. It's already disabled for Windows builds, so it would be trivial to make optional for Linux.
Steps to reproduce the issue
Error message
Fatal Error: File '/appl/lumi/SW/CrayEnv/EB/rocm/5.6.1/llvm/include/iso_c_binding.mod' opened at (1) is not a GNU Fortran module file
==> Installing hipsolver-5.6.1-6ilkv4gahpre5can6h7pth4aqpyhzaos [51/54] ==> No binary for hipsolver-5.6.1-6ilkv4gahpre5can6h7pth4aqpyhzaos found: installing from source ==> Using cached archive: /project/project_465000831/spack_tandem/23.09/0.21.0/cache/_source-cache/archive/2e/2e546bc7771f7bf0aa7892b69cded725941573e8b70614759c3d03c21eb78dde.tar.gz ==> No patches needed for hipsolver ==> hipsolver: Executing phase: 'cmake' ==> hipsolver: Executing phase: 'build' ==> Error: ProcessError: Command exited with status 2: 'make' '-j20' 7 errors found in build log: 25 -- Looking for pthread_create in pthreads 26 -- Looking for pthread_create in pthreads - not found 27 -- Looking for pthread_create in pthread 28 -- Looking for pthread_create in pthread - found 29 -- Found Threads: TRUE 30 -- hip::amdhip64 is SHARED_LIBRARY >> 31 g++: error: unrecognized command-line option '--rtlib=compiler-rt' 32 CMake Deprecation Warning at /appl/lumi/SW/CrayEnv/EB/rocm/5.6.1/lib64/cmake/hip/hip-config.cmake:20 (cmake_minimum_required): 33 Compatibility with CMake < 3.5 will be removed from a future version of 34 CMake. 35 36 Update the VERSION argumentInformation on your system
It is LUMI (euroHPC)
Additional information
@cgmb @renjithravindrankannath @srekolam spack-build-env.txt spack-build-out.txt
General information
spack debug report
and reported the version of Spack/Python/Platformspack maintainers <name-of-the-package>
and @mentioned any maintainers