GNU bug report logs - #53065
[PATCH] gnu: dealii: Update to 9.3.2.

Previous Next

Package: guix-patches;

Reported by: Felix Gruber <felgru <at> posteo.net>

Date: Fri, 7 Jan 2022 07:40:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53065 in the body.
You can then email your comments to 53065 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#53065; Package guix-patches. (Fri, 07 Jan 2022 07:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Felix Gruber <felgru <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 07 Jan 2022 07:40:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Felix Gruber <felgru <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH] gnu: dealii: Update to 9.3.2.
Date: Fri,  7 Jan 2022 07:39:05 +0000
* gnu/packages/maths.scm (dealii): Update to 9.3.2.
  [source]: Add dealii-fix-compiliation-with-boost-1.78.patch and
  dealii-fix-sundials.patch.
  [inputs]: Use simplified format.
  [native-inputs]: Use simplified format.
* gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch:
  New file.
* gnu/packages/patches/dealii-fix-sundials.patch: New file.
* gnu/local.mk: Add new patch files.
---
 gnu/local.mk                                  |  4 +-
 gnu/packages/maths.scm                        | 24 ++++----
 ...lii-fix-compiliation-with-boost-1.78.patch | 40 +++++++++++++
 .../patches/dealii-fix-sundials.patch         | 60 +++++++++++++++++++
 4 files changed, 115 insertions(+), 13 deletions(-)
 create mode 100644 gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch
 create mode 100644 gnu/packages/patches/dealii-fix-sundials.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 31354e413f..be5268b9e8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -31,7 +31,7 @@
 # Copyright © 2020 R Veera Kumar <vkor <at> vkten.in>
 # Copyright © 2020 Nicolò Balzarotti <nicolo <at> nixo.xyz>
 # Copyright © 2020 Michael Rohleder <mike <at> rohleder.de>
-# Copyright © 2020, 2021 Felix Gruber <felgru <at> posteo.net>
+# Copyright © 2020, 2021, 2022 Felix Gruber <felgru <at> posteo.net>
 # Copyright © 2020 Ryan Prior <rprior <at> protonmail.com>
 # Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia <at> interia.pl>
 # Copyright © 2020, 2021 Brice Waegeneire <brice <at> waegenei.re>
@@ -987,6 +987,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/dbus-c++-gcc-compat.patch		\
   %D%/packages/patches/dbus-c++-threading-mutex.patch		\
   %D%/packages/patches/dbxfs-remove-sentry-sdk.patch		\
+  %D%/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch	\
+  %D%/packages/patches/dealii-fix-sundials.patch		\
   %D%/packages/patches/debops-constants-for-external-program-names.patch \
   %D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \
   %D%/packages/patches/dee-vapi.patch			\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b0944f307b..f4dba92c11 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -34,7 +34,7 @@
 ;;; Copyright © 2019 Steve Sprang <scs <at> stevesprang.com>
 ;;; Copyright © 2019 Robert Smith <robertsmith <at> posteo.net>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
-;;; Copyright © 2020, 2021 Felix Gruber <felgru <at> posteo.net>
+;;; Copyright © 2020–2022 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2020 R Veera Kumar <vkor <at> vkten.in>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll <at> gmail.com>
 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo <at> nixo.xyz>
@@ -5268,14 +5268,16 @@ A unique design feature of Trilinos is its focus on packages.")
 (define-public dealii
   (package
     (name "dealii")
-    (version "9.3.1")
+    (version "9.3.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/dealii/dealii/releases/"
                            "download/v" version "/dealii-" version ".tar.gz"))
        (sha256
-        (base32 "1f0sqvlxvl0myqcn0q6xrn1vnp5pgx143lai4a4jkh1dmdv4cbx6"))
+        (base32 "1s0kawnljg24jj6nibwrif5gxdgg2daqfylhqqpl1lvmzmmxfhak"))
+       (patches (search-patches "dealii-fix-compiliation-with-boost-1.78.patch"
+                                "dealii-fix-sundials.patch"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -5286,16 +5288,14 @@ A unique design feature of Trilinos is its focus on packages.")
     (outputs '("out" "doc"))
     (native-inputs
      ;; Required to build the documentation.
-     `(("dot" ,graphviz)
-       ("doxygen" ,doxygen)
-       ("perl" ,perl)))
+      (list graphviz doxygen perl))
     (inputs
-     `(("arpack" ,arpack-ng)
-       ("blas" ,openblas)
-       ("gfortran" ,gfortran)
-       ("lapack" ,lapack)
-       ("muparser" ,muparser)
-       ("zlib" ,zlib)))
+      (list arpack-ng
+            openblas
+            gfortran
+            lapack
+            muparser
+            zlib))
     (propagated-inputs
      ;; Some scripts are installed into share/deal.II/scripts that require
      ;; perl and python, but they are not executable (and some are missing the
diff --git a/gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch b/gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch
new file mode 100644
index 0000000000..1937aa9afc
--- /dev/null
+++ b/gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch
@@ -0,0 +1,40 @@
+From cbef761731627cece2a6f0276b87dacabbdc8a72 Mon Sep 17 00:00:00 2001
+From: David Wells <drwells <at> email.unc.edu>
+Date: Tue, 4 Jan 2022 12:46:30 -0500
+Subject: [PATCH] Fix compilation with boost 1.78.
+
+I bisected (fortunately Boost.Geometry a header-only library so adding the
+include directory sufficed) and
+https://github.com/boostorg/geometry/commit/6eb9e238bcb37e26dc31d16acf826784a2ba30f4
+is where this problem starts for us. See also
+https://github.com/boostorg/geometry/issues/792 - the easiest fix for all such
+issues is to just include the project header `boost/geometry/geometry.hpp`.
+
+In this particular case, if you look at the commit which causes grid_tools.cc
+fails to compile, its because we were relying on some implicit includes. In
+particular, we need the distance header to find the distance between points and
+boxes, but that was previously included in another file.
+
+This patch has been adapted from
+e0e76835519d122fd12b5858e16d08641a641c6a to apply to dealii 9.3.2.
+
+See https://github.com/dealii/dealii/pull/13165.
+---
+ include/deal.II/numerics/rtree.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/deal.II/numerics/rtree.h b/include/deal.II/numerics/rtree.h
+index 1b9d04dacd..1e1bfd2932 100644
+--- a/include/deal.II/numerics/rtree.h
++++ b/include/deal.II/numerics/rtree.h
+@@ -26,6 +26,7 @@
+ #include <deal.II/boost_adaptors/segment.h>
+ 
+ DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
++#include <boost/geometry/algorithms/distance.hpp>
+ #include <boost/geometry/index/rtree.hpp>
+ #include <boost/geometry/strategies/strategies.hpp>
+ DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
+-- 
+2.30.2
+
diff --git a/gnu/packages/patches/dealii-fix-sundials.patch b/gnu/packages/patches/dealii-fix-sundials.patch
new file mode 100644
index 0000000000..7dd5df45da
--- /dev/null
+++ b/gnu/packages/patches/dealii-fix-sundials.patch
@@ -0,0 +1,60 @@
+From af73f368f7f9d4a00df075d1a9f50fc495f8e87a Mon Sep 17 00:00:00 2001
+From: Timo Heister <timo.heister <at> gmail.com>
+Date: Sat, 25 Dec 2021 12:30:45 -0500
+Subject: [PATCH] fix sundials compilation
+
+---
+ include/deal.II/sundials/n_vector.templates.h | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/include/deal.II/sundials/n_vector.templates.h b/include/deal.II/sundials/n_vector.templates.h
+index 2b49e3efc9..746f63a03b 100644
+--- a/include/deal.II/sundials/n_vector.templates.h
++++ b/include/deal.II/sundials/n_vector.templates.h
+@@ -253,13 +253,13 @@ namespace SUNDIALS
+       template <
+         typename VectorType,
+         typename std::enable_if_t<!IsBlockVector<VectorType>::value, int> = 0>
+-      MPI_Comm
++      const MPI_Comm &
+       get_communicator(N_Vector v);
+ 
+       template <
+         typename VectorType,
+         typename std::enable_if_t<IsBlockVector<VectorType>::value, int> = 0>
+-      MPI_Comm
++      const MPI_Comm &
+       get_communicator(N_Vector v);
+ 
+       /**
+@@ -481,7 +481,7 @@ SUNDIALS::internal::NVectorOperations::destroy(N_Vector v)
+ 
+ template <typename VectorType,
+           std::enable_if_t<IsBlockVector<VectorType>::value, int>>
+-MPI_Comm
++const MPI_Comm &
+ SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector v)
+ {
+   return unwrap_nvector_const<VectorType>(v)->block(0).get_mpi_communicator();
+@@ -491,7 +491,7 @@ SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector v)
+ 
+ template <typename VectorType,
+           std::enable_if_t<!IsBlockVector<VectorType>::value, int>>
+-MPI_Comm
++const MPI_Comm &
+ SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector v)
+ {
+   return unwrap_nvector_const<VectorType>(v)->get_mpi_communicator();
+@@ -519,7 +519,8 @@ SUNDIALS::internal::NVectorOperations::get_communicator_as_void_ptr(N_Vector v)
+   (void)v;
+   return nullptr;
+ #  else
+-  return get_communicator<VectorType>(v);
++  // We need to cast away const here, as SUNDIALS demands a pure `void *`.
++  return &(const_cast<MPI_Comm &>(get_communicator<VectorType>(v)));
+ #  endif
+ }
+ 
+-- 
+2.30.2
+
-- 
2.30.2





Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Tue, 11 Jan 2022 09:46:02 GMT) Full text and rfc822 format available.

Notification sent to Felix Gruber <felgru <at> posteo.net>:
bug acknowledged by developer. (Tue, 11 Jan 2022 09:46:02 GMT) Full text and rfc822 format available.

Message #10 received at 53065-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Felix Gruber <felgru <at> posteo.net>
Cc: 53065-done <at> debbugs.gnu.org
Subject: Re: [bug#53065] [PATCH] gnu: dealii: Update to 9.3.2.
Date: Tue, 11 Jan 2022 10:45:19 +0100
Hello,

Felix Gruber <felgru <at> posteo.net> writes:

> * gnu/packages/maths.scm (dealii): Update to 9.3.2.
>   [source]: Add dealii-fix-compiliation-with-boost-1.78.patch and
>   dealii-fix-sundials.patch.
>   [inputs]: Use simplified format.
>   [native-inputs]: Use simplified format.
> * gnu/packages/patches/dealii-fix-compiliation-with-boost-1.78.patch:
>   New file.
> * gnu/packages/patches/dealii-fix-sundials.patch: New file.
> * gnu/local.mk: Add new patch files.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 Feb 2022 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.