all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Felix Gruber <felgru@posteo.net>
To: 62842@debbugs.gnu.org
Cc: Felix Gruber <felgru@posteo.net>
Subject: [bug#62842] [PATCH 05/11] gnu: dune-istl: Update to 2.9.0.
Date: Fri, 14 Apr 2023 19:27:30 +0000	[thread overview]
Message-ID: <20230414192736.41322-5-felgru@posteo.net> (raw)
In-Reply-To: <20230414192518.41188-1-felgru@posteo.net>

* gnu/packages/maths.scm (dune-istl): Update to 2.9.0.
  [source](patches): Add patch to fix test phase.
* gnu/packages/patches/dune-istl-fix-solver-playground.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/maths.scm                        |  5 +-
 .../dune-istl-fix-solver-playground.patch     | 61 +++++++++++++++++++
 3 files changed, 65 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/dune-istl-fix-solver-playground.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 96d5aad909..37bef69b4d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1057,6 +1057,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch	\
   %D%/packages/patches/dstat-skip-devices-without-io.patch	\
   %D%/packages/patches/dune-grid-add-missing-include-cassert.patch	\
+  %D%/packages/patches/dune-istl-fix-solver-playground.patch	\
   %D%/packages/patches/dvd+rw-tools-add-include.patch 		\
   %D%/packages/patches/dynaconf-unvendor-deps.patch		\
   %D%/packages/patches/efivar-211.patch			\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 95e2eb3ef7..ad50b65cae 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6946,7 +6946,7 @@ (define-public dune-grid
 (define-public dune-istl
   (package
     (name "dune-istl")
-    (version "2.7.1")
+    (version "2.9.0")
     (source
      (origin
        (method url-fetch)
@@ -6954,7 +6954,8 @@ (define-public dune-istl
                            version "/dune-istl-" version ".tar.gz"))
        (sha256
         (base32
-         "1cy69s1266hvnh8blznlvvkrf8i2g640rc3mf7kp872wgvdz4nb9"))))
+         "0smghqr400xl84j0laabgwaj2p5jlj3n3s85bm7qp9m2vjz6rav6"))
+       (patches (search-patches "dune-istl-fix-solver-playground.patch"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
diff --git a/gnu/packages/patches/dune-istl-fix-solver-playground.patch b/gnu/packages/patches/dune-istl-fix-solver-playground.patch
new file mode 100644
index 0000000000..b3df4b6ffa
--- /dev/null
+++ b/gnu/packages/patches/dune-istl-fix-solver-playground.patch
@@ -0,0 +1,61 @@
+From fe929f17e98b577171f58ca520b5145be41730ea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org>
+Date: Thu, 16 Mar 2023 19:48:40 +0100
+Subject: [PATCH] Adjust sequential and both parallel cases in
+ istl-solver-playground
+
+Do same thing, independent of paralellel, distributed, or
+sequential.
+This fixes the test in the sequential case.
+---
+ src/istl-solver-playground.hh | 22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+diff --git a/src/istl-solver-playground.hh b/src/istl-solver-playground.hh
+index 0ff3abd5..11693cf5 100644
+--- a/src/istl-solver-playground.hh
++++ b/src/istl-solver-playground.hh
+@@ -66,7 +66,11 @@ std::shared_ptr<OOCOMM> loadSystem(std::shared_ptr<Mat>& m,
+   std::shared_ptr<OOCOMM> oocomm;
+   if(distributed){
+     oocomm = std::make_shared<OOCOMM>(MPI_COMM_WORLD);
+-    loadMatrixMarket(*m, matrixfilename, *oocomm);
++    if(matrixfilename != "laplacian"){
++      loadMatrixMarket(*m, matrixfilename, *oocomm);
++    }else{
++      setupLaplacian(*m, config.get("N", 20));
++    }
+     if(config.get("random_rhs", false)){
+       rhs->resize(m->N());
+       srand(42);
+@@ -98,16 +102,22 @@ template<class Mat, class Vec>
+ void loadSystem(std::shared_ptr<Mat>& m,
+                 std::shared_ptr<Vec>& rhs,
+                 const Dune::ParameterTree& config){
+-  std::string matrixfilename = config.get<std::string>("matrix");
++  // generate Laplacian or load matrix
++  std::string matrixfilename = config.get<std::string>("matrix", "laplacian");
++  if(matrixfilename == "laplacian"){
++    setupLaplacian(*m, config.get("N", 20));
++  }else{
++    loadMatrixMarket(*m, matrixfilename);
++  }
++  // use random values or load right-hand side
+   std::string rhsfilename;
+-  if(!config.get("random_rhs", false))
+-    rhsfilename = config.get<std::string>("rhs");
+-  loadMatrixMarket(*m, matrixfilename);
+   if(config.get("random_rhs", false)){
+     rhs->resize(m->N());
+     fillRandom(*rhs);
+-  }else
++  }else{
++    rhsfilename = config.get<std::string>("rhs");
+     loadMatrixMarket(*rhs, rhsfilename);
++  }
+ }
+ #endif
+ 
+-- 
+2.39.2
+
-- 
2.39.2





  parent reply	other threads:[~2023-04-14 20:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14 19:25 [bug#62842] [PATCH 00/11] gnu: maths: dune-*: Update to version 2.9.0 Felix Gruber
2023-04-14 19:27 ` [bug#62842] [PATCH 01/11] gnu: dune-common: Update to 2.9.0 Felix Gruber
2023-04-14 19:27 ` [bug#62842] [PATCH 02/11] gnu: dune-geometry: " Felix Gruber
2023-04-14 19:27 ` [bug#62842] [PATCH 03/11] gnu: dune-uggrid: " Felix Gruber
2023-04-14 19:27 ` [bug#62842] [PATCH 04/11] gnu: dune-grid: " Felix Gruber
2023-04-14 19:27 ` Felix Gruber [this message]
2023-04-14 19:27 ` [bug#62842] [PATCH 06/11] gnu: dune-localfunctions: " Felix Gruber
2023-04-14 19:27 ` [bug#62842] [PATCH 07/11] gnu: dune-alugrid: " Felix Gruber
2023-04-14 19:27 ` [bug#62842] [PATCH 08/11] gnu: dune-subgrid: Update to 2.9.0-1-e83f3f9 Felix Gruber
2023-04-14 19:27 ` [bug#62842] [PATCH 09/11] gnu: dune-typetree: Update to 2.9.0 Felix Gruber
2023-04-14 19:27 ` [bug#62842] [PATCH 10/11] gnu: dune-functions: " Felix Gruber
2023-04-14 19:27 ` [bug#62842] [PATCH 11/11] gnu: dune-pdelab: Update to 2.8.0-0.d5dddb6 Felix Gruber
2023-05-02 10:13 ` bug#62842: [PATCH 00/11] gnu: maths: dune-*: Update to version 2.9.0 Ludovic Courtès
2023-05-02 13:01 ` [bug#62842] " Ludovic Courtès
2023-05-02 20:18   ` Felix Gruber
2023-05-04  9:35     ` Ludovic Courtès
2023-05-02 13:02 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230414192736.41322-5-felgru@posteo.net \
    --to=felgru@posteo.net \
    --cc=62842@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.