PETSc/3.24.2-cpeGNU-25.03-OpenMP-CPU (PETSc-3.24.2-cpeGNU-25.03-OpenMP-CPU.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.2-cpeGNU-25.03-OpenMP-CPU.
EasyConfig:
# Based on EPCC recipe from https://github.com/ARCHER2-HPC/pe-scripts/blob/modules-2022-12/sh/petsc.sh
#DOC PETSc for CPU, compiled with the multi-threaded LibSci libraries (and using OpenMP where possible).
#DOC When using this version of PETSc, you'll have to ensure that `-fopenmp` is used when linking
#DOC to avoid linking both the single- and multi-threaded LibSci libraries.
easyblock = 'ConfigureMake'
local_Boost_version = '1.88.0' # https://www.boost.org/
local_METIS_version = '5.1.0' # https:/http://glaros.dtc.umn.edu/gkhome/metis/metis/download
local_ParMETIS_version = '4.0.3' # https:/http://glaros.dtc.umn.edu/gkhome/metis/parmetis/download
local_SCOTCH7_version = '7.0.8' # https://gforge.inria.fr/projects/scotch/
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_PETSc_version = '3.24.2'
name = 'PETSc'
version = local_PETSc_version
versionsuffix = '-OpenMP-CPU'
homepage = 'https://www.mcs.anl.gov/petsc'
whatis = ['Description: PETSc, the Portable, Extensible Toolkit for Scientific Computation']
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.
This module is compiled with the multi-threaded LibSci libraries (and using
OpenMP where possible). When using this version of PETSc, you'll have to ensure
that `-fopenmp` is used when linking to avoid linking both the single- and
multi-threaded LibSci libraries.
"""
toolchain = {'name': 'cpeGNU', 'version': '25.03'}
toolchainopts = {'openmp': True, 'usempi': True, 'openmp': True, 'pic': True}
source_urls = ['https://web.cels.anl.gov/projects/petsc/download/release-snapshots']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['105c77cbc7361c078e013448bcad2c57ce8081377e5a8e49b3cc213f1a0a4a63']
builddependencies = [
('buildtools', '%(toolchain_version)s', '', True),
('craype-accel-host', EXTERNAL_MODULE),
]
dependencies = [
('cray-python', EXTERNAL_MODULE),
('cray-hdf5-parallel', EXTERNAL_MODULE),
('Boost', local_Boost_version),
('METIS', local_METIS_version),
('ParMETIS', local_ParMETIS_version),
('SCOTCH', local_SCOTCH7_version),
('MUMPS', local_MUMPS_version, '-OpenMP'),
('Hypre', local_Hypre_version),
('SuperLU', local_SuperLU_version, '-OpenMP'),
('SuperLU_DIST', local_SuperLU_DIST_version, '-OpenMP-CPU'),
]
configopts = ' '.join([
'--PETSC_ARCH="$CRAY_CPU_TARGET"',
'--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-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-scalapack=1',
'--with-ptscotch=1',
'--with-ptscotch-der="$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++11',
'--CFLAGS="-O3 -ffast-math -fopenmp"',
'--FFLAGS="-O3 -ffast-math -fopenmp -fallow-argument-mismatch"',
'--LDFLAGS="-fopenmp -Wl,--allow-multiple-definition"',
'--LIBS="-lgfortran -lgcc -lstdc++"',
])
# This is for checking if linking against the library is correct
runtest = 'check_build MPIEXEC=exec V=1'
sanity_check_paths = {
'files': ['lib/libpetsc.%s' % SHLIB_EXT],
'dirs': ['lib/pkgconfig', 'lib/petsc/bin'],
}
moduleclass = 'numlib'