[PATCH] gnu: sundials, dealii: Update sundials to 5.7.0 and add to dealii inputs.

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxime Devos
  • Paul A. Patience
Owner
unassigned
Submitted by
Paul A. Patience
Severity
normal
P
P
Paul A. Patience wrote on 16 Aug 2021 21:36
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
6Abcei333HndyePtIlrvInlD3K8GinERwUsQYdy4x-nI_nq0xWCD8pmz8IiztFGeX7U865l0LM6m1NX7EcXuvjjbqT0k8sJbfKk9lmiUnuA=@apatience.com
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
P
P
Paul A. Patience wrote on 21 Oct 2021 15:52
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
6cBXV-H40UEjARwzz9KMZuZpWK0BpuaFwp4UjLi-h3YZds_ecxIJx6el7vZubkQaFmjmMh10bskNpn9AlPrwLKG9JCWI2kw3cQwyYNKuYbI=@apatience.com
Ping.
P
P
Paul A. Patience wrote on 14 Apr 2022 20:06
Commit updating SUNDIALS to 6.1.1.
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 50080@debbugs.gnu.org)(address . 50080@debbugs.gnu.org)
gh6YS-LoOHe0DhWsHej5HwRYrkqxL8bZd-ZRRNEmKpS-8vnRWNv10XKFl37Z2OuzRxJDh21FrKn63GfWvruImSEJ1W-qYlKs11zIV6VLvY4=@apatience.com
Hi Ludo,

I see that you have updated SUNDIALS to 6.1.1.
When last I updated it (to 5.7.0) [1], I encountered issues in 32-bit vs 64-bit
indices, which I see no mention of in your commit.
There were also some other issues which I mentioned in my patch series'
commit messages.

Do you know if the update to 6.1.1 renders the issues extraneous?
A good test would be adding SUNDIALS as a propagated input to
deal.II.
That had been my original goal.

Thanks,
Paul

L
L
Ludovic Courtès wrote on 15 Apr 2022 10:50
(name . Paul A. Patience)(address . paul@apatience.com)(name . 50080@debbugs.gnu.org)(address . 50080@debbugs.gnu.org)
878rs67msg.fsf@gnu.org
Hi Paul,

"Paul A. Patience" <paul@apatience.com> skribis:

Toggle quote (8 lines)
> I see that you have updated SUNDIALS to 6.1.1.
> When last I updated it (to 5.7.0) [1], I encountered issues in 32-bit vs 64-bit
> indices, which I see no mention of in your commit.
> There were also some other issues which I mentioned in my patch series'
> commit messages.
>
> Do you know if the update to 6.1.1 renders the issues extraneous?

Thanks for bringing it up, I had overlooked this patch of yours—my
apologies for that. I don’t know if the new version defaults to 64-bit
or 32-bit indices.

Toggle quote (3 lines)
> A good test would be adding SUNDIALS as a propagated input to
> deal.II.

I tried that; this leads to a build failure apparently due to changes in
the API of SUNDIALS:

Toggle snippet (32 lines)
/tmp/guix-build-dealii-9.3.2.drv-0/dealii-9.3.2/source/sundials/arkode.cc: In instantiation of ‘void dealii::SUNDIALS::ARKode<VectorType>::rese
t(double, double, const VectorType&) [with VectorType = dealii::Vector<double>]’:
/tmp/guix-build-dealii-9.3.2.drv-0/dealii-9.3.2/source/sundials/arkode.cc:838:18: required from here
/tmp/guix-build-dealii-9.3.2.drv-0/dealii-9.3.2/source/sundials/arkode.cc:635:31: error: too few arguments to function ‘void* ARKStepCreate(ARK
RhsFn, ARKRhsFn, realtype, N_Vector, SUNContext)’
635 | arkode_mem = ARKStepCreate(
| ~~~~~~~~~~~~~^
636 | explicit_function ? &t_arkode_explicit_function<VectorType> : nullptr,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
637 | implicit_function ? &t_arkode_implicit_function<VectorType> : nullptr,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
638 | current_time,
| ~~~~~~~~~~~~~
639 | initial_condition_nvector);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/guix-build-dealii-9.3.2.drv-0/dealii-9.3.2/source/sundials/arkode.cc:45:
/gnu/store/vyl9wll72m9jqc21idxrxnmb7rm0lkf7-sundials-6.1.1/include/arkode/arkode_arkstep.h:112:23: note: declared here
112 | SUNDIALS_EXPORT void* ARKStepCreate(ARKRhsFn fe, ARKRhsFn fi,
| ^~~~~~~~~~~~~
/tmp/guix-build-dealii-9.3.2.drv-0/dealii-9.3.2/source/sundials/arkode.cc: In instantiation of ‘void dealii::SUNDIALS::ARKode<VectorType>::setu
p_system_solver(const VectorType&) [with VectorType = dealii::Vector<double>]’:
/tmp/guix-build-dealii-9.3.2.drv-0/dealii-9.3.2/source/sundials/arkode.cc:838:18: required from here
/tmp/guix-build-dealii-9.3.2.drv-0/dealii-9.3.2/source/sundials/arkode.cc:710:30: error: too few arguments to function ‘_generic_SUNLinearSolve
r* SUNLinSol_SPGMR(N_Vector, int, int, SUNContext)’
710 | SUNLinSol_SPGMR(y_template,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
711 | PREC_NONE,
| ~~~~~~~~~~
712 | 0 /*krylov subvectors, 0 uses default*/);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I’m probably less familiar than you with these two packages; what would
you suggest?

Please keep me Cc’d and hopefully we can address these issues for good
this time!

Thanks,
Ludo’.
P
P
Paul A. Patience wrote on 20 Apr 2022 16:31
(name . Ludovic Courtès)(address . ludovic.courtes@inria.fr)(name . 50080@debbugs.gnu.org)(address . 50080@debbugs.gnu.org)
87y1zzj08g.fsf@apatience.com
Hi Ludovic,

On 2022-04-15 04:50:39-04:00, Ludovic Courtès wrote:
Toggle quote (3 lines)
> I’m probably less familiar than you with these two packages; what would
> you suggest?

I will go through my old patches taking into consideration the latest
version of SUNDIALS.
I had discovered the mismatched integer sizes because of some
build failures, so it should be relatively easy to reproduce in the
latest version of SUNDIALS.
It is possible that deal.II does not yet support the latest version of
SUNDIALS, in which case we will need to keep the old version around,
perhaps as dealii-sundials or some such.

Toggle quote (3 lines)
> Please keep me Cc’d and hopefully we can address these issues for good
> this time!

I should get around to this this week or next.

Best regards,
Paul
P
P
Paul A. Patience wrote on 26 Apr 2022 19:46
(name . Ludovic Courtès)(address . ludovic.courtes@inria.fr)(name . 50080@debbugs.gnu.org)(address . 50080@debbugs.gnu.org)
87zgk7d9g9.fsf@apatience.com
On 2022-04-15 04:50:39-04:00, Ludovic Courtès wrote:
Toggle quote (7 lines)
> "Paul A. Patience" <paul@apatience.com> skribis:
>> A good test would be adding SUNDIALS as a propagated input to
>> deal.II.
>
> I tried that; this leads to a build failure apparently due to changes in
> the API of SUNDIALS:

I just checked and indeed, support for SUNDIALS 6.0.0 and later is
present only in the master branch of deal.II (added this past February
[1]), so we will need two versions of the SUNDIALS package for now.

I am taking a look at the integer sizes and other issues now.

Best regards,
Paul

P
P
Paul A. Patience wrote on 26 Apr 2022 21:47
(name . Ludovic Courtès)(address . ludovic.courtes@inria.fr)(name . 50080@debbugs.gnu.org)(address . 50080@debbugs.gnu.org)
87tuafd4az.fsf@apatience.com
Hi Ludovic,

On 2022-04-15 04:50:39-04:00, Ludovic Courtès wrote:
Toggle quote (7 lines)
> "Paul A. Patience" <paul@apatience.com> skribis:
>> Do you know if the update to 6.1.1 renders the issues extraneous?
>
> Thanks for bringing it up, I had overlooked this patch of yours—my
> apologies for that. I don’t know if the new version defaults to 64-bit
> or 32-bit indices.

Ok, I figured out what happened.

Toggle snippet (19 lines)
("petsc" ,petsc-openmpi) ;support in SUNDIALS requires MPI
- ,@(package-inputs sundials)))
+ ("petsc-openmpi" ,petsc-openmpi) ;support in SUNDIALS requires MPI
+ ,@(alist-delete "petsc" (package-inputs sundials))))
(arguments
(substitute-keyword-arguments (package-arguments sundials)
((#:configure-flags flags '())
- `(cons* "-DMPI_ENABLE:BOOL=ON"
- "-DPETSC_ENABLE:BOOL=ON"
- (string-append "-DPETSC_INCLUDE_DIR="
- (assoc-ref %build-inputs "petsc")
- "/include")
- (string-append "-DPETSC_LIBRARY_DIR="
- (assoc-ref %build-inputs "petsc")
- "/lib")
- ,flags))
+ `(cons* "-DENABLE_MPI:BOOL=ON" ,flags))

You accidentally disabled PETSc support in SUNDIALS by not re-adding
PETSC_ENABLE in the sundials (not sundials-openmpi) package.
If you had done so, the configure step would have failed because PETSc
is supported in SUNDIALS only with MPI (hence the comment).
Once we enable PETSc again, the index size problem appears again, even
with SUNDIALS 6.1.1.

Basically, I think all of my changes are still relevant.
I still think setting the sundials and sundials-openmpi's index sizes to
32 bits is the most logical option (see the commit message in the
“gnu: sundials: Update to 5.7.0.” patch).

I will bring my old patch series up to date and submit it again when
it's done.

Best regards,
Paul
L
L
Ludovic Courtès wrote on 28 Apr 2022 12:04
(name . Paul A. Patience)(address . paul@apatience.com)(name . 50080@debbugs.gnu.org)(address . 50080@debbugs.gnu.org)
87mtg5ed6x.fsf@inria.fr
Hi Paul,

"Paul A. Patience" <paul@apatience.com> skribis:

Toggle quote (33 lines)
> On 2022-04-15 04:50:39-04:00, Ludovic Courtès wrote:
>> "Paul A. Patience" <paul@apatience.com> skribis:
>>> Do you know if the update to 6.1.1 renders the issues extraneous?
>>
>> Thanks for bringing it up, I had overlooked this patch of yours—my
>> apologies for that. I don’t know if the new version defaults to 64-bit
>> or 32-bit indices.
>
> Ok, I figured out what happened.
>
> ("petsc" ,petsc-openmpi) ;support in SUNDIALS requires MPI
> - ,@(package-inputs sundials)))
> + ("petsc-openmpi" ,petsc-openmpi) ;support in SUNDIALS requires MPI
> + ,@(alist-delete "petsc" (package-inputs sundials))))
> (arguments
> (substitute-keyword-arguments (package-arguments sundials)
> ((#:configure-flags flags '())
> - `(cons* "-DMPI_ENABLE:BOOL=ON"
> - "-DPETSC_ENABLE:BOOL=ON"
> - (string-append "-DPETSC_INCLUDE_DIR="
> - (assoc-ref %build-inputs "petsc")
> - "/include")
> - (string-append "-DPETSC_LIBRARY_DIR="
> - (assoc-ref %build-inputs "petsc")
> - "/lib")
> - ,flags))
> + `(cons* "-DENABLE_MPI:BOOL=ON" ,flags))
>
> You accidentally disabled PETSc support in SUNDIALS by not re-adding
> PETSC_ENABLE in the sundials (not sundials-openmpi) package.
> If you had done so, the configure step would have failed because PETSc
> is supported in SUNDIALS only with MPI (hence the comment).

Oops, got it; sorry about that.

Toggle quote (11 lines)
> Once we enable PETSc again, the index size problem appears again, even
> with SUNDIALS 6.1.1.
>
> Basically, I think all of my changes are still relevant.
> I still think setting the sundials and sundials-openmpi's index sizes to
> 32 bits is the most logical option (see the commit message in the
> “gnu: sundials: Update to 5.7.0.” patch).
>
> I will bring my old patch series up to date and submit it again when
> it's done.

Excellent. Please let me know when you’re done and I’ll happily apply
it.

Thanks!

Ludo’.
P
P
Paul A. Patience wrote on 28 Apr 2022 19:11
[PATCH v2 1/4] gnu: petsc-openmpi: Fix inputs.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220428171109.217461-2-paul@apatience.com
* gnu/packages/maths.scm (petsc-openmpi)[inputs]: Move
hdf5-parallel-openmpi from here...
[propagated-inputs]: ...to here.
---
gnu/packages/maths.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index fcd9c5482f..593bb4651c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3139,14 +3139,15 @@ (define-public petsc-openmpi
(name "petsc-openmpi")
(inputs
(modify-inputs (package-inputs petsc)
- (prepend hdf5-parallel-openmpi
- hypre-openmpi
+ (prepend hypre-openmpi
metis
mumps-openmpi
openmpi
scalapack
pt-scotch32
`(,pt-scotch32 "metis"))))
+ (propagated-inputs
+ (list hdf5-parallel-openmpi)) ; petsclayouthdf5.h includes H5Ipublic.h.
(arguments
(substitute-keyword-arguments (package-arguments petsc)
((#:configure-flags cf)
--
2.36.0
P
P
Paul A. Patience wrote on 28 Apr 2022 19:11
[PATCH v2 0/4] gnu: sundials: Fix various issues and update to 6.2.0.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220428171109.217461-1-paul@apatience.com
This v2 patch series fixes various issues in the sundials packages (including
all those fixed by the v1 patches), and also updates SUNDIALS to 6.2.0,
because why not.
However, it does not add SUNDIALS to deal.II's dependencies because I
encountered some problems while building Trilinos (which is weird because it
doesn't seem to have changed since I added it last year).
I will therefore open another ticket where I will add SUNDIALS to deal.II's
dependencies, and let this one be closed (hopefully :)) by this patch series.

Paul A. Patience (4):
gnu: petsc-openmpi: Fix inputs.
gnu: sundials: Fix various issues.
gnu: sundials-openmpi: Add HYPRE dependency.
gnu: sundials: Update to 6.2.0.

gnu/packages/maths.scm | 80 ++++++++++++++++++++++++++----------------
1 file changed, 50 insertions(+), 30 deletions(-)

--
2.36.0
P
P
Paul A. Patience wrote on 28 Apr 2022 19:11
[PATCH v2 2/4] gnu: sundials: Fix various issues.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220428171109.217461-3-paul@apatience.com
This commit fixes various issues. First, some of SUNDIALS's CMake
variables were renamed at some point between 5.2.0 and 5.7.0, in
particular KLU_ENABLE, which was changed to ENABLE_KLU. Since
sundials-julia is essentially SUNDIALS 5.2.0, its configure flags need
to be different from those of the sundials package. Second, commit
61bcd648ca215e3d8e75b3a3f49bfb94d66f7c79, which updated SUNDIALS to
6.1.1, accidentally completely disabled PETSc support for
sundials-openmpi (PETSc is supported only with MPI) by removing the
relevant configure flags. Third, SUNDIALS's default index size is
64 bits, but PETSc's is 32 bits, and they need to be the same; this
issue is discussed in the next three paragraphs.

The default index size in SUNDIALS 3.1.1 (which was the sundials
package's version previous to the aforementioned commit) was also
64 bits (though it was configured through the SUNDIALS_INDEX_TYPE CMake
variable, which could take the values INT64_T or INT32_T), but
SUNDIALS's configure script didn't warn of any incompatibility with
PETSc's 32-bit indices. I don't know if this was an accidental omission
from the configure script or if SUNDIALS's index size didn't have to
correspond to PETSc's at the time.

Keeping 64-bit indices in SUNDIALS would require adding a package for
PETSc with 64-bit indices (using the --with-64-bit-indices configure
flag), possibly named petsc64-openmpi (to follow the style of the SCOTCH
packages, i.e., scotch, scotch32, etc., though there the unadorned
package name represents the 64-bit version, unlike the unadorned petsc),
which would in turn require a package for METIS with 64-bit
indices (using IDXTYPEWIDTH=64). However, SUNDIALS is an optional
dependency of deal.II, both of which have PETSc as an optional
dependency, and deal.II's index size (which defaults to 32 bits) must
match PETSc's. In other words, the current deal.II package can build
with SUNDIALS only if SUNDIALS has 32-bit indices.

Furthermore, users needing 64-bit indices in SUNDIALS probably also need
them in PETSc and other libraries. If and when 64-bit indices are deemed
necessary, we can add all the package variations at once (for SUNDIALS,
PETSc, METIS, deal.II and any others).

* gnu/packages/maths.scm (sundials)[source]: Reuse version in URL.
[native-inputs]: Capitalize and punctuate comment.
[inputs]: Remove petsc, now unnecessary gfortran, and obsolete
comment. Move TODO item to sundials-openmpi.
[arguments]<#:configure-flags>: Add -DSUNDIALS_INDEX_SIZE=32 to match
PETSc's 32-bit indices. Remove obsolete -DEXAMPLES_ENABLE_F77,
-DEXAMPLES_ENABLE_F90 and -DFCMIX_ENABLE. Mention new but currently
unusable -DBUILD_FORTRAN_MODULE_INTERFACE and
-DEXAMPLES_ENABLE_F2003. Rename KLU_ENABLE to ENABLE_KLU.
(sundials-openmpi): Use package/inherit.
[inputs]: Move openmpi and petsc-openmpi from here...
[propagated-inputs]: ...to here. Clarify comment.
[arguments]<#:configure-flags>: Add -DENABLE_PETSC and -DPETSC_DIR, the
equivalents of which were accidentally removed in commit
61bcd648ca215e3d8e75b3a3f49bfb94d66f7c79.
<#:phases>: Replace a tab with spaces.
[synopsis]: Replace OpenMPI with MPI to conform to other package
synopses.
(sundials-julia)[inputs]: Add gfortran.
[arguments]<#:configure-flags>: Set only, and manually, -DCMAKE_C_FLAGS,
-DSUNDIALS_INDEX_SIZE, -DKLU_ENABLE, -DKLU_INCLUDE_DIR,
-DKLU_LIBRARY_DIR and -DLAPACK_ENABLE instead of inheriting from the
sundials package, because some of SUNDIALS's CMake variables have
changed name.
[synopsis]: Capitalize “LAPACK”.
---
gnu/packages/maths.scm | 64 +++++++++++++++++++++++++-----------------
1 file changed, 38 insertions(+), 26 deletions(-)

Toggle diff (108 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 593bb4651c..f44cd49354 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6121,28 +6121,30 @@ (define-public sundials
(source
(origin
(method url-fetch)
- (uri (string-append "https://github.com/LLNL/sundials/releases/download/v6.1.1/"
- "sundials-" version ".tar.gz"))
+ (uri (string-append "https://github.com/LLNL/sundials/releases/download/v"
+ version "/sundials-" version ".tar.gz"))
(sha256
(base32
"0327a1fy8rilwc4brsqqb71jd1ymb7mqgxsylab06crcg5xn7byg"))))
(build-system cmake-build-system)
(native-inputs
- (list python-2)) ;for tests; syntax incompatible with python 3
+ (list python-2)) ; For tests; syntax incompatible with Python 3.
(inputs
- (list gfortran ;for fcmix
- openblas petsc suitesparse)) ;TODO: Add hypre
+ (list openblas suitesparse))
(arguments
- `(#:configure-flags `("-DCMAKE_C_FLAGS=-O2 -g -fcommon"
+ '(#:configure-flags `("-DCMAKE_C_FLAGS=-O2 -g -fcommon"
+
+ "-DSUNDIALS_INDEX_SIZE=32"
+ ;; Incompatible with 32-bit indices.
+ ;;"-DBUILD_FORTRAN_MODULE_INTERFACE:BOOL=ON"
+
"-DEXAMPLES_ENABLE_C:BOOL=ON"
"-DEXAMPLES_ENABLE_CXX:BOOL=ON"
- "-DEXAMPLES_ENABLE_F77:BOOL=ON"
- "-DEXAMPLES_ENABLE_F90:BOOL=ON"
+ ;; Requires -DBUILD_FORTRAN_MODULE_INTERFACE:BOOL=ON.
+ ;;"-DEXAMPLES_ENABLE_F2003:BOOL=ON"
"-DEXAMPLES_INSTALL:BOOL=OFF"

- "-DFCMIX_ENABLE:BOOL=ON"
-
- "-DKLU_ENABLE:BOOL=ON"
+ "-DENABLE_KLU:BOOL=ON"
,(string-append "-DKLU_INCLUDE_DIR="
(assoc-ref %build-inputs "suitesparse")
"/include")
@@ -6160,22 +6162,26 @@ (define-public sundials
(license license:bsd-3)))

(define-public sundials-openmpi
- (package
- (inherit sundials)
+ (package/inherit sundials
(name "sundials-openmpi")
- (inputs
- (modify-inputs (package-inputs sundials)
- (delete "petsc")
- (prepend openmpi petsc-openmpi))) ;support in SUNDIALS requires MPI
+ (propagated-inputs
+ (list openmpi
+ ;; Support for the below requires MPI.
+ ;; TODO: Add HYPRE.
+ petsc-openmpi))
(arguments
(substitute-keyword-arguments (package-arguments sundials)
((#:configure-flags flags '())
- `(cons* "-DENABLE_MPI:BOOL=ON" ,flags))
+ `(cons* "-DENABLE_MPI:BOOL=ON"
+ "-DENABLE_PETSC:BOOL=ON"
+ (string-append "-DPETSC_DIR="
+ (assoc-ref %build-inputs "petsc-openmpi"))
+ ,flags))
((#:phases phases '%standard-phases)
`(modify-phases ,phases
(add-before 'check 'mpi-setup
- ,%openmpi-setup)))))
- (synopsis "SUNDIALS with OpenMPI support")))
+ ,%openmpi-setup)))))
+ (synopsis "SUNDIALS with MPI support")))

(define-public sundials-julia
(package
@@ -6194,13 +6200,19 @@ (define-public sundials-julia
"0nx4sqhmi126m14myzm7syv2053harav9snl0a247wnkcgs5rxrv"))))
(inputs
(modify-inputs (package-inputs sundials)
- (prepend lapack)))
+ (prepend gfortran lapack)))
(arguments
- (substitute-keyword-arguments (package-arguments sundials)
- ((#:configure-flags flags '())
- `(cons* "-DLAPACK_ENABLE:BOOL=ON"
- ,flags))))
- (synopsis "SUNDIALS with lapack support as required by julia-sundials-jll")))
+ '(#:configure-flags `("-DCMAKE_C_FLAGS=-O2 -g -fcommon"
+ "-DSUNDIALS_INDEX_SIZE=32"
+ "-DKLU_ENABLE:BOOL=ON"
+ ,(string-append "-DKLU_INCLUDE_DIR="
+ (assoc-ref %build-inputs "suitesparse")
+ "/include")
+ ,(string-append "-DKLU_LIBRARY_DIR="
+ (assoc-ref %build-inputs "suitesparse")
+ "/lib")
+ "-DLAPACK_ENABLE:BOOL=ON")))
+ (synopsis "SUNDIALS with LAPACK support as required by julia-sundials-jll")))

(define-public combinatorial-blas
(package
--
2.36.0
P
P
Paul A. Patience wrote on 28 Apr 2022 19:11
[PATCH v2 4/4] gnu: sundials: Update to 6.2.0.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220428171109.217461-5-paul@apatience.com
* gnu/packages/maths.scm (sundials): Update to 6.2.0.
---
gnu/packages/maths.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 546c77d750..e97f732def 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6117,7 +6117,7 @@ (define-public tiny-bignum
(define-public sundials
(package
(name "sundials")
- (version "6.1.1")
+ (version "6.2.0")
(source
(origin
(method url-fetch)
@@ -6125,7 +6125,7 @@ (define-public sundials
version "/sundials-" version ".tar.gz"))
(sha256
(base32
- "0327a1fy8rilwc4brsqqb71jd1ymb7mqgxsylab06crcg5xn7byg"))))
+ "07gk9060xk3bzfqf8v4fqlp0rcxswiwlsy887zv87i1gfy9map8r"))))
(build-system cmake-build-system)
(native-inputs
(list python-2)) ; For tests; syntax incompatible with Python 3.
--
2.36.0
P
P
Paul A. Patience wrote on 28 Apr 2022 19:11
[PATCH v2 3/4] gnu: sundials-openmpi: Add HYPRE dependency.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220428171109.217461-4-paul@apatience.com
* gnu/packages/maths.scm (sundials-openmpi)[propagated-inputs]: Add
hypre-openmpi.
[arguments]<#:configure-flags>: Add -DENABLE_HYPRE, -DHYPRE_INCLUDE_DIR
and -DHYPRE_LIBRARY_DIR.
---
gnu/packages/maths.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f44cd49354..546c77d750 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6167,12 +6167,19 @@ (define-public sundials-openmpi
(propagated-inputs
(list openmpi
;; Support for the below requires MPI.
- ;; TODO: Add HYPRE.
+ hypre-openmpi
petsc-openmpi))
(arguments
(substitute-keyword-arguments (package-arguments sundials)
((#:configure-flags flags '())
`(cons* "-DENABLE_MPI:BOOL=ON"
+ "-DENABLE_HYPRE:BOOL=ON"
+ (string-append "-DHYPRE_INCLUDE_DIR="
+ (assoc-ref %build-inputs "hypre-openmpi")
+ "/include")
+ (string-append "-DHYPRE_LIBRARY_DIR="
+ (assoc-ref %build-inputs "hypre-openmpi")
+ "/lib")
"-DENABLE_PETSC:BOOL=ON"
(string-append "-DPETSC_DIR="
(assoc-ref %build-inputs "petsc-openmpi"))
--
2.36.0
M
M
Maxime Devos wrote on 30 Apr 2022 11:02
Re: [bug#50080] [PATCH v2 1/4] gnu: petsc-openmpi: Fix inputs.
7002d7d0ee9fbdd61e50e5a69ba10a2292e343db.camel@telenet.be
Paul A. Patience schreef op do 28-04-2022 om 17:11 [+0000]:
Toggle quote (2 lines)
> +     (list hdf5-parallel-openmpi)) ; petsclayouthdf5.h includes H5Ipublic.h.

This can be solved without propagation, see

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmz7PxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7t90APwOUDV/3st+3hq6sREbgnSWAltp
TiyqstYbOL7nSIv87gD9Ew2k4XWF66azBqjOEvA4f/OCr5TXr9Ul6UUXRhOOXQ4=
=t45t
-----END PGP SIGNATURE-----


P
P
Paul A. Patience wrote on 2 May 2022 15:28
[PATCH v3 0/4] gnu: sundials: Fix various issues and update to 6.2.0.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502132806.614632-1-paul@apatience.com
Addressed issue reported by Maxime Devos.

Paul A. Patience (4):
gnu: petsc-openmpi: Fix header inclusions.
gnu: sundials: Fix various issues.
gnu: sundials-openmpi: Add HYPRE dependency.
gnu: sundials: Update to 6.2.0.

gnu/packages/maths.scm | 86 ++++++++++++++++++++++++++++--------------
1 file changed, 57 insertions(+), 29 deletions(-)

--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 15:28
[PATCH v3 1/4] gnu: petsc-openmpi: Fix header inclusions.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502132806.614632-2-paul@apatience.com
* gnu/packages/maths.scm (petsc-openmpi)[arguments]: Add
'patch-header-inclusions' phase.
---
gnu/packages/maths.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index fcd9c5482f..2922d95a70 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3174,7 +3174,16 @@ (define-public petsc-openmpi
(("libptesmumps") "libesmumps")
(("libptscotchparmetis") "libptscotchparmetisv3"))))
(add-before 'configure 'mpi-setup
- #$%openmpi-setup)))))
+ #$%openmpi-setup)
+ (add-after 'install 'patch-header-inclusions
+ ;; TODO: Replace with ‘patch-header-inclusions’ when (some form
+ ;; of) https://issues.guix.gnu.org/54780#19 is merged.
+ (lambda _
+ (substitute* (string-append #$output "/include/petsclayouthdf5.h")
+ (("<(H5Ipublic.h)>" _ header)
+ (format #f "<~a/include/~a>"
+ #$(this-package-input "hdf5-parallel-openmpi")
+ header)))))))))
(synopsis "Library to solve PDEs (with MUMPS and MPI support)")))

(define-public petsc-complex-openmpi
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 15:28
[PATCH v3 2/4] gnu: sundials: Fix various issues.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502132806.614632-3-paul@apatience.com
This commit fixes various issues. First, some of SUNDIALS's CMake
variables were renamed at some point between 5.2.0 and 5.7.0, in
particular KLU_ENABLE, which was changed to ENABLE_KLU. Since
sundials-julia is essentially SUNDIALS 5.2.0, its configure flags need
to be different from those of the sundials package. Second, commit
61bcd648ca215e3d8e75b3a3f49bfb94d66f7c79, which updated SUNDIALS to
6.1.1, accidentally completely disabled PETSc support for
sundials-openmpi (PETSc is supported only with MPI) by removing the
relevant configure flags. Third, SUNDIALS's default index size is
64 bits, but PETSc's is 32 bits, and they need to be the same; this
issue is discussed in the next three paragraphs.

The default index size in SUNDIALS 3.1.1 (which was the sundials
package's version previous to the aforementioned commit) was also
64 bits (though it was configured through the SUNDIALS_INDEX_TYPE CMake
variable, which could take the values INT64_T or INT32_T), but
SUNDIALS's configure script didn't warn of any incompatibility with
PETSc's 32-bit indices. I don't know if this was an accidental omission
from the configure script or if SUNDIALS's index size didn't have to
correspond to PETSc's at the time.

Keeping 64-bit indices in SUNDIALS would require adding a package for
PETSc with 64-bit indices (using the --with-64-bit-indices configure
flag), possibly named petsc64-openmpi (to follow the style of the SCOTCH
packages, i.e., scotch, scotch32, etc., though there the unadorned
package name represents the 64-bit version, unlike the unadorned petsc),
which would in turn require a package for METIS with 64-bit
indices (using IDXTYPEWIDTH=64). However, SUNDIALS is an optional
dependency of deal.II, both of which have PETSc as an optional
dependency, and deal.II's index size (which defaults to 32 bits) must
match PETSc's. In other words, the current deal.II package can build
with SUNDIALS only if SUNDIALS has 32-bit indices.

Furthermore, users needing 64-bit indices in SUNDIALS probably also need
them in PETSc and other libraries. If and when 64-bit indices are deemed
necessary, we can add all the package variations at once (for SUNDIALS,
PETSc, METIS, deal.II and any others).

* gnu/packages/maths.scm (sundials)[source]: Reuse version in URL.
[native-inputs]: Capitalize and punctuate comment.
[inputs]: Remove petsc, now unnecessary gfortran, and obsolete
comment. Move TODO item to sundials-openmpi.
[arguments]<#:configure-flags>: Add -DSUNDIALS_INDEX_SIZE=32 to match
PETSc's 32-bit indices. Remove obsolete -DEXAMPLES_ENABLE_F77,
-DEXAMPLES_ENABLE_F90 and -DFCMIX_ENABLE. Mention new but currently
unusable -DBUILD_FORTRAN_MODULE_INTERFACE and
-DEXAMPLES_ENABLE_F2003. Rename KLU_ENABLE to ENABLE_KLU.
(sundials-openmpi): Use package/inherit.
[inputs]: Move openmpi and petsc-openmpi from here...
[propagated-inputs]: ...to here. Clarify comment.
[arguments]<#:configure-flags>: Add -DENABLE_PETSC and -DPETSC_DIR, the
equivalents of which were accidentally removed in commit
61bcd648ca215e3d8e75b3a3f49bfb94d66f7c79.
<#:phases>: Replace a tab with spaces.
[synopsis]: Replace OpenMPI with MPI to conform to other package
synopses.
(sundials-julia)[inputs]: Add gfortran.
[arguments]<#:configure-flags>: Set only, and manually, -DCMAKE_C_FLAGS,
-DSUNDIALS_INDEX_SIZE, -DKLU_ENABLE, -DKLU_INCLUDE_DIR,
-DKLU_LIBRARY_DIR and -DLAPACK_ENABLE instead of inheriting from the
sundials package, because some of SUNDIALS's CMake variables have
changed name.
[synopsis]: Capitalize “LAPACK”.
---
gnu/packages/maths.scm | 64 +++++++++++++++++++++++++-----------------
1 file changed, 38 insertions(+), 26 deletions(-)

Toggle diff (108 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2922d95a70..5d4778da83 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6129,28 +6129,30 @@ (define-public sundials
(source
(origin
(method url-fetch)
- (uri (string-append "https://github.com/LLNL/sundials/releases/download/v6.1.1/"
- "sundials-" version ".tar.gz"))
+ (uri (string-append "https://github.com/LLNL/sundials/releases/download/v"
+ version "/sundials-" version ".tar.gz"))
(sha256
(base32
"0327a1fy8rilwc4brsqqb71jd1ymb7mqgxsylab06crcg5xn7byg"))))
(build-system cmake-build-system)
(native-inputs
- (list python-2)) ;for tests; syntax incompatible with python 3
+ (list python-2)) ; For tests; syntax incompatible with Python 3.
(inputs
- (list gfortran ;for fcmix
- openblas petsc suitesparse)) ;TODO: Add hypre
+ (list openblas suitesparse))
(arguments
- `(#:configure-flags `("-DCMAKE_C_FLAGS=-O2 -g -fcommon"
+ '(#:configure-flags `("-DCMAKE_C_FLAGS=-O2 -g -fcommon"
+
+ "-DSUNDIALS_INDEX_SIZE=32"
+ ;; Incompatible with 32-bit indices.
+ ;;"-DBUILD_FORTRAN_MODULE_INTERFACE:BOOL=ON"
+
"-DEXAMPLES_ENABLE_C:BOOL=ON"
"-DEXAMPLES_ENABLE_CXX:BOOL=ON"
- "-DEXAMPLES_ENABLE_F77:BOOL=ON"
- "-DEXAMPLES_ENABLE_F90:BOOL=ON"
+ ;; Requires -DBUILD_FORTRAN_MODULE_INTERFACE:BOOL=ON.
+ ;;"-DEXAMPLES_ENABLE_F2003:BOOL=ON"
"-DEXAMPLES_INSTALL:BOOL=OFF"

- "-DFCMIX_ENABLE:BOOL=ON"
-
- "-DKLU_ENABLE:BOOL=ON"
+ "-DENABLE_KLU:BOOL=ON"
,(string-append "-DKLU_INCLUDE_DIR="
(assoc-ref %build-inputs "suitesparse")
"/include")
@@ -6168,22 +6170,26 @@ (define-public sundials
(license license:bsd-3)))

(define-public sundials-openmpi
- (package
- (inherit sundials)
+ (package/inherit sundials
(name "sundials-openmpi")
- (inputs
- (modify-inputs (package-inputs sundials)
- (delete "petsc")
- (prepend openmpi petsc-openmpi))) ;support in SUNDIALS requires MPI
+ (propagated-inputs
+ (list openmpi
+ ;; Support for the below requires MPI.
+ ;; TODO: Add HYPRE.
+ petsc-openmpi))
(arguments
(substitute-keyword-arguments (package-arguments sundials)
((#:configure-flags flags '())
- `(cons* "-DENABLE_MPI:BOOL=ON" ,flags))
+ `(cons* "-DENABLE_MPI:BOOL=ON"
+ "-DENABLE_PETSC:BOOL=ON"
+ (string-append "-DPETSC_DIR="
+ (assoc-ref %build-inputs "petsc-openmpi"))
+ ,flags))
((#:phases phases '%standard-phases)
`(modify-phases ,phases
(add-before 'check 'mpi-setup
- ,%openmpi-setup)))))
- (synopsis "SUNDIALS with OpenMPI support")))
+ ,%openmpi-setup)))))
+ (synopsis "SUNDIALS with MPI support")))

(define-public sundials-julia
(package
@@ -6202,13 +6208,19 @@ (define-public sundials-julia
"0nx4sqhmi126m14myzm7syv2053harav9snl0a247wnkcgs5rxrv"))))
(inputs
(modify-inputs (package-inputs sundials)
- (prepend lapack)))
+ (prepend gfortran lapack)))
(arguments
- (substitute-keyword-arguments (package-arguments sundials)
- ((#:configure-flags flags '())
- `(cons* "-DLAPACK_ENABLE:BOOL=ON"
- ,flags))))
- (synopsis "SUNDIALS with lapack support as required by julia-sundials-jll")))
+ '(#:configure-flags `("-DCMAKE_C_FLAGS=-O2 -g -fcommon"
+ "-DSUNDIALS_INDEX_SIZE=32"
+ "-DKLU_ENABLE:BOOL=ON"
+ ,(string-append "-DKLU_INCLUDE_DIR="
+ (assoc-ref %build-inputs "suitesparse")
+ "/include")
+ ,(string-append "-DKLU_LIBRARY_DIR="
+ (assoc-ref %build-inputs "suitesparse")
+ "/lib")
+ "-DLAPACK_ENABLE:BOOL=ON")))
+ (synopsis "SUNDIALS with LAPACK support as required by julia-sundials-jll")))

(define-public combinatorial-blas
(package
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 15:28
[PATCH v3 3/4] gnu: sundials-openmpi: Add HYPRE dependency.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502132806.614632-4-paul@apatience.com
* gnu/packages/maths.scm (sundials-openmpi)[propagated-inputs]: Add
hypre-openmpi.
[arguments]<#:configure-flags>: Add -DENABLE_HYPRE, -DHYPRE_INCLUDE_DIR
and -DHYPRE_LIBRARY_DIR.
---
gnu/packages/maths.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5d4778da83..03c465dfff 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6175,12 +6175,19 @@ (define-public sundials-openmpi
(propagated-inputs
(list openmpi
;; Support for the below requires MPI.
- ;; TODO: Add HYPRE.
+ hypre-openmpi
petsc-openmpi))
(arguments
(substitute-keyword-arguments (package-arguments sundials)
((#:configure-flags flags '())
`(cons* "-DENABLE_MPI:BOOL=ON"
+ "-DENABLE_HYPRE:BOOL=ON"
+ (string-append "-DHYPRE_INCLUDE_DIR="
+ (assoc-ref %build-inputs "hypre-openmpi")
+ "/include")
+ (string-append "-DHYPRE_LIBRARY_DIR="
+ (assoc-ref %build-inputs "hypre-openmpi")
+ "/lib")
"-DENABLE_PETSC:BOOL=ON"
(string-append "-DPETSC_DIR="
(assoc-ref %build-inputs "petsc-openmpi"))
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 15:28
[PATCH v3 4/4] gnu: sundials: Update to 6.2.0.
(address . 50080@debbugs.gnu.org)(name . Paul A. Patience)(address . paul@apatience.com)
20220502132806.614632-5-paul@apatience.com
* gnu/packages/maths.scm (sundials): Update to 6.2.0.
---
gnu/packages/maths.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 03c465dfff..dd6334d4bd 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6125,7 +6125,7 @@ (define-public tiny-bignum
(define-public sundials
(package
(name "sundials")
- (version "6.1.1")
+ (version "6.2.0")
(source
(origin
(method url-fetch)
@@ -6133,7 +6133,7 @@ (define-public sundials
version "/sundials-" version ".tar.gz"))
(sha256
(base32
- "0327a1fy8rilwc4brsqqb71jd1ymb7mqgxsylab06crcg5xn7byg"))))
+ "07gk9060xk3bzfqf8v4fqlp0rcxswiwlsy887zv87i1gfy9map8r"))))
(build-system cmake-build-system)
(native-inputs
(list python-2)) ; For tests; syntax incompatible with Python 3.
--
2.36.0
P
P
Paul A. Patience wrote on 2 May 2022 15:56
Re: [bug#50080] [PATCH v2 1/4] gnu: petsc-openmpi: Fix inputs.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 50080@debbugs.gnu.org)
87pmkw3v3x.fsf@apatience.com
On 2022-04-30 05:02:55-04:00, Maxime Devos wrote:
Toggle quote (7 lines)
> Paul A. Patience schreef op do 28-04-2022 om 17:11 [+0000]:
>> +     (list hdf5-parallel-openmpi)) ; petsclayouthdf5.h includes H5Ipublic.h.
>
> This can be solved without propagation, see
> <https://issues.guix.gnu.org/54780#18>
> and <https://issues.guix.gnu.org/54780#19>.

I fixed this in v3 for petsc-openmpi, but note that one of the issues
fixed in the sundials-openmpi package (patch 2/4) is moving some
dependencies from inputs to propagated inputs to fix header inclusions.
However, those inputs would be more fragile to fix manually than
petsc-openmpi, because there are more headers to deal with than in
petsc-openmpi, and so they should probably be fixed only when the
absolute-inclusions patch is merged.

There are probably many other instances of this; I know that at least
dealii has propagated inputs just because of header inclusions.

If the absolute-inclusions patch is merged soon, I could update this
patch series to use that, but otherwise it could be fixed in a future
update to sundials (which seems to happen often).

Best regards,
Paul
L
L
Ludovic Courtès wrote on 3 May 2022 17:35
Re: bug#50080: [PATCH] gnu: sundials, dealii: Update sundials to 5.7.0 and add to dealii inputs.
(name . Paul A. Patience)(address . paul@apatience.com)(address . 50080-done@debbugs.gnu.org)
87bkweaasi.fsf_-_@gnu.org
Hi Paul,

"Paul A. Patience" <paul@apatience.com> skribis:

Toggle quote (8 lines)
> Addressed issue reported by Maxime Devos.
>
> Paul A. Patience (4):
> gnu: petsc-openmpi: Fix header inclusions.
> gnu: sundials: Fix various issues.
> gnu: sundials-openmpi: Add HYPRE dependency.
> gnu: sundials: Update to 6.2.0.

Awesome, I’ve applied the whole series.

Thanks,
Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 50080@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 50080
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch