Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions easybuild/easyconfigs/p/PETSc/PETSc-3.17.0-foss-2021a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Updated to version 3.17.0 with significantly more modules added
# J. Sassmannshausen ICL/UK

easyblock = 'ConfigureMake'

name = 'PETSc'
version = '3.17.0'

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.

This installation is build with significant amounts of modules in it compared to previous versions."""

toolchain = {'name': 'foss', 'version': '2021a'}
toolchainopts = {'openmp': True, 'usempi': True, 'pic': True}

source_urls = [
'https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/',
'ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/',
]
sources = [SOURCELOWER_TAR_GZ]
patches = [
'webclient-3.17.0.patch',
]
checksums = [
'96d5aca684e1ce1425891a620d278773c25611cb144165a93b17531238eaaf8a', # petsc-3.17.0.tar.gz
'2ba253df42853385e2683dbc87dfcb66d4ce4bcd84e054efa8f466274f49bc81', # webclient-3.17.0.patch
]

builddependencies = [
('Eigen', '3.3.9'),
('CMake', '3.20.1')
]

dependencies = [
('Python', '3.9.5'),
('SciPy-bundle', '2021.05'),
('Boost', '1.76.0'),
('METIS', '5.1.0'),
('SCOTCH', '6.1.0'),
('MUMPS', '5.4.0', '-metis'),
('SuiteSparse', '5.10.1', '-METIS-5.1.0'),
('Hypre', '2.21.0'),
('zlib', '1.2.11'),
('BLIS', '0.8.1'),
('Szip', '2.1.1'),
('HDF5', '1.10.7'),
('GMP', '6.2.1'),
('GSL', '2.7'),
('libjpeg-turbo', '2.0.6'),
('libpng', '1.6.37'),
('giflib', '5.2.1'),
('OpenSSL', '1.1', '', SYSTEM),
('libyaml', '0.2.5'),
('zstd', '1.4.9'),
('Mmg', '5.6.0'),
('MPFR', '4.1.0'),
('googletest', '1.11.0'),
('muParser', '2.3.3'),
('ParMETIS', '4.0.3'),
('SuperLU', '5.3.0'),
]

# enabling --with-mpi4py seems to be totally broken, leads to make errors like:
# No rule to make target 'mpi4py-build'
configopts = '--configModules=PETSc.Configure --optionsModule=config.compilerOptions '
configopts += '--LIBS="$LIBS -lrt" --with-mpi4py=0 --CXXFLAGS="$CXXFLAGS '
configopts += '-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX" --with-mpi=1 --with-build-step-np=4 '
configopts += '--CPPFLAGS="$CPPFLAGS" --F90FLAGS="$F90FLAGS" --FFLAGS="$FFLAGS" --FCFLAGS="$FCFLAGS" '
configopts += '--with-blaslapack-lib=" -lflexiblas -lgfortran" '
configopts += '--with-shared-libraries=1 --with-debugging=0 --with-pic=1 --with-x=0 '
configopts += '--with-windows-graphics=0 --with-numpy=1 --with-fftw=1 --with-scalapack=1 '
configopts += '--with-python=1 --with-boost=1 --with-metis=1 -with-ptscotch=1 --with-mumps=1 '
configopts += '--with-hypre=1 --with-suitesparse=1 --with-hwloc=1 --with-openmp=1 --with-zlib=1 --with-blis=1 '
configopts += '--with-hdf5=1 --with-eigen=1 --with-parmetis=1 --with-gmp=1 --with-gsl=1 --with-libjpeg=1 '
configopts += '--with-libpng=1 --with-yaml=1 --with-zstd=1 --with-ssl=1 --with-triangle=0 --with-giflib=1 '
configopts += '--with-superlu=1 '

sanity_check_paths = {
'files': ['lib/libpetsc.%s' % SHLIB_EXT],
'dirs': ['include', 'share']
}

moduleclass = 'numlib'
69 changes: 69 additions & 0 deletions easybuild/easyconfigs/p/PETSc/webclient-3.17.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Based on https://gitlab.com/petsc/petsc/-/merge_requests/5257
Author: J. Sassmannshausen / ICL (UK)
diff --git a/petsc-3.17.0.orig/config/examples/arch-ci-freebsd-cxx-cmplx-pkgs-dbg.py b/petsc-3.17.0/config/examples/arch-ci-freebsd-cxx-cmplx-pkgs-dbg.py
index ecc3b03..6c6c354 100755
--- a/petsc-3.17.0.orig/config/examples/arch-ci-freebsd-cxx-cmplx-pkgs-dbg.py
+++ b/petsc-3.17.0/config/examples/arch-ci-freebsd-cxx-cmplx-pkgs-dbg.py
@@ -36,6 +36,7 @@ configure_options = [
'--with-mpi-f90module-visibility=0',
'--download-kokkos=1',
'--download-kokkos-kernels=1',
+ '--with-ssl=1',
]

if __name__ == '__main__':
diff --git a/petsc-3.17.0.orig/config/examples/arch-ci-linux-gcc-pkgs-opt.py b/petsc-3.17.0/config/examples/arch-ci-linux-gcc-pkgs-opt.py
index 8828156..132e3d6 100755
--- a/petsc-3.17.0.orig/config/examples/arch-ci-linux-gcc-pkgs-opt.py
+++ b/petsc-3.17.0/config/examples/arch-ci-linux-gcc-pkgs-opt.py
@@ -28,6 +28,7 @@ configure_options = [
'--download-amrex',
'--download-hypre',
'--download-ks',
+ '--with-ssl=1',
]

if __name__ == '__main__':
diff --git a/petsc-3.17.0.orig/src/sys/webclient/box.c b/petsc-3.17.0/src/sys/webclient/box.c
index d306966..eb2fac7 100644
--- a/petsc-3.17.0.orig/src/sys/webclient/box.c
+++ b/petsc-3.17.0/src/sys/webclient/box.c
@@ -304,9 +304,9 @@ PetscErrorCode PetscBoxUpload(MPI_Comm comm,const char access_token[],const char
PetscCall(PetscPushJSONValue(body,"mimeType","text.html",len));
PetscCall(PetscStrcat(body,","));
PetscCall(PetscPushJSONValue(body,"description","a file",len));
- ierr = PetscStrcat(body, "}\r\n\r\n"
- "--foo_bar_baz\r\n"
- "Content-Type: text/html\r\n\r\n");PetscCall(ierr);
+ PetscCall(PetscStrcat(body, "}\r\n\r\n"
+ "--foo_bar_baz\r\n"
+ "Content-Type: text/html\r\n\r\n"));
PetscCall(PetscStrlen(body,&blen));
fd = fopen (filename, "r");
PetscCheck(fd,PETSC_COMM_SELF,PETSC_ERR_FILE_OPEN,"Unable to open file: %s",filename);
diff --git a/petsc-3.17.0.orig/src/sys/webclient/client.c b/petsc-3.17.0/src/sys/webclient/client.c
index dfe6b12..350cac9 100644
--- a/petsc-3.17.0.orig/src/sys/webclient/client.c
+++ b/petsc-3.17.0/src/sys/webclient/client.c
@@ -123,7 +123,7 @@ static PetscErrorCode PetscHTTPBuildRequest(const char type[],const char url[],c

if (header) {
PetscCall(PetscStrendswith(header,"\r\n",&flg));
- PetscCheck(flg,PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"header must end with \\r\");
+ PetscCheck(flg,PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"header must end with \\r\\n");
}

PetscCall(PetscStrlen(type,&typelen));
diff --git a/petsc-3.17.0.orig/src/sys/webclient/google.c b/petsc-3.17.0/src/sys/webclient/google.c
index 8626b7c..c66f8cc 100644
--- a/petsc-3.17.0.orig/src/sys/webclient/google.c
+++ b/petsc-3.17.0/src/sys/webclient/google.c
@@ -158,7 +158,7 @@ PetscErrorCode PetscGoogleDriveUpload(MPI_Comm comm,const char access_token[],co
fd = fopen (filename, "r");
PetscCheck(fd,PETSC_COMM_SELF,PETSC_ERR_FILE_OPEN,"Unable to open file: %s",filename);
rd = fread (body+blen, sizeof (unsigned char), sb.st_size, fd);
- PetscCheckFalse(rd != (size_t) sb.st_size,PETSC_COMM_SELF,PETSC_ERR_FILE_OPEN,"Unable to read entire file: %s %d %d",filename,(int)rd,sb.st_size);
+ PetscCheckFalse(rd != (size_t) sb.st_size,PETSC_COMM_SELF,PETSC_ERR_FILE_OPEN,"Unable to read entire file: %s %d %d",filename,(int)rd,(int)sb.st_size);
fclose(fd);
body[blen + rd] = 0;
ierr = PetscStrcat(body,"\r\n\r\n"