petsc: 3.19.4 -> 3.21.0
This also allows building PETSc with hdf5 support.
This commit is contained in:
parent
d4499d288a
commit
4b0f3c2db5
@ -1,12 +1,12 @@
|
|||||||
diff --git a/src/snes/tutorials/makefile b/src/snes/tutorials/makefile
|
diff --git a/src/snes/tutorials/makefile b/src/snes/tutorials/makefile
|
||||||
index 672a62a..a5fd1c4 100644
|
index fa15faad39e..7670e80931e 100644
|
||||||
--- a/src/snes/tutorials/makefile
|
--- a/src/snes/tutorials/makefile
|
||||||
+++ b/src/snes/tutorials/makefile
|
+++ b/src/snes/tutorials/makefile
|
||||||
@@ -13,6 +13,7 @@ include ${PETSC_DIR}/lib/petsc/conf/rules
|
@@ -13,6 +13,7 @@ ex55: ex55.o ex55k.o
|
||||||
# these tests are used by the makefile in PETSC_DIR for basic tests of the install and should not be removed
|
# these tests are used by the makefile in PETSC_DIR for basic tests of the install and should not be removed
|
||||||
testex5f: ex5f.PETSc
|
testex5f: ex5f.PETSc
|
||||||
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex5f -snes_rtol 1e-4 > ex5f_1.tmp 2>&1; \
|
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex5f -snes_rtol 1e-4 > ex5f_1.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex5f_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex5f_1.tmp; \
|
||||||
if (${DIFF} output/ex5f_1.testout ex5f_1.tmp > /dev/null 2>&1) then \
|
if (${DIFF} output/ex5f_1.testout ex5f_1.tmp > /dev/null 2>&1) then \
|
||||||
echo "Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process"; \
|
echo "Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process"; \
|
||||||
else \
|
else \
|
||||||
@ -14,7 +14,7 @@ index 672a62a..a5fd1c4 100644
|
|||||||
${MAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ex5f.rm;
|
${MAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ex5f.rm;
|
||||||
testex19: ex19.PETSc
|
testex19: ex19.PETSc
|
||||||
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \
|
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
||||||
if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \
|
if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process"; \
|
||||||
else \
|
else \
|
||||||
@ -22,7 +22,7 @@ index 672a62a..a5fd1c4 100644
|
|||||||
${RM} -f ex19_1.tmp;
|
${RM} -f ex19_1.tmp;
|
||||||
testex19_mpi:
|
testex19_mpi:
|
||||||
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \
|
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres > ex19_1.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
||||||
if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \
|
if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes"; \
|
||||||
else \
|
else \
|
||||||
@ -30,71 +30,83 @@ index 672a62a..a5fd1c4 100644
|
|||||||
#use unpreconditioned norm because HYPRE device installations use different AMG parameters
|
#use unpreconditioned norm because HYPRE device installations use different AMG parameters
|
||||||
runex19_hypre:
|
runex19_hypre:
|
||||||
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
|
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
||||||
if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
|
if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE"; \
|
||||||
else \
|
else \
|
||||||
@@ -57,6 +61,7 @@ runex19_hypre:
|
@@ -57,6 +61,7 @@ runex19_hypre:
|
||||||
${RM} -f ex19_1.tmp
|
${RM} -f ex19_1.tmp
|
||||||
runex19_hypre_cuda:
|
runex19_hypre_cuda:
|
||||||
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type cuda -dm_mat_type aijcusparse -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
|
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type cuda -dm_mat_type aijcusparse -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
||||||
if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
|
if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre/cuda"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE/CUDA"; \
|
||||||
else \
|
else \
|
||||||
@@ -66,6 +71,7 @@ runex19_hypre_cuda:
|
@@ -66,6 +71,7 @@ runex19_hypre_cuda:
|
||||||
${RM} -f ex19_1.tmp
|
${RM} -f ex19_1.tmp
|
||||||
runex19_hypre_hip:
|
runex19_hypre_hip:
|
||||||
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type hip -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
|
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type hip -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
||||||
if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
|
if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre/hip"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with HYPRE/HIP"; \
|
||||||
else \
|
else \
|
||||||
@@ -75,6 +81,7 @@ runex19_hypre_hip:
|
@@ -75,6 +81,7 @@ runex19_hypre_hip:
|
||||||
${RM} -f ex19_1.tmp
|
${RM} -f ex19_1.tmp
|
||||||
runex19_cuda:
|
runex19_cuda:
|
||||||
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -snes_monitor -dm_mat_type seqaijcusparse -dm_vec_type seqcuda -pc_type gamg -pc_gamg_esteig_ksp_max_it 10 -ksp_monitor -mg_levels_ksp_max_it 3 > ex19_1.tmp 2>&1; \
|
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -snes_monitor -dm_mat_type seqaijcusparse -dm_vec_type seqcuda -pc_type gamg -ksp_monitor -mg_levels_ksp_max_it 1 > ex19_1.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
||||||
if (${DIFF} output/ex19_cuda_1.out ex19_1.tmp) then \
|
if (${DIFF} output/ex19_cuda_1.out ex19_1.tmp) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with cuda"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with CUDA"; \
|
||||||
else \
|
else \
|
||||||
@@ -84,6 +91,7 @@ runex19_cuda:
|
@@ -84,6 +91,7 @@ runex19_cuda:
|
||||||
${RM} -f ex19_1.tmp
|
${RM} -f ex19_1.tmp
|
||||||
runex19_ml:
|
runex19_ml:
|
||||||
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type ml > ex19_1.tmp 2>&1; \
|
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type ml > ex19_1.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
||||||
if (${DIFF} output/ex19_ml.out ex19_1.tmp) then \
|
if (${DIFF} output/ex19_ml.out ex19_1.tmp) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with ml"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with ML"; \
|
||||||
else \
|
else \
|
||||||
@@ -93,6 +101,7 @@ runex19_ml:
|
@@ -93,6 +101,7 @@ runex19_ml:
|
||||||
${RM} -f ex19_1.tmp
|
${RM} -f ex19_1.tmp
|
||||||
runex19_fieldsplit_mumps:
|
runex19_fieldsplit_mumps:
|
||||||
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type SCHUR -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_1_pc_type lu -snes_monitor_short -ksp_monitor_short -fieldsplit_0_pc_factor_mat_solver_type mumps -fieldsplit_1_pc_factor_mat_solver_type mumps > ex19_6.tmp 2>&1; \
|
-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type SCHUR -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_1_pc_type lu -snes_monitor_short -ksp_monitor_short -fieldsplit_0_pc_factor_mat_solver_type mumps -fieldsplit_1_pc_factor_mat_solver_type mumps > ex19_6.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19_6.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_6.tmp; \
|
||||||
if (${DIFF} output/ex19_fieldsplit_5.out ex19_6.tmp) then \
|
if (${DIFF} output/ex19_fieldsplit_5.out ex19_6.tmp) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with mumps"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with MUMPS"; \
|
||||||
else \
|
else \
|
||||||
@@ -102,6 +111,7 @@ runex19_fieldsplit_mumps:
|
@@ -102,6 +111,7 @@ runex19_fieldsplit_mumps:
|
||||||
${RM} -f ex19_6.tmp
|
${RM} -f ex19_6.tmp
|
||||||
runex19_superlu_dist:
|
runex19_superlu_dist:
|
||||||
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_grid_x 20 -da_grid_y 20 -pc_type lu -pc_factor_mat_solver_type superlu_dist > ex19.tmp 2>&1; \
|
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_grid_x 20 -da_grid_y 20 -pc_type lu -pc_factor_mat_solver_type superlu_dist > ex19.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19.tmp; \
|
||||||
if (${DIFF} output/ex19_superlu.out ex19.tmp) then \
|
if (${DIFF} output/ex19_superlu.out ex19.tmp) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with superlu_dist"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with SuperLU_DIST"; \
|
||||||
else \
|
else \
|
||||||
@@ -111,6 +121,7 @@ runex19_superlu_dist:
|
@@ -111,6 +121,7 @@ runex19_superlu_dist:
|
||||||
${RM} -f ex19.tmp
|
${RM} -f ex19.tmp
|
||||||
runex19_suitesparse:
|
runex19_suitesparse:
|
||||||
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type lu -pc_factor_mat_solver_type umfpack > ex19_1.tmp 2>&1; \
|
-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type lu -pc_factor_mat_solver_type umfpack > ex19_1.tmp 2>&1; \
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
|
||||||
if (${DIFF} output/ex19_suitesparse.out ex19_1.tmp) then \
|
if (${DIFF} output/ex19_suitesparse.out ex19_1.tmp) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex19 run successfully with suitesparse"; \
|
echo "C/C++ example src/snes/tutorials/ex19 run successfully with SuiteSparse"; \
|
||||||
else \
|
else \
|
||||||
@@ -120,6 +131,7 @@ runex19_suitesparse:
|
@@ -120,6 +131,7 @@ runex19_suitesparse:
|
||||||
${RM} -f ex19_1.tmp
|
${RM} -f ex19_1.tmp
|
||||||
runex3k_kokkos: ex3k.PETSc
|
runex3k_kokkos: ex3k.PETSc
|
||||||
-@OMP_PROC_BIND=false ${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex3k -view_initial -dm_vec_type kokkos -dm_mat_type aijkokkos -use_gpu_aware_mpi 0 -snes_monitor > ex3k_1.tmp 2>&1 ;\
|
-@OMP_PROC_BIND=false ${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex3k -view_initial -dm_vec_type kokkos -dm_mat_type aijkokkos -use_gpu_aware_mpi 0 -snes_monitor > ex3k_1.tmp 2>&1 ;\
|
||||||
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d' ex3k_1.tmp; \
|
+ sed -i '/hwloc\/linux/d ; /ERROR scandir(\/sys\/class\/net) failed/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex3k_1.tmp; \
|
||||||
if (${DIFF} output/ex3k_1.out ex3k_1.tmp) then \
|
if (${DIFF} output/ex3k_1.out ex3k_1.tmp) then \
|
||||||
echo "C/C++ example src/snes/tutorials/ex3k run successfully with kokkos-kernels"; \
|
echo "C/C++ example src/snes/tutorials/ex3k run successfully with Kokkos Kernels"; \
|
||||||
else \
|
else \
|
||||||
|
diff --git a/src/vec/vec/tests/makefile b/src/vec/vec/tests/makefile
|
||||||
|
index d1f047820ec..aab400535dd 100644
|
||||||
|
--- a/src/vec/vec/tests/makefile
|
||||||
|
+++ b/src/vec/vec/tests/makefile
|
||||||
|
@@ -5,6 +5,7 @@ include ${PETSC_DIR}/lib/petsc/conf/rules
|
||||||
|
|
||||||
|
runex47: ex47.PETSc
|
||||||
|
-@H5OUT=`mktemp -t petsc.h5.XXXXXX`; ${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex47 -filename $${H5OUT} > ex47_1.tmp 2>&1; \
|
||||||
|
+ sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex47_1.tmp; \
|
||||||
|
if (${DIFF} output/ex47_1.out ex47_1.tmp) then \
|
||||||
|
echo "C/C++ example src/vec/vec/tests/ex47 run successfully with HDF5"; \
|
||||||
|
else \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchurl,
|
fetchzip,
|
||||||
darwin,
|
darwin,
|
||||||
gfortran,
|
gfortran,
|
||||||
python3,
|
python3,
|
||||||
@ -11,6 +11,11 @@
|
|||||||
mpi, # generic mpi dependency
|
mpi, # generic mpi dependency
|
||||||
openssh, # required for openmpi tests
|
openssh, # required for openmpi tests
|
||||||
petsc-withp4est ? false,
|
petsc-withp4est ? false,
|
||||||
|
hdf5-support ? false,
|
||||||
|
hdf5,
|
||||||
|
metis,
|
||||||
|
parmetis,
|
||||||
|
pkg-config,
|
||||||
p4est,
|
p4est,
|
||||||
zlib, # propagated by p4est but required by petsc
|
zlib, # propagated by p4est but required by petsc
|
||||||
petsc-optimized ? false,
|
petsc-optimized ? false,
|
||||||
@ -23,11 +28,11 @@ assert petsc-withp4est -> p4est.mpiSupport;
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "petsc";
|
pname = "petsc";
|
||||||
version = "3.19.4";
|
version = "3.21.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchzip {
|
||||||
url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${version}.tar.gz";
|
url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${version}.tar.gz";
|
||||||
sha256 = "sha256-fJQbcb5Sw7dkIU5JLfYBCdEvl/fYVMl6RN8MTZWLOQY=";
|
hash = "sha256-2J6jtIKz1ZT9qwN8tuYQNBIeBJdE4Gt9cE3b5rTIeF4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit mpiSupport;
|
inherit mpiSupport;
|
||||||
@ -37,11 +42,12 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
python3
|
python3
|
||||||
gfortran
|
gfortran
|
||||||
|
pkg-config
|
||||||
] ++ lib.optional mpiSupport mpi ++ lib.optional (mpiSupport && mpi.pname == "openmpi") openssh;
|
] ++ lib.optional mpiSupport mpi ++ lib.optional (mpiSupport && mpi.pname == "openmpi") openssh;
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
blas
|
blas
|
||||||
lapack
|
lapack
|
||||||
] ++ lib.optional withp4est p4est;
|
] ++ lib.optional hdf5-support hdf5 ++ lib.optional withp4est p4est;
|
||||||
|
|
||||||
prePatch = lib.optionalString stdenv.isDarwin ''
|
prePatch = lib.optionalString stdenv.isDarwin ''
|
||||||
substituteInPlace config/install.py \
|
substituteInPlace config/install.py \
|
||||||
@ -69,6 +75,10 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-cxx=mpicxx"
|
"--with-cxx=mpicxx"
|
||||||
"--with-fc=mpif90"
|
"--with-fc=mpif90"
|
||||||
"--with-mpi=1"
|
"--with-mpi=1"
|
||||||
|
"--with-metis=1"
|
||||||
|
"--with-metis-dir=${metis}"
|
||||||
|
"--with-parmetis=1"
|
||||||
|
"--with-parmetis-dir=${parmetis}"
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
${lib.optionalString withp4est ''
|
${lib.optionalString withp4est ''
|
||||||
@ -76,27 +86,45 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-zlib-include=${zlib.dev}/include"
|
"--with-zlib-include=${zlib.dev}/include"
|
||||||
"--with-zlib-lib=-L${zlib}/lib -lz"
|
"--with-zlib-lib=-L${zlib}/lib -lz"
|
||||||
''}
|
''}
|
||||||
|
${lib.optionalString hdf5-support ''
|
||||||
|
"--with-hdf5=1"
|
||||||
|
"--with-hdf5-fortran-bindings=1"
|
||||||
|
"--with-hdf5-lib=-L${hdf5}/lib -lhdf5"
|
||||||
|
"--with-hdf5-include=${hdf5.dev}/include"
|
||||||
|
''}
|
||||||
"--with-blas=1"
|
"--with-blas=1"
|
||||||
"--with-lapack=1"
|
"--with-lapack=1"
|
||||||
"--with-scalar-type=${petsc-scalar-type}"
|
"--with-scalar-type=${petsc-scalar-type}"
|
||||||
"--with-precision=${petsc-precision}"
|
"--with-precision=${petsc-precision}"
|
||||||
${lib.optionalString petsc-optimized ''
|
${lib.optionalString petsc-optimized ''
|
||||||
"--with-debugging=0"
|
"--with-debugging=0"
|
||||||
COPTFLAGS='-g -O3'
|
COPTFLAGS='-O3'
|
||||||
FOPTFLAGS='-g -O3'
|
FOPTFLAGS='-O3'
|
||||||
CXXOPTFLAGS='-g -O3'
|
CXXOPTFLAGS='-O3'
|
||||||
|
CXXFLAGS='-O3'
|
||||||
''}
|
''}
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
hardeningDisable = lib.optionals (!petsc-optimized) [
|
||||||
|
"fortify"
|
||||||
|
"fortify3"
|
||||||
|
];
|
||||||
|
|
||||||
configureScript = "python ./configure";
|
configureScript = "python ./configure";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
|
||||||
|
# This is needed as the checks need to compile and link the test cases with
|
||||||
|
# -lpetsc, which is not available in the checkPhase, which is executed before
|
||||||
|
# the installPhase. The installCheckPhase comes after the installPhase, so
|
||||||
|
# the library is installed and available.
|
||||||
|
doInstallCheck = true;
|
||||||
|
installCheckTarget = "check_install";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Portable Extensible Toolkit for Scientific computation";
|
description = "Portable Extensible Toolkit for Scientific computation";
|
||||||
homepage = "https://www.mcs.anl.gov/petsc/index.html";
|
homepage = "https://petsc.org/release/";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
maintainers = with maintainers; [ cburstedde ];
|
maintainers = with maintainers; [ cburstedde ];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user