diff mbox

[bug#62842,00/11] gnu: maths: dune-*: Update to version 2.9.0

Message ID cdfb119e-1794-a470-c6aa-836013bc51c8@posteo.net
State New
Headers show

Commit Message

Felix Gruber May 2, 2023, 8:18 p.m. UTC
Hi Ludo’,

On 5/2/23 15:01, Ludovic Courtès wrote:
> Felix Gruber <felgru@posteo.net> skribis:
> 
>> This patchset updates all packages belonging to the Dune finite element
>> library to the latest release 2.9.0.
> 
> There’s one test failure on aarch64-linux:
> 
> --8<---------------cut here---------------start------------->8---
>   99/106 Test  #99: eigenvaluestest ........................Subprocess aborted***Exception:   1.24 sec
> Eigenvalues of Rosser matrix: (-1020.05,0) (0.0980486,0) (-1.05342e-14,0) (1020.05,0) (1020,0) (1019.9,0) (1000,0) (1000,0)
> Eigenvalues of Rosser matrix: (-1020.05,0) (0.0980486,0) (-1.05342e-14,0) (1020.05,0) (1020,0) (1019.9,0) (1000,0) (1000,0)
> Eigenvalues of Rosser matrix: (-1020.05,0) (0.0980486,0) (-1.05342e-14,0) (1020.05,0) (1020,0) (1019.9,0) (1000,0) (1000,0)
> terminate called after throwing an instance of 'Dune::MathError'
>    what():  MathError [testSymmetricFieldMatrix:/tmp/guix-build-dune-common-2.9.0.drv-0/dune-common-2.9.0/dune/common/test/eigenvaluestest.cc:143]: Vector computed by FMatrixHelp::eigenValuesVectors is not an eigenvector
> 
> […]
> The following tests FAILED:
> 	 99 - eigenvaluestest (Subprocess aborted)
> Errors while running CTest
> make: *** [Makefile:74: test] Error 8
> --8<---------------cut here---------------end--------------->8---
> 
>  From <https://ci.guix.gnu.org/build/1228281/details>.
> 
> Could you take a look and/or report it upstream?

Thanks for letting me know. I've looked into upstream issues/fixes for 
this problem and it seems that these aarch64 test failures are a known 
issue [1]. This bugreport mentions build failures in dune-common's 
Debian package, which nowadays seems to be patched to disable the 
failing tests [2].

[1]: https://gitlab.dune-project.org/core/dune-common/-/issues/262
[2]: 
https://sources.debian.org/src/dune-common/2.9.0-2/debian/patches/disable-long-double-eigenvalue-checks.patch/

I've prepared a patch to apply Debian's patch for disabling the failing 
tests to our dune-common package. You can find it attached to this 
email. Can you test if it fixes the aarch64-linux builds (I don't have 
access to an aarch64 machine)?
I hope that this would also fix the build failures for the other dune-* 
packages on aarch64-linux, which are currently all failing because they 
depend on the broken dune-common package.

Kind regards,
Felix

Comments

Ludovic Courtès May 4, 2023, 9:35 a.m. UTC | #1
Hi,

Felix Gruber <felgru@posteo.net> skribis:

> From 1001e15623108e6f92b89a1a2daacd43b5e2a123 Mon Sep 17 00:00:00 2001
> From: Felix Gruber <felgru@posteo.net>
> Date: Tue, 2 May 2023 21:59:30 +0200
> Subject: [PATCH] gnu: dune-common: Fix build on aarch64-linux.
>
> * gnu/packages/maths.scm (dune-common)[source]: Add patch to disable
>   tests that are failing on aarch64-linux.
> * gnu/packages/patches/dune-common-disable-long-double-eigenvalue-checks.patch:
>   New file.
> * gnu/local.mk (dist_patch_DATA): Register it.

I confirmed that it solves the problem on AArch64.

I tweaked it, in particular adding a comment at the top of the patch,
and committed.

Thanks,
Ludo’.
diff mbox

Patch

From 1001e15623108e6f92b89a1a2daacd43b5e2a123 Mon Sep 17 00:00:00 2001
From: Felix Gruber <felgru@posteo.net>
Date: Tue, 2 May 2023 21:59:30 +0200
Subject: [PATCH] gnu: dune-common: Fix build on aarch64-linux.

* gnu/packages/maths.scm (dune-common)[source]: Add patch to disable
  tests that are failing on aarch64-linux.
* gnu/packages/patches/dune-common-disable-long-double-eigenvalue-checks.patch:
  New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/maths.scm                        |  4 ++-
 ...isable-long-double-eigenvalue-checks.patch | 28 +++++++++++++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/dune-common-disable-long-double-eigenvalue-checks.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1476c730ba..68a40e7c6c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1056,6 +1056,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch	\
   %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch	\
   %D%/packages/patches/dstat-skip-devices-without-io.patch	\
+  %D%/packages/patches/dune-common-disable-long-double-eigenvalue-checks.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 		\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d7e2719b70..31ae3796fc 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6805,7 +6805,9 @@  (define-public dune-common
                            version "/dune-common-" version ".tar.gz"))
        (sha256
         (base32
-         "04pzk8q0bibci8z5xlwndhh3y3vs63mw7kad62lbzfwrr5121hrd"))))
+         "04pzk8q0bibci8z5xlwndhh3y3vs63mw7kad62lbzfwrr5121hrd"))
+       (patches (search-patches
+                  "dune-common-disable-long-double-eigenvalue-checks.patch"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
diff --git a/gnu/packages/patches/dune-common-disable-long-double-eigenvalue-checks.patch b/gnu/packages/patches/dune-common-disable-long-double-eigenvalue-checks.patch
new file mode 100644
index 0000000000..cdab27b933
--- /dev/null
+++ b/gnu/packages/patches/dune-common-disable-long-double-eigenvalue-checks.patch
@@ -0,0 +1,28 @@ 
+--- a/dune/common/test/eigenvaluestest.cc
++++ b/dune/common/test/eigenvaluestest.cc
+@@ -340,20 +340,20 @@
+   testSymmetricFieldMatrix<double,200>();
+   testSymmetricFieldMatrix<float,4>();
+   testSymmetricFieldMatrix<float,200>();
+-  testSymmetricFieldMatrix<long double,4>();
+-  testSymmetricFieldMatrix<long double,200>();
++//   testSymmetricFieldMatrix<long double,4>();
++//   testSymmetricFieldMatrix<long double,200>();
+ #endif // HAVE_LAPACK
+ 
+   testSymmetricFieldMatrix<double,2>();
+   testSymmetricFieldMatrix<double,3>();
+   testSymmetricFieldMatrix<float,2>();
+   testSymmetricFieldMatrix<float,3>();
+-  testSymmetricFieldMatrix<long double,2>();
+-  testSymmetricFieldMatrix<long double,3>();
++//   testSymmetricFieldMatrix<long double,2>();
++//   testSymmetricFieldMatrix<long double,3>();
+ 
+   checkMultiplicity<double>();
+   checkMultiplicity<float>();
+-  checkMultiplicity<long double>();
++//   checkMultiplicity<long double>();
+ 
+   return 0;
+ }
-- 
2.39.2