Open hpc4geo opened 2 months ago
I can confirm I could compile petsc@main with your method, that I sum up hereafter:
module load cray-mpich/8.1.29
module load craype-x86-trento
module load craype-accel-amd-gfx90a
module load rocm/6.0.3
export CPATH=$ROCM_PATH/include/rocm-core:$CPATH
export blas_dir=/opt/cray/pe/libsci/24.03.0/CRAYCLANG/17.0/x86_64
./configure --download-c2html=0 --download-cmake --with-debugging=no --download-hwloc=0 --download-metis --download-parmetis --download-sowing=0 --with-64-bit-indices --with-fortran-bindings=0 --with-hip --with-hip-arch=gfx90a --with-hipc=hipcc --with-memalign=32 --with-mpi-dir=/opt/cray/pe/mpich/8.1.29/ofi/crayclang/17.0 --with-x=0 PETSC_ARCH=arch-cray-c-rocm-hip-tandem-vanille --with-blaslapack-lib="${blas_dir}/lib/libsci_cray.a ${blas_dir}/lib/libsci_cray.so ${blas_dir}/lib/libsci_cray_mpi.a ${blas_dir}/lib/libsci_cray_mpi.so"
make PETSC_DIR=/pfs/lustrep4/scratch/project_465000831/petsc PETSC_ARCH=arch-cray-c-rocm-hip-tandem-vanille all
, and then tandem, with these changes: changes_for_lumi.txt (slightly different from what you posted).
And then:
CC=/opt/rocm-6.0.3/bin/amdclang CXX=/opt/rocm-6.0.3/bin/amdclang++ cmake .. -DCMAKE_PREFIX_PATH=/scratch/project_465000831/petsc/./arch-cray-c-rocm-hip-tandem-vanille/ -DDOMAIN_DIMENSION=3 -DCMAKE_CXX_FLAGS="-I${MPICH_DIR}/include" -DCMAKE_EXE_LINKER_FLAGS="-L${MPICH_DIR}/lib -lmpi ${PE_MPICH_GTL_DIR_amd_gfx90a} ${PE_MPICH_GTL_LIBS_amd_gfx90a}"
and then static is working fine. Thank you!
With a fresh linux environment I first load these modules
module list
reports the followingImportant
box at the bottom of the page.git clone https://gitlab.com/petsc/petsc.git
--download-fblaslapack=1
could be replaced with a more efficient BLAS implementation using something likewhere
blas_dir = /opt/cray/pe/libsci/24.03.0/CRAYCLANG/17.0/x86_64
/projappl/project_465001082/dmay/software/petsc-dev-git
Get the PETSc release
From tarball
or from git
Release 3.21.5 will NOT build with ROCM 6.0.3. To enable compilation a patch must be applied to the PETSc source tree. The patch file
PETSc-3.21.5_rocm6.patch
is attached to this issue. The patch was found in the EasyBuild distro provided by LUMI (see here/users/maydave2/EasyBuild/SW/LUMI-24.03/L/PETSc/3.21.5-cpeGNU-24.03/easybuild/PETSc-3.21.5_rocm6.patch
.I configured with these options
Notes
This is a debug build.
--download-fblaslapack=1
could be replaced with a more efficient BLAS implementation using something likewhere
blas_dir = /opt/cray/pe/libsci/24.03.0/CRAYCLANG/17.0/x86_64
My build can be found here
/users/maydave2/software/petsc-3.21.5
PETSc-3.21.5_rocm6.patch