Petsc: 3.21.4 -> 3.22.4 (#386732)

This commit is contained in:
Markus Kowalewski
2025-03-04 13:37:41 +01:00
committed by GitHub
3 changed files with 19 additions and 12 deletions
+4 -2
View File
@@ -53,11 +53,11 @@ assert withMumps -> withScalapack;
stdenv.mkDerivation rec {
pname = "petsc";
version = "3.21.4";
version = "3.22.4";
src = fetchzip {
url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${version}.tar.gz";
hash = "sha256-l7v+ASBL9FLbBmBGTRWDwBihjwLe3uLz+GwXtn8u7e0=";
hash = "sha256-8WV1ylXytkhiNa7YpWSOIpSvzLCCjdVVe5SiGfhicas=";
};
strictDeps = true;
@@ -179,6 +179,8 @@ stdenv.mkDerivation rec {
inherit mpiSupport;
};
setupHook = ./setup-hook.sh;
meta = with lib; {
description = "Portable Extensible Toolkit for Scientific computation";
homepage = "https://petsc.org/release/";
+1
View File
@@ -0,0 +1 @@
export PETSC_DIR=@out@
+14 -10
View File
@@ -2,13 +2,14 @@
stdenv,
lib,
fetchFromBitbucket,
fetchzip,
gfortran,
mpi,
petsc,
blas,
lapack,
parmetis,
hdf5,
hdf5-fortran-mpi,
mpiCheckPhaseHook,
python3,
}:
@@ -29,10 +30,18 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ gfortran ];
buildInputs = [
petsc
# upstream petsc has lots of fortran api change since 3.22.*
# will keep using old petsc-3.21.4 until pflotran support latest petsc
(petsc.overrideAttrs rec {
version = "3.21.4";
src = fetchzip {
url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${version}.tar.gz";
hash = "sha256-l7v+ASBL9FLbBmBGTRWDwBihjwLe3uLz+GwXtn8u7e0=";
};
})
blas
lapack
hdf5
hdf5-fortran-mpi
parmetis
];
@@ -50,15 +59,10 @@ stdenv.mkDerivation (finalAttrs: {
*/
preConfigure = ''
substituteInPlace src/pflotran/makefile \
--subst-var-by "HDF5_FORTRAN_LIBS" "${lib.getLib hdf5}/lib" \
--subst-var-by "HDF5_FORTRAN_INCLUDE" "${lib.getDev hdf5}/include"
--subst-var-by "HDF5_FORTRAN_LIBS" "${lib.getLib hdf5-fortran-mpi}/lib" \
--subst-var-by "HDF5_FORTRAN_INCLUDE" "${lib.getDev hdf5-fortran-mpi}/include"
'';
configureFlags = [
"--with-petsc-dir=${petsc}"
"--with-petsc-arch=linux-gnu-c-release"
];
meta = with lib; {
description = "Parallel, multi-physics simulation code for subsurface flow and transport";
homepage = "https://pflotran.org/";