PETSc/3.24.4-cpeCray-25.03-rocm (PETSc-3.24.4-cpeCray-25.03-rocm.eb)
Install with the EasyBuild-user module:
To access module help after installation and get reminded for which stacks and partitions the module is installed, usemodule spider PETSc/3.24.4-cpeCray-25.03-rocm.
EasyConfig:
#DOC PETSc for GPU with CCE compilers, development version
easyblock = 'ConfigureMake'
local_Boost_version = '1.88.0'
local_METIS_version = '5.1.0'
local_ParMETIS_version = '4.0.3'
local_SCOTCH_version = '7.0.8'
local_MUMPS_version = '5.6.1'
local_Hypre_version = '2.33.0'
local_SuperLU_version = '7.0.1'
local_SuperLU_DIST_version = '9.2.0'
local_Kokkos_version = '4.6.02'
local_Kokkos_kernels_ver = '4.6.02'
local_PETSc_version = '3.24.4'
name = 'PETSc'
version = local_PETSc_version
versionsuffix = '-rocm'
homepage = 'https://www.mcs.anl.gov/petsc'
description = """PETSc, pronounced PET-see (the S is silent), is a suite of data structures and routines for the
scalable (parallel) solution of scientific applications modeled by partial differential equations."""
toolchain = {'name': 'cpeCray', 'version': '25.03'}
toolchainopts = {'openmp': False, 'usempi': True, 'pic': True}
source_urls = ['https://web.cels.anl.gov/projects/petsc/download/release-snapshots']
sources = [SOURCELOWER_TAR_GZ]
checksums = [
'772bb47638f8335e4a5982c48947af250e58061100a817c9e1e2fdc50de2ce95', # petsc-3.24.4.tar.gz
]
builddependencies = [
('buildtools', '%(toolchain_version)s', '', True)
]
dependencies = [
('rocm', EXTERNAL_MODULE),
('cray-python', EXTERNAL_MODULE),
('cray-hdf5-parallel', EXTERNAL_MODULE),
('Boost', local_Boost_version),
('METIS', local_METIS_version),
('ParMETIS', local_ParMETIS_version),
('SCOTCH', local_SCOTCH_version),
('MUMPS', local_MUMPS_version, '-OpenMP'),
('Hypre', local_Hypre_version),
('SuperLU', local_SuperLU_version, '-OpenMP'),
('SuperLU_DIST', local_SuperLU_DIST_version, '-OpenMP-CPU'),
('Kokkos', local_Kokkos_version, '-rocm'),
('Kokkos-kernels', local_Kokkos_kernels_ver, '-rocm'),
]
# This is important while some packages are installed prior to build
#keeppreviousinstall = True
preconfigopts = 'mkdir -p %(installdir)s && '
#prebuildopts = preconfigopts
configopts = ' '.join([
'--known-has-attribute-aligned=1',
'--known-mpi-int64_t=0',
'--known-bits-per-byte=8',
'--known-64-bit-blas-indices=0',
'--known-sdot-returns-double=0',
'--known-snrm2-returns-double=0',
'--known-memcmp-ok=1',
'--known-mpi-c-double-complex=1',
'--known-mpi-long-double=1',
'--known-mpi-shared-libraries=0',
'--known-sizeof-MPI_Comm=4',
'--known-sizeof-MPI_Fint=4',
'--known-sizeof-char=1',
'--known-sizeof-double=8',
'--known-sizeof-float=4',
'--known-sizeof-int=4',
'--known-sizeof-long-long=8',
'--known-sizeof-long=8',
'--known-sizeof-short=2',
'--known-sizeof-size_t=8',
'--known-sizeof-void-p=8',
'--with-ar=ar',
'--with-batch=0',
'--with-cc="$CC"',
'--with-clib-autodetect=0',
'--with-cxx="$CXX"',
'--with-cxxlib-autodetect=0',
'--with-fc="$FC"',
'--with-fortran-datatypes=1',
'--with-fortran-interfaces=1',
'--with-fortran-bindings=1',
'--with-fortranlib-autodetect=0',
'--with-ranlib=ranlib',
'--with-scalar-type=real',
'--with-shared-ld=ar',
'--with-etags=0',
'--with-openmp=0',
'--with-x=0',
'--with-ssl=0',
'--with-shared-libraries=1',
'--with-mpi-lib=[]',
'--with-mpi-include=[]',
'--with-mpiexec=srun',
'--with-blas-lapack=1',
'--with-superlu=1',
'--with-superlu-dir="$EBROOTSUPERLU"',
'--with-superlu_dist=1',
'--with-superlu_dist-dir="$EBROOTSUPERLU_DIST"',
'--with-parmetis=1',
'--with-parmetis-dir="$EBROOTPARMETIS"',
'--with-metis=1',
'--with-metis-dir="$EBROOTMETIS"',
'--with-hypre=1',
'--with-hypre-dir="$EBROOTHYPRE"',
'--with-scalapack=1',
'--with-ptscotch=1',
'--with-ptscotch-dir="$EBROOTSCOTCH"',
'--with-mumps=1',
'--with-mumps-include="$EBROOTMUMPS/include"',
'--with-mumps-lib="-L$EBROOTMUMPS/lib -lcmumps -ldmumps -lesmumps -lsmumps -lzmumps -lmumps_common -lptesmumps -lesmumps -lpord -lmpifort"',
'--with-hdf5=1',
'--with-cxx-dialect=C++17',
'--with-hip',
'--with-hipc=hipcc',
'--with-hip-arch=gfx90a',
'--HIPFLAGS+="$(CC --cray-print-opts=cflags)"',
'--FFLAGS+=-fopenmp',
'--with-kokkos=1',
'--with-kokkos-dir="$EBROOTKOKKOS"',
'--with-kokkos-kernels=1',
'--with-kokkos-kernels-dir="$EBROOTKOKKOSMINKERNELS"',
'--with-python-exec="$CRAY_PYTHON_PREFIX"/bin/python3',
' PETSC_ARCH="$CRAY_CPU_TARGET-$CRAY_ACCEL_TARGET"',
])
buildopts = 'PETSC_ARCH=$CRAY_CPU_TARGET-$CRAY_ACCEL_TARGET PETSC_DIR=%(builddir)s/%(namelower)s-%(version)s lib all'
# This is for checking if linking against the library is correct
runtest = 'check_build MPIEXEC=exec'
sanity_check_paths = {
'files': ['lib/libpetsc.%s' % SHLIB_EXT],
'dirs': ['lib/pkgconfig', 'lib/petsc/bin'],
}
moduleclass = 'numlib'
modextravars = {'PETSC_ARCH': '$CRAY_CPU_TARGET-$CRAY_ACCEL_TARGET'}