Fix PETSc build against external ROCm#4860
Open
wspear wants to merge 2 commits into
Open
Conversation
…tring PETSc was failing to build against (external) rocm 7.2. These changes fix it. -- linux-ubuntu24.04-x86_64_v3 / %c,cxx,fortran=gcc@13.3.0 ------ 3r5qjzw petsc@3.25.1~X~batch~cgns~complex~cuda~debug+double+examples~exodusii~fftw+fortran+fortran-bindings~giflib~hdf5~hpddm~hwloc~hypre~int64~jpeg~knl~kokkos~libpng~libyaml~memkind~metis~mkl-pardiso~ml~mmg~moab~mpfr+mpi~mumps~openmp~p4est~parmmg~ptscotch~random123+rocm~saws~scalapack+shared~strumpack~suite-sparse~superlu-dist~sycl~tetgen~valgrind~zoltan amdgpu_target:=gfx90a build_system=generic clanguage=C memalign=none gaqs4ab compiler-wrapper@1.0 build_system=generic jv7fosj diffutils@3.12 build_system=autotools ckvl7de libiconv@1.18 build_system=autotools libs:=shared,static mob5yjf gcc@13.3.0+binutils+bootstrap~graphite+libsanitizer~mold~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' dwcz77v gcc-runtime@13.3.0 build_system=generic jj453jr glibc@2.39 build_system=autotools 27tbysx gmake@4.4.1~guile build_system=generic kvl4hfk hip@7.2.1~asan~cuda+rocm build_system=cmake build_type=Release generator=make s4boz2i hipblas@7.2.1~asan~cuda+rocm amdgpu_target:=auto build_system=cmake build_type=Release generator=make pe2fdk3 hipblas-common@7.2.1~ipo build_system=cmake build_type=Release generator=make k3pbdgj cmake@3.31.11~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release lnn2jzl curl@8.18.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs:=shared,static tls:=openssl f3ioizb nghttp2@1.67.1 build_system=autotools g3gqygu openssl@3.6.1~docs+shared build_system=generic certs=mozilla sghkyxj ca-certificates-mozilla@2026-03-19 build_system=generic gixftjv perl@5.42.0+cpanm+opcode+open+shared+threads build_system=generic halbeor berkeley-db@18.1.40+cxx~docs+stl build_system=autotools patches:=26090f4,b231fcc fdeyzed bzip2@1.0.8~debug~pic+shared build_system=generic ix4abkw gdbm@1.26 build_system=autotools r67tgvx readline@8.3 build_system=autotools patches:=21f0a03 3a4iwvp pkgconf@2.5.1 build_system=autotools 4zop7nq ncurses@6.6~symlinks+termlib abi=none build_system=autotools patches:=7a351bc fp3yliw zlib-ng@2.3.3+compat+new_strategies+opt+pic+shared build_system=autotools gbdoshi hipsolver@7.2.1~asan~cuda+rocm amdgpu_target:=auto build_system=cmake build_type=Release generator=make kaaxvrc hipsparse@7.2.1~asan~cuda+rocm amdgpu_target:=auto build_system=cmake build_type=Release generator=make moqlq3t hsa-rocr-dev@7.2.1~asan+image+shared build_system=cmake build_type=Release generator=make hwfn5q2 llvm-amdgpu@7.2.1~link_llvm_dylib~llvm_dylib+rocm-device-libs build_system=cmake build_type=Release generator=ninja 2bzx5cg mpich@4.3.2~argobots~cuda+fortran~hwloc+hydra~level_zero+libxml2+pci~rocm+romio~slurm~vci~verbs~wrapperrpath~xpmem build_system=autotools datatype-engine=auto device:=ch4 netmod:=ofi pmi=default dkhrs2e openblas@0.3.32~bignuma~consistent_fpcsr+dynamic_dispatch+fortran~ilp64+locking+pic+shared~static build_system=makefile symbol_suffix=none threads=openmp bqfkrxx python@3.12.12+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~static~tests~tkinter+uuid+zlib build_system=generic xburyjb rocblas@7.2.1~asan+hipblaslt+tensile amdgpu_target:=auto build_system=cmake build_type=Release generator=make tc66gg4 rocm-core@7.2.1~asan build_system=cmake build_type=Release generator=make hnas4r4 rocprim@7.2.1~asan amdgpu_target:=auto build_system=cmake build_type=Release generator=make fs5scbl rocrand@7.2.1~asan amdgpu_target:=auto build_system=cmake build_type=Release generator=make we4e722 rocsolver@7.2.1~asan+optimal amdgpu_target:=auto build_system=cmake build_type=Release generator=make zuhxza3 rocsparse@7.2.1~asan~test amdgpu_target:=auto build_system=cmake build_type=Release generator=make vkw5ydi rocthrust@7.2.1 amdgpu_target:=auto build_system=cmake build_type=Release generator=make * **Spack:** 1.1.1 (spack/spack@2e2169d) * **Builtin repo:** spack@667b1e7 * **Python:** 3.12.12 * **Platform:** linux-ubuntu24.04-zen4 @eugeneswalker @balay
Contributor
Author
|
@spackbot fix style |
|
Let me see if I can fix that for you! |
|
I was able to run spack style --fixrepos/spack_repo/builtin/packages/petsc/package.py
�[1;34m==> �[0mrunning ruff format
1 file reformatted
�[1;34m==> �[0mrunning ruff check
All checks passed!
�[1;34m==> �[0mstyle checks passed
I've updated the branch with style fixes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ROCm version check with patch to HIP.py. Ignores benign warnings (printed to stderr) that were causing PETSc configure to fail despite successful tests. Strips potentially invalid empty string.
PETSc was failing to build against (external) ROCm 7.2.1 These changes fix it for me. The version check patch should probably go into PETSc proper. There may be a more correct way to handle the over-sensitivity to configure test errors but adding -Wno-unused-command-line-argument was the cleanest Spack-level fix I could find for the specific issue I was having.
@eugeneswalker
@balay