(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
Empty Message
From f40bc7354c0534febcec0cb7496b575e4e75acc5 Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Wed, 11 Aug 2021 20:41:53 -0400
Subject: [PATCH 1/6] gnu: sundials-openmpi: Fix compilation with PETSc.
Without HDF5 in PETSc's propagated inputs, SUNDIALS's configure script
disables PETSc support (even though it is requested in the configure
flags) because it fails to compile a test program which includes a PETSc
header which itself includes an HDF5 header.
* gnu/packages/maths.scm (petsc-openmpi)[inputs]: Move
hdf5-parallel-openmpi to...
[propagated-inputs]: ...here.
---
gnu/packages/maths.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Toggle diff (24 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ce9515fb35..29a4aa4c07 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2724,14 +2724,15 @@ scientific applications modeled by partial differential equations.")
(package (inherit petsc)
(name "petsc-openmpi")
(inputs
- `(("hdf5" ,hdf5-parallel-openmpi)
- ("hypre" ,hypre-openmpi)
+ `(("hypre" ,hypre-openmpi)
("metis" ,metis)
("mumps" ,mumps-openmpi)
("openmpi" ,openmpi)
("scalapack" ,scalapack)
("scotch" ,pt-scotch32)
,@(package-inputs petsc)))
+ (propagated-inputs
+ `(("hdf5" ,hdf5-parallel-openmpi))) ; petscis.h includes H5Ipublic.h.
(arguments
(substitute-keyword-arguments (package-arguments petsc)
((#:configure-flags cf)
--
2.32.0
From 99be21c21b0d7793af6bcf5aa0f214f026037fe0 Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Thu, 12 Aug 2021 16:01:02 -0400
Subject: [PATCH 6/6] gnu: dealii: Add SUNDIALS dependency.
* gnu/packages/maths.scm (dealii)[propagated-inputs]: Add sundials.
(dealii-openmpi)[propagated-inputs]: Add sundials-openmpi.
---
gnu/packages/maths.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Toggle diff (26 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 980460fa85..49624c0f52 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4837,6 +4837,7 @@ A unique design feature of Trilinos is its focus on packages.")
`(("boost" ,boost)
("hdf5" ,hdf5)
("suitesparse" ,suitesparse) ; For UMFPACK.
+ ("sundials" ,sundials)
("tbb" ,tbb)))
(arguments
`(#:build-type "DebugRelease" ; Supports only Debug, Release and DebugRelease.
@@ -4890,8 +4891,10 @@ in finite element programs.")
("p4est" ,p4est-openmpi)
("petsc" ,petsc-openmpi)
("slepc" ,slepc-openmpi)
+ ("sundials" ,sundials-openmpi)
("trilinos" ,trilinos-for-dealii-openmpi)
- ,@(alist-delete "hdf5" (package-propagated-inputs dealii))))
+ ,@(fold alist-delete (package-propagated-inputs dealii)
+ '("hdf5" "sundials"))))
(arguments
(substitute-keyword-arguments (package-arguments dealii)
((#:configure-flags flags)
--
2.32.0
From 18bce77a9baa50bbe485ce4a74e5b281aa7dcc8a Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Wed, 11 Aug 2021 21:00:33 -0400
Subject: [PATCH 3/6] gnu: sundials-openmpi: Add HYPRE dependency.
* gnu/packages/maths.scm (sundials): Remove TODO item obsoleted by this
commit.
(sundials-openmpi)[propagated-inputs]: Add hypre-openmpi.
[arguments]<#:configure-flags>: Add -DHYPRE_ENABLE, -DHYPRE_INCLUDE_DIR
and -DHYPRE_LIBRARY_DIR.
---
gnu/packages/maths.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
Toggle diff (38 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d90cc94156..5195dd6180 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5694,7 +5694,7 @@ and comparisons are supported.")
(inputs
`(("fortran" ,gfortran) ;for fcmix
("blas" ,openblas)
- ("suitesparse" ,suitesparse))) ;TODO: Add hypre
+ ("suitesparse" ,suitesparse)))
(arguments
`(#:configure-flags `("-DEXAMPLES_ENABLE_C:BOOL=ON"
"-DEXAMPLES_ENABLE_CXX:BOOL=ON"
@@ -5723,12 +5723,21 @@ easily be incorporated into existing simulation codes.")
(name "sundials-openmpi")
(propagated-inputs
`(("mpi" ,openmpi)
- ("petsc" ,petsc-openmpi) ;support in SUNDIALS requires MPI
+ ;; Support for the below requires MPI.
+ ("hypre" ,hypre-openmpi)
+ ("petsc" ,petsc-openmpi)
,@(package-propagated-inputs sundials)))
(arguments
(substitute-keyword-arguments (package-arguments sundials)
((#:configure-flags flags '())
`(cons* "-DMPI_ENABLE:BOOL=ON"
+ "-DHYPRE_ENABLE:BOOL=ON"
+ (string-append "-DHYPRE_INCLUDE_DIR="
+ (assoc-ref %build-inputs "hypre")
+ "/include")
+ (string-append "-DHYPRE_LIBRARY_DIR="
+ (assoc-ref %build-inputs "hypre")
+ "/lib")
"-DPETSC_ENABLE:BOOL=ON"
(string-append "-DPETSC_INCLUDE_DIR="
(assoc-ref %build-inputs "petsc")
--
2.32.0
From 6d8efb16b8e3919a58d7d7bbef939802824a168d Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Wed, 11 Aug 2021 21:04:42 -0400
Subject: [PATCH 2/6] gnu: sundials-openmpi: Propagate all inputs.
* gnu/packages/maths.scm (sundials-openmpi)[inputs]: Move openmpi and
petsc-openmpi to...
[propagated-inputs]: ...here.
---
gnu/packages/maths.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Toggle diff (19 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 29a4aa4c07..d90cc94156 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5721,10 +5721,10 @@ easily be incorporated into existing simulation codes.")
(define-public sundials-openmpi
(package (inherit sundials)
(name "sundials-openmpi")
- (inputs
+ (propagated-inputs
`(("mpi" ,openmpi)
("petsc" ,petsc-openmpi) ;support in SUNDIALS requires MPI
- ,@(package-inputs sundials)))
+ ,@(package-propagated-inputs sundials)))
(arguments
(substitute-keyword-arguments (package-arguments sundials)
((#:configure-flags flags '())
--
2.32.0