* [bug#39862] [PATCH 0/4] update Dune finite element packages
@ 2020-03-01 19:49 Felix Gruber
2020-03-01 20:23 ` [bug#39862] [PATCH 1/4] gnu: dune-*: set up MPI for tests Felix Gruber
` (4 more replies)
0 siblings, 5 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-01 19:49 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber
Hi Guix developers,
I've updated the packages of the Dune finite element library to properly
set up OpenMPI before running their tests instead of disabling all the
tests that failed due to mis-configured OpenMPI.
BTW, some other packages exist in variants with and without OpenMPI,
e.g. the dealii and dealii-openmpi packages. Do you think that it would
be useful to provide similar variants for the dune-* packages, which
could also be built without OpenMPI?
Additionally, I've added two new packages, dune-uggrid and dune-subgrid
that might be useful in combination with the existing Dune packages.
Finally, I've added the suitesparse package to dune-istl which as an
optional dependency allows to build some additional solvers for sparse
linear systems into dune-istl.
I've checked that all Dune packages still build after my changes (there
don't seem to be any other packages that depend on the dune-* packages).
Those builds were done using the updated suitesparse package that I've
submitted in bug #39839.
Felix Gruber (4):
gnu: dune-*: set up MPI for tests
gnu: add dune-uggrid 2.6.0
gnu: Add dune-subgrid
gnu: dune-istl: Build with suitesparse
gnu/packages/maths.scm | 207 +++++++++++++++++++++--------------------
1 file changed, 106 insertions(+), 101 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH 1/4] gnu: dune-*: set up MPI for tests
2020-03-01 19:49 [bug#39862] [PATCH 0/4] update Dune finite element packages Felix Gruber
@ 2020-03-01 20:23 ` Felix Gruber
2020-03-01 20:24 ` [bug#39862] [PATCH 2/4] gnu: add dune-uggrid 2.6.0 Felix Gruber
` (3 subsequent siblings)
4 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-01 20:23 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber
* gnu/packages/maths.scm (dune-common, dune-grid, dune-istl,
dune-alugrid): [arguments]: correctly set up MPI instead of disabling
tests that require MPI.
---
gnu/packages/maths.scm | 110 ++++-------------------------------------
1 file changed, 10 insertions(+), 100 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index cee626f179..effba8956f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4583,36 +4583,8 @@ linear algebra primitives specifically targeting graph analytics.")
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "build_tests" make-flags)))
- ;; These tests fail because they require a fully functional MPI
- ;; environment.
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (setenv "ARGS"
- (string-append "--exclude-regex '("
- (string-join
- (list
- "remoteindicestest"
- "remoteindicestest-mpi-2"
- "syncertest"
- "syncertest-mpi-2"
- "variablesizecommunicatortest"
- "variablesizecommunicatortest-mpi-2"
- "arithmetictestsuitetest"
- "assertandreturntest"
- "assertandreturntest_ndebug"
- "concept"
- "debugaligntest"
- "mpicollectivecommunication"
- "mpicollectivecommunication-mpi-2"
- "mpiguardtest"
- "mpiguardtest-mpi-2"
- "mpihelpertest"
- "mpihelpertest-mpi-2"
- "mpihelpertest2"
- "mpihelpertest2-mpi-2")
- "|")
- ")'"))
- #t)))))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("gmp" ,gmp)
("metis" ,metis)
@@ -4693,54 +4665,8 @@ This package contains the basic DUNE geometry classes.")
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "build_tests" make-flags)))
- ;; These tests fail because they require a fully functional MPI
- ;; environment.
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (setenv "ARGS"
- (string-append "--exclude-regex '("
- (string-join
- (list
- "scsgmappertest"
- "conformvolumevtktest"
- "gnuplottest"
- "nonconformboundaryvtktest"
- "subsamplingvtktest"
- "vtktest"
- "vtktest-mpi-2"
- "vtksequencetest"
- "gmshtest-onedgrid"
- "test-dgf-yasp"
- "test-dgf-yasp-offset"
- "test-dgf-oned"
- "test-geogrid-yaspgrid"
- "test-gridinfo"
- "test-identitygrid"
- "testiteratorranges"
- "test-hierarchicsearch"
- "test-parallel-ug-mpi-2"
- "test-yaspgrid-backuprestore-equidistant"
- "test-yaspgrid-backuprestore-equidistant-mpi-2"
- "test-yaspgrid-backuprestore-equidistantoffset"
- "test-yaspgrid-backuprestore-equidistantoffset-mpi-2"
- "test-yaspgrid-backuprestore-tensor"
- "test-yaspgrid-backuprestore-tensor-mpi-2"
- "test-yaspgrid-tensorgridfactory"
- "test-yaspgrid-tensorgridfactory-mpi-2"
- "test-yaspgrid-yaspfactory-1d"
- "test-yaspgrid-yaspfactory-1d-mpi-2"
- "test-yaspgrid-yaspfactory-2d"
- "test-yaspgrid-yaspfactory-2d-mpi-2"
- "test-yaspgrid-yaspfactory-3d"
- "test-yaspgrid-yaspfactory-3d-mpi-2"
- "globalindexsettest"
- "persistentcontainertest"
- "structuredgridfactorytest"
- "tensorgridfactorytest"
- "vertexordertest")
- "|")
- ")'"))
- #t)))))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
@@ -4783,24 +4709,8 @@ This package contains the basic DUNE grid classes.")
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "build_tests" make-flags)))
- ;; These tests fail because they require a fully functional MPI
- ;; environment.
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (setenv "ARGS"
- (string-append "--exclude-regex '("
- (string-join
- (list
- "galerkintest"
- "hierarchytest"
- "pamgtest"
- "pamg_comm_repart_test"
- "matrixredisttest"
- "vectorcommtest"
- "matrixmarkettest")
- "|")
- ")'"))
- #t)))))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("dune-common" ,dune-common)
("openmpi" ,openmpi)
@@ -4886,9 +4796,7 @@ assemble global function spaces on finite-element grids.")
"1l9adgyjpra8mvwm445s0lpjshnb63jag85fb2hisbjn6bm320yj"))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f ; 7 of 8 tests fail because they need a full MPI
- ; environment
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-include
(lambda _
@@ -4900,7 +4808,9 @@ assemble global function spaces on finite-element grids.")
(lambda* (#:key inputs make-flags #:allow-other-keys)
(setenv "CPLUS_INCLUDE_PATH"
(string-append (assoc-ref inputs "dune-grid") "/share"))
- (apply invoke "make" "build_tests" make-flags))))))
+ (apply invoke "make" "build_tests" make-flags)))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH 2/4] gnu: add dune-uggrid 2.6.0
2020-03-01 19:49 [bug#39862] [PATCH 0/4] update Dune finite element packages Felix Gruber
2020-03-01 20:23 ` [bug#39862] [PATCH 1/4] gnu: dune-*: set up MPI for tests Felix Gruber
@ 2020-03-01 20:24 ` Felix Gruber
2020-03-01 20:25 ` [bug#39862] [PATCH 3/4] gnu: Add dune-subgrid Felix Gruber
` (2 subsequent siblings)
4 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-01 20:24 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber
* gnu/packages/maths.scm (dune-uggrid): New variable.
* gnu/packages/maths.scm (dune-grid): [propagated-inputs]: Add
dune-uggrid dependency, so that the UGGrid class in dune-grid can be
used by packages that have dune-grid as input.
* gnu/packages/maths.scm (dune-functions): [arguments]: enable tests
that previously weren't built as they require dune-uggrid.
---
gnu/packages/maths.scm | 53 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 52 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index effba8956f..f78ed51454 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4646,6 +4646,42 @@ This package contains the basic DUNE geometry classes.")
;; GPL version 2 with "runtime exception"
(license license:gpl2)))
+(define-public dune-uggrid
+ (package
+ (name "dune-uggrid")
+ (version "2.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dune-project.org/download/"
+ version "/dune-uggrid-" version ".tar.gz"))
+ (sha256
+ (base32
+ "05l7a1gb78mny49anyxk6rjvn66rhgm30y72v5cjg0m5kfgr1a1f"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags))))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("openmpi" ,openmpi)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "DUNE, the Distributed and Unified Numerics Environment is a
+modular toolbox for solving @dfn{partial differential equations} (PDEs) with
+grid-based methods. It supports the easy implementation of methods like
+@dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
+Differences} (FD).
+
+This package contains the DUNE UG grid classes.")
+ (license license:lgpl2.1)))
+
(define-public dune-grid
(package
(name "dune-grid")
@@ -4675,6 +4711,8 @@ This package contains the basic DUNE geometry classes.")
("openblas" ,openblas)
("openmpi" ,openmpi)
("python" ,python)))
+ (propagated-inputs
+ `(("dune-uggrid" ,dune-uggrid)))
(native-inputs
`(("gfortran" ,gfortran)
("pkg-config" ,pkg-config)))
@@ -4888,7 +4926,20 @@ operating on statically typed trees of objects.")
(base32
"1an8gb477n8j0kzpbrv7nr1snh8pxip0gsxq6w63jc83gg3dj200"))))
(build-system cmake-build-system)
- (arguments `(#:tests? #f)) ; FIXME: tests require dune-uugrid
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (setenv "ARGS"
+ ;; unable to load GMSH file in this test
+ "--exclude-regex gridviewfunctionspacebasistest")
+ #t))
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags)))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("dune-common" ,dune-common)
("dune-istl" ,dune-istl)
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH 3/4] gnu: Add dune-subgrid
2020-03-01 19:49 [bug#39862] [PATCH 0/4] update Dune finite element packages Felix Gruber
2020-03-01 20:23 ` [bug#39862] [PATCH 1/4] gnu: dune-*: set up MPI for tests Felix Gruber
2020-03-01 20:24 ` [bug#39862] [PATCH 2/4] gnu: add dune-uggrid 2.6.0 Felix Gruber
@ 2020-03-01 20:25 ` Felix Gruber
2020-03-01 20:25 ` [bug#39862] [PATCH 4/4] gnu: dune-istl: Build with suitesparse Felix Gruber
2020-03-02 14:53 ` [bug#39862] [PATCH 0/4] update Dune finite element packages zimoun
4 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-01 20:25 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber
* gnu/packages/maths.scm (dune-subgrid): New variable.
---
gnu/packages/maths.scm | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f78ed51454..77ff0ede08 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4871,6 +4871,49 @@ implementation of the DUNE grid interface supporting either simplices or
cubes.")
(license license:gpl2+)))
+(define-public dune-subgrid
+ (package
+ (name "dune-subgrid")
+ (version "2.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.imp.fu-berlin.de/agnumpde/dune-subgrid")
+ (commit "releases/2.6-1")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1gcv35rx3knqd54r4pp9rzd639db4j8w2r2ibq43w1mgwdcqhs64"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags)))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("dune-geometry" ,dune-geometry)
+ ("dune-grid" ,dune-grid)
+ ("openmpi" ,openmpi)
+ ;; Optional
+ ("metis" ,metis)
+ ("openblas" ,openblas)
+ ("gmp" ,gmp)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "http://numerik.mi.fu-berlin.de/dune-subgrid/index.php")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "The dune-subgrid module allows to mark elements of
+another hierarchical dune grid. The set of marked elements can then be
+accessed as a hierarchical dune grid in its own right. Dune-Subgrid
+provides the full grid interface including adaptive mesh refinement.")
+ (license license:gpl2+)))
+
(define-public dune-typetree
(package
(name "dune-typetree")
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH 4/4] gnu: dune-istl: Build with suitesparse
2020-03-01 19:49 [bug#39862] [PATCH 0/4] update Dune finite element packages Felix Gruber
` (2 preceding siblings ...)
2020-03-01 20:25 ` [bug#39862] [PATCH 3/4] gnu: Add dune-subgrid Felix Gruber
@ 2020-03-01 20:25 ` Felix Gruber
2020-03-02 14:53 ` [bug#39862] [PATCH 0/4] update Dune finite element packages zimoun
4 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-01 20:25 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber
* gnu/packages/maths.scm (dune-istl)[inputs]: Add suitesparse to build
additional solvers in dune-istl.
---
gnu/packages/maths.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 77ff0ede08..8b59d8dfaf 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4754,6 +4754,7 @@ This package contains the basic DUNE grid classes.")
("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
+ ("suitesparse" ,suitesparse)
("superlu" ,superlu)
("openblas" ,openblas)
("gmp" ,gmp)
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH 0/4] update Dune finite element packages
2020-03-01 19:49 [bug#39862] [PATCH 0/4] update Dune finite element packages Felix Gruber
` (3 preceding siblings ...)
2020-03-01 20:25 ` [bug#39862] [PATCH 4/4] gnu: dune-istl: Build with suitesparse Felix Gruber
@ 2020-03-02 14:53 ` zimoun
2020-03-02 21:56 ` Felix Gruber
4 siblings, 1 reply; 25+ messages in thread
From: zimoun @ 2020-03-02 14:53 UTC (permalink / raw)
To: Felix Gruber; +Cc: 39862
Hi Felix,
Thank for working on that.
On Sun, 1 Mar 2020 at 21:07, Felix Gruber <felgru@posteo.net> wrote:
> I've updated the packages of the Dune finite element library to properly
> set up OpenMPI before running their tests instead of disabling all the
> tests that failed due to mis-configured OpenMPI.
> BTW, some other packages exist in variants with and without OpenMPI,
> e.g. the dealii and dealii-openmpi packages. Do you think that it would
> be useful to provide similar variants for the dune-* packages, which
> could also be built without OpenMPI?
As an end-user, I prefer regular packages 'dune-*' without the input
'openmpi' and so with the related tests disabled and then their
variants; say 'dune-*-openmpi' with the input 'openmpi' correctly
setup-ed, as in your patch.
> I've checked that all Dune packages still build after my changes (there
> don't seem to be any other packages that depend on the dune-* packages).
> Those builds were done using the updated suitesparse package that I've
> submitted in bug #39839.
Usually, 'guix refresh -l' lists the packages that would need to be
rebuilt when upgrading a particular one.
All the best,
simon
^ permalink raw reply [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH 0/4] update Dune finite element packages
2020-03-02 14:53 ` [bug#39862] [PATCH 0/4] update Dune finite element packages zimoun
@ 2020-03-02 21:56 ` Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 0/6] Update " Felix Gruber
` (6 more replies)
0 siblings, 7 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-02 21:56 UTC (permalink / raw)
To: zimoun; +Cc: 39862
Hi Simon,
Thank you for your feedback.
On 3/2/20 3:53 PM, zimoun wrote:
> On Sun, 1 Mar 2020 at 21:07, Felix Gruber <felgru@posteo.net> wrote:
>
>> BTW, some other packages exist in variants with and without OpenMPI,
>> e.g. the dealii and dealii-openmpi packages. Do you think that it would
>> be useful to provide similar variants for the dune-* packages, which
>> could also be built without OpenMPI?
>
> As an end-user, I prefer regular packages 'dune-*' without the input
> 'openmpi' and so with the related tests disabled and then their
> variants; say 'dune-*-openmpi' with the input 'openmpi' correctly
> setup-ed, as in your patch.
Cool, I'll create an additional patch which splits all the dune packages
in those two variants. Still struggling a bit with guile to replace all
the dune-* packages with dune-*-openmpi in an inputs list without copy
pasting the whole list and changing the packages manually.
>> I've checked that all Dune packages still build after my changes (there
>> don't seem to be any other packages that depend on the dune-* packages).
>> Those builds were done using the updated suitesparse package that I've
>> submitted in bug #39839.
>
> Usually, 'guix refresh -l' lists the packages that would need to be
> rebuilt when upgrading a particular one.
A `guix refresh -l dune-common` only gives me three other dune-*
packages that would result in rebuilding 10 packages overall. Since
dune-common is in the input of all the other dune-* packages, I think
that tells me that there are no non-dune packages that depend on any
dune-* package.
Best,
Felix
^ permalink raw reply [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v2 0/6] Update Dune finite element packages
2020-03-02 21:56 ` Felix Gruber
@ 2020-03-10 19:29 ` Felix Gruber
2020-03-12 10:46 ` Ludovic Courtès
2020-03-10 19:29 ` [bug#39862] [PATCH v2 1/6] gnu: dune-*: set up MPI for tests Felix Gruber
` (5 subsequent siblings)
6 siblings, 1 reply; 25+ messages in thread
From: Felix Gruber @ 2020-03-10 19:29 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, zimoun
The first four patches in this patch set are identical to v1. I've added
two new patches that remove the openmpi dependency from all dune-*
packages and add new dedicated dune-*-openmpi packages instead.
To create these openmpi variants of the dune-* packages without a lot of
duplication, I've added a helper function add-openmpi-to-dune-package
that takes a dune-* package and returns its openmpi variant with the
correct dependencies and the setup code necessary to make Dune's tests
work with openmpi.
Felix Gruber (6):
gnu: dune-*: set up MPI for tests
gnu: add dune-uggrid 2.6.0
gnu: Add dune-subgrid
gnu: dune-istl: Build with suitesparse
gnu: dune-*: remove openmpi dependency
gnu: define dune-*-openmpi packages
gnu/packages/maths.scm | 285 +++++++++++++++++++++++++----------------
1 file changed, 172 insertions(+), 113 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v2 1/6] gnu: dune-*: set up MPI for tests
2020-03-02 21:56 ` Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 0/6] Update " Felix Gruber
@ 2020-03-10 19:29 ` Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 2/6] gnu: add dune-uggrid 2.6.0 Felix Gruber
` (4 subsequent siblings)
6 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-10 19:29 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, zimoun
* gnu/packages/maths.scm (dune-common, dune-grid, dune-istl,
dune-alugrid): [arguments]: correctly set up MPI instead of disabling
tests that require MPI.
---
gnu/packages/maths.scm | 110 ++++-------------------------------------
1 file changed, 10 insertions(+), 100 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a990ffc45e..bec490ebc3 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4583,36 +4583,8 @@ linear algebra primitives specifically targeting graph analytics.")
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "build_tests" make-flags)))
- ;; These tests fail because they require a fully functional MPI
- ;; environment.
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (setenv "ARGS"
- (string-append "--exclude-regex '("
- (string-join
- (list
- "remoteindicestest"
- "remoteindicestest-mpi-2"
- "syncertest"
- "syncertest-mpi-2"
- "variablesizecommunicatortest"
- "variablesizecommunicatortest-mpi-2"
- "arithmetictestsuitetest"
- "assertandreturntest"
- "assertandreturntest_ndebug"
- "concept"
- "debugaligntest"
- "mpicollectivecommunication"
- "mpicollectivecommunication-mpi-2"
- "mpiguardtest"
- "mpiguardtest-mpi-2"
- "mpihelpertest"
- "mpihelpertest-mpi-2"
- "mpihelpertest2"
- "mpihelpertest2-mpi-2")
- "|")
- ")'"))
- #t)))))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("gmp" ,gmp)
("metis" ,metis)
@@ -4693,54 +4665,8 @@ This package contains the basic DUNE geometry classes.")
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "build_tests" make-flags)))
- ;; These tests fail because they require a fully functional MPI
- ;; environment.
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (setenv "ARGS"
- (string-append "--exclude-regex '("
- (string-join
- (list
- "scsgmappertest"
- "conformvolumevtktest"
- "gnuplottest"
- "nonconformboundaryvtktest"
- "subsamplingvtktest"
- "vtktest"
- "vtktest-mpi-2"
- "vtksequencetest"
- "gmshtest-onedgrid"
- "test-dgf-yasp"
- "test-dgf-yasp-offset"
- "test-dgf-oned"
- "test-geogrid-yaspgrid"
- "test-gridinfo"
- "test-identitygrid"
- "testiteratorranges"
- "test-hierarchicsearch"
- "test-parallel-ug-mpi-2"
- "test-yaspgrid-backuprestore-equidistant"
- "test-yaspgrid-backuprestore-equidistant-mpi-2"
- "test-yaspgrid-backuprestore-equidistantoffset"
- "test-yaspgrid-backuprestore-equidistantoffset-mpi-2"
- "test-yaspgrid-backuprestore-tensor"
- "test-yaspgrid-backuprestore-tensor-mpi-2"
- "test-yaspgrid-tensorgridfactory"
- "test-yaspgrid-tensorgridfactory-mpi-2"
- "test-yaspgrid-yaspfactory-1d"
- "test-yaspgrid-yaspfactory-1d-mpi-2"
- "test-yaspgrid-yaspfactory-2d"
- "test-yaspgrid-yaspfactory-2d-mpi-2"
- "test-yaspgrid-yaspfactory-3d"
- "test-yaspgrid-yaspfactory-3d-mpi-2"
- "globalindexsettest"
- "persistentcontainertest"
- "structuredgridfactorytest"
- "tensorgridfactorytest"
- "vertexordertest")
- "|")
- ")'"))
- #t)))))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
@@ -4783,24 +4709,8 @@ This package contains the basic DUNE grid classes.")
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "build_tests" make-flags)))
- ;; These tests fail because they require a fully functional MPI
- ;; environment.
- (add-after 'unpack 'disable-failing-tests
- (lambda _
- (setenv "ARGS"
- (string-append "--exclude-regex '("
- (string-join
- (list
- "galerkintest"
- "hierarchytest"
- "pamgtest"
- "pamg_comm_repart_test"
- "matrixredisttest"
- "vectorcommtest"
- "matrixmarkettest")
- "|")
- ")'"))
- #t)))))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("dune-common" ,dune-common)
("openmpi" ,openmpi)
@@ -4886,9 +4796,7 @@ assemble global function spaces on finite-element grids.")
"1l9adgyjpra8mvwm445s0lpjshnb63jag85fb2hisbjn6bm320yj"))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f ; 7 of 8 tests fail because they need a full MPI
- ; environment
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-include
(lambda _
@@ -4900,7 +4808,9 @@ assemble global function spaces on finite-element grids.")
(lambda* (#:key inputs make-flags #:allow-other-keys)
(setenv "CPLUS_INCLUDE_PATH"
(string-append (assoc-ref inputs "dune-grid") "/share"))
- (apply invoke "make" "build_tests" make-flags))))))
+ (apply invoke "make" "build_tests" make-flags)))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v2 2/6] gnu: add dune-uggrid 2.6.0
2020-03-02 21:56 ` Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 0/6] Update " Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 1/6] gnu: dune-*: set up MPI for tests Felix Gruber
@ 2020-03-10 19:29 ` Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 3/6] gnu: Add dune-subgrid Felix Gruber
` (3 subsequent siblings)
6 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-10 19:29 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, zimoun
* gnu/packages/maths.scm (dune-uggrid): New variable.
* gnu/packages/maths.scm (dune-grid): [propagated-inputs]: Add
dune-uggrid dependency, so that the UGGrid class in dune-grid can be
used by packages that have dune-grid as input.
* gnu/packages/maths.scm (dune-functions): [arguments]: enable tests
that previously weren't built as they require dune-uggrid.
---
gnu/packages/maths.scm | 53 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 52 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index bec490ebc3..3f89efeff4 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4646,6 +4646,42 @@ This package contains the basic DUNE geometry classes.")
;; GPL version 2 with "runtime exception"
(license license:gpl2)))
+(define-public dune-uggrid
+ (package
+ (name "dune-uggrid")
+ (version "2.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dune-project.org/download/"
+ version "/dune-uggrid-" version ".tar.gz"))
+ (sha256
+ (base32
+ "05l7a1gb78mny49anyxk6rjvn66rhgm30y72v5cjg0m5kfgr1a1f"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags))))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("openmpi" ,openmpi)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "DUNE, the Distributed and Unified Numerics Environment is a
+modular toolbox for solving @dfn{partial differential equations} (PDEs) with
+grid-based methods. It supports the easy implementation of methods like
+@dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
+Differences} (FD).
+
+This package contains the DUNE UG grid classes.")
+ (license license:lgpl2.1)))
+
(define-public dune-grid
(package
(name "dune-grid")
@@ -4675,6 +4711,8 @@ This package contains the basic DUNE geometry classes.")
("openblas" ,openblas)
("openmpi" ,openmpi)
("python" ,python)))
+ (propagated-inputs
+ `(("dune-uggrid" ,dune-uggrid)))
(native-inputs
`(("gfortran" ,gfortran)
("pkg-config" ,pkg-config)))
@@ -4888,7 +4926,20 @@ operating on statically typed trees of objects.")
(base32
"1an8gb477n8j0kzpbrv7nr1snh8pxip0gsxq6w63jc83gg3dj200"))))
(build-system cmake-build-system)
- (arguments `(#:tests? #f)) ; FIXME: tests require dune-uugrid
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (setenv "ARGS"
+ ;; unable to load GMSH file in this test
+ "--exclude-regex gridviewfunctionspacebasistest")
+ #t))
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags)))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
(inputs
`(("dune-common" ,dune-common)
("dune-istl" ,dune-istl)
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v2 3/6] gnu: Add dune-subgrid
2020-03-02 21:56 ` Felix Gruber
` (2 preceding siblings ...)
2020-03-10 19:29 ` [bug#39862] [PATCH v2 2/6] gnu: add dune-uggrid 2.6.0 Felix Gruber
@ 2020-03-10 19:29 ` Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 4/6] gnu: dune-istl: Build with suitesparse Felix Gruber
` (2 subsequent siblings)
6 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-10 19:29 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, zimoun
* gnu/packages/maths.scm (dune-subgrid): New variable.
---
gnu/packages/maths.scm | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 3f89efeff4..9da38aad68 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4871,6 +4871,49 @@ implementation of the DUNE grid interface supporting either simplices or
cubes.")
(license license:gpl2+)))
+(define-public dune-subgrid
+ (package
+ (name "dune-subgrid")
+ (version "2.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.imp.fu-berlin.de/agnumpde/dune-subgrid")
+ (commit "releases/2.6-1")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1gcv35rx3knqd54r4pp9rzd639db4j8w2r2ibq43w1mgwdcqhs64"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags)))
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("dune-geometry" ,dune-geometry)
+ ("dune-grid" ,dune-grid)
+ ("openmpi" ,openmpi)
+ ;; Optional
+ ("metis" ,metis)
+ ("openblas" ,openblas)
+ ("gmp" ,gmp)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "http://numerik.mi.fu-berlin.de/dune-subgrid/index.php")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "The dune-subgrid module allows to mark elements of
+another hierarchical dune grid. The set of marked elements can then be
+accessed as a hierarchical dune grid in its own right. Dune-Subgrid
+provides the full grid interface including adaptive mesh refinement.")
+ (license license:gpl2+)))
+
(define-public dune-typetree
(package
(name "dune-typetree")
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v2 4/6] gnu: dune-istl: Build with suitesparse
2020-03-02 21:56 ` Felix Gruber
` (3 preceding siblings ...)
2020-03-10 19:29 ` [bug#39862] [PATCH v2 3/6] gnu: Add dune-subgrid Felix Gruber
@ 2020-03-10 19:29 ` Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 5/6] gnu: dune-*: remove openmpi dependency Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 6/6] gnu: define dune-*-openmpi packages Felix Gruber
6 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-10 19:29 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, zimoun
* gnu/packages/maths.scm (dune-istl)[inputs]: Add suitesparse to build
additional solvers in dune-istl.
---
gnu/packages/maths.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 9da38aad68..2c03c00366 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4754,6 +4754,7 @@ This package contains the basic DUNE grid classes.")
("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
+ ("suitesparse" ,suitesparse)
("superlu" ,superlu)
("openblas" ,openblas)
("gmp" ,gmp)
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v2 5/6] gnu: dune-*: remove openmpi dependency
2020-03-02 21:56 ` Felix Gruber
` (4 preceding siblings ...)
2020-03-10 19:29 ` [bug#39862] [PATCH v2 4/6] gnu: dune-istl: Build with suitesparse Felix Gruber
@ 2020-03-10 19:29 ` Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 6/6] gnu: define dune-*-openmpi packages Felix Gruber
6 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-10 19:29 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, zimoun
* gnu/packages/maths.scm (dune-*)[inputs]: Remove openmpi dependency.
[arguments]: remove code to setup openmpi for tests.
---
gnu/packages/maths.scm | 37 +++++++------------------------------
1 file changed, 7 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2c03c00366..33a5efd2f0 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4582,13 +4582,10 @@ linear algebra primitives specifically targeting graph analytics.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("gmp" ,gmp)
("metis" ,metis)
- ("openmpi" ,openmpi)
("openblas" ,openblas)
("python" ,python)
("superlu" ,superlu)))
@@ -4626,7 +4623,6 @@ Differences} (FD).")
(apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)
;; Optional
("openblas" ,openblas)
("gmp" ,gmp)
@@ -4666,8 +4662,7 @@ This package contains the basic DUNE geometry classes.")
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "build_tests" make-flags))))))
(inputs
- `(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)))
+ `(("dune-common" ,dune-common)))
(native-inputs
`(("gfortran" ,gfortran)
("pkg-config" ,pkg-config)))
@@ -4700,16 +4695,13 @@ This package contains the DUNE UG grid classes.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
("gmp" ,gmp)
("metis" ,metis)
("openblas" ,openblas)
- ("openmpi" ,openmpi)
("python" ,python)))
(propagated-inputs
`(("dune-uggrid" ,dune-uggrid)))
@@ -4746,12 +4738,9 @@ This package contains the basic DUNE grid classes.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("suitesparse" ,suitesparse)
@@ -4799,7 +4788,6 @@ aggregation-based algebraic multigrid.")
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("superlu" ,superlu)
@@ -4847,14 +4835,11 @@ assemble global function spaces on finite-element grids.")
(lambda* (#:key inputs make-flags #:allow-other-keys)
(setenv "CPLUS_INCLUDE_PATH"
(string-append (assoc-ref inputs "dune-grid") "/share"))
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
("dune-grid" ,dune-grid)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("openblas" ,openblas)
@@ -4892,14 +4877,11 @@ cubes.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
("dune-grid" ,dune-grid)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("openblas" ,openblas)
@@ -4938,7 +4920,6 @@ provides the full grid interface including adaptive mesh refinement.")
(apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)
;; Optional
("openblas" ,openblas)
("python" ,python)
@@ -4981,9 +4962,7 @@ operating on statically typed trees of objects.")
#t))
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-istl" ,dune-istl)
@@ -4991,7 +4970,6 @@ operating on statically typed trees of objects.")
("dune-grid" ,dune-grid)
("dune-geometry" ,dune-geometry)
("dune-typetree" ,dune-typetree)
- ("openmpi" ,openmpi)
("openblas" ,openblas)
("metis" ,metis)
("python" ,python)
@@ -5032,7 +5010,6 @@ implemented as callable objects, and bases of finite element spaces.")
("dune-grid" ,dune-grid)
("dune-typetree" ,dune-typetree)
("dune-functions" ,dune-functions)
- ("openmpi" ,openmpi)
;; Optional
("openblas" ,openblas)
("eigen" ,eigen)
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v2 6/6] gnu: define dune-*-openmpi packages
2020-03-02 21:56 ` Felix Gruber
` (5 preceding siblings ...)
2020-03-10 19:29 ` [bug#39862] [PATCH v2 5/6] gnu: dune-*: remove openmpi dependency Felix Gruber
@ 2020-03-10 19:29 ` Felix Gruber
2020-03-12 12:42 ` Ludovic Courtès
6 siblings, 1 reply; 25+ messages in thread
From: Felix Gruber @ 2020-03-10 19:29 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, zimoun
* gnu/packages/maths.scm (dune-*-openmpi): New variables.
* gnu/packages/maths.scm (add-openmpi-to-dune-package): New function to
add openmpi to the inputs of a dune-* package and replace all dune-*
packages in its input with the corresponding dune-*-openmpi package.
---
gnu/packages/maths.scm | 79 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 78 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 33a5efd2f0..e904ca1bd8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -126,7 +126,9 @@
#:use-module (gnu packages version-control)
#:use-module (gnu packages wxwidgets)
#:use-module (gnu packages xml)
- #:use-module (srfi srfi-1))
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35))
(define-public aris
(package
@@ -5027,6 +5029,81 @@ built on top of DUNE, the Distributed and Unified Numerics Environment.")
;; Either GPL version 2 with "runtime exception" or LGPLv3+.
(license (list license:lgpl3+ license:gpl2))))
+(define add-openmpi-to-dune-package
+ (let ((transformed-packages '()))
+ (lambda (p)
+ (let* ((p-name (package-name p))
+ (replace-package
+ (lambda (mapping)
+ (let* ((name (car mapping))
+ (p (cadr mapping))
+ (new-p
+ (match (assoc-ref transformed-packages name)
+ (#f
+ (if (string-prefix? "dune-" name)
+ (raise (condition
+ (&message
+ (message
+ (format #f "Need to call \
+add-openmpi-to-dune-package on '~a' before '~a'."
+ name p-name)))))
+ p))
+ (transformed-p transformed-p))))
+ `(,name ,new-p))))
+ (substitute-mpi-packages (lambda (inputs)
+ (map replace-package inputs)))
+ (mpi-p
+ (package (inherit p)
+ (name (string-append p-name "-openmpi"))
+ (inputs `(,@(substitute-mpi-packages (package-inputs p))
+ ("openmpi" ,openmpi)))
+ (propagated-inputs
+ (substitute-mpi-packages (package-propagated-inputs p)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments p)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup)))))
+ (synopsis (string-append (package-synopsis p) " (with MPI support)")))))
+ (begin
+ (set! transformed-packages
+ (acons p-name mpi-p transformed-packages))
+ mpi-p)))))
+
+(define-public dune-common-openmpi
+ (add-openmpi-to-dune-package dune-common))
+
+(define-public dune-geometry-openmpi
+ (add-openmpi-to-dune-package dune-geometry))
+
+(define-public dune-istl-openmpi
+ (add-openmpi-to-dune-package dune-istl))
+
+(define-public dune-typetree-openmpi
+ (add-openmpi-to-dune-package dune-typetree))
+
+(define-public dune-uggrid-openmpi
+ (add-openmpi-to-dune-package dune-uggrid))
+
+(define-public dune-grid-openmpi
+ (add-openmpi-to-dune-package dune-grid))
+
+(define-public dune-alugrid-openmpi
+ (add-openmpi-to-dune-package dune-alugrid))
+
+(define-public dune-subgrid-openmpi
+ (add-openmpi-to-dune-package dune-subgrid))
+
+(define-public dune-localfunctions-openmpi
+ (add-openmpi-to-dune-package dune-localfunctions))
+
+(define-public dune-functions-openmpi
+ (add-openmpi-to-dune-package dune-functions))
+
+(define-public dune-pdelab-openmpi
+ (add-openmpi-to-dune-package dune-pdelab))
+
(define-public mlucas
(package
(name "mlucas")
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v2 0/6] Update Dune finite element packages
2020-03-10 19:29 ` [bug#39862] [PATCH v2 0/6] Update " Felix Gruber
@ 2020-03-12 10:46 ` Ludovic Courtès
0 siblings, 0 replies; 25+ messages in thread
From: Ludovic Courtès @ 2020-03-12 10:46 UTC (permalink / raw)
To: Felix Gruber; +Cc: zimoun, 39862
Hi Felix,
Felix Gruber <felgru@posteo.net> skribis:
> The first four patches in this patch set are identical to v1. I've added
> two new patches that remove the openmpi dependency from all dune-*
> packages and add new dedicated dune-*-openmpi packages instead.
> To create these openmpi variants of the dune-* packages without a lot of
> duplication, I've added a helper function add-openmpi-to-dune-package
> that takes a dune-* package and returns its openmpi variant with the
> correct dependencies and the setup code necessary to make Dune's tests
> work with openmpi.
>
> Felix Gruber (6):
> gnu: dune-*: set up MPI for tests
> gnu: add dune-uggrid 2.6.0
> gnu: Add dune-subgrid
> gnu: dune-istl: Build with suitesparse
I applied all these.
> gnu: dune-*: remove openmpi dependency
> gnu: define dune-*-openmpi packages
I’ll comment on these separately.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v2 6/6] gnu: define dune-*-openmpi packages
2020-03-10 19:29 ` [bug#39862] [PATCH v2 6/6] gnu: define dune-*-openmpi packages Felix Gruber
@ 2020-03-12 12:42 ` Ludovic Courtès
2020-03-12 21:05 ` [bug#39862] [PATCH v3 0/2] Add " Felix Gruber
` (2 more replies)
0 siblings, 3 replies; 25+ messages in thread
From: Ludovic Courtès @ 2020-03-12 12:42 UTC (permalink / raw)
To: Felix Gruber; +Cc: zimoun, 39862
Hi again,
Felix Gruber <felgru@posteo.net> skribis:
> +(define add-openmpi-to-dune-package
> + (let ((transformed-packages '()))
> + (lambda (p)
> + (let* ((p-name (package-name p))
> + (replace-package
> + (lambda (mapping)
> + (let* ((name (car mapping))
> + (p (cadr mapping))
> + (new-p
> + (match (assoc-ref transformed-packages name)
> + (#f
> + (if (string-prefix? "dune-" name)
> + (raise (condition
> + (&message
> + (message
> + (format #f "Need to call \
> +add-openmpi-to-dune-package on '~a' before '~a'."
> + name p-name)))))
> + p))
> + (transformed-p transformed-p))))
> + `(,name ,new-p))))
> + (substitute-mpi-packages (lambda (inputs)
> + (map replace-package inputs)))
> + (mpi-p
> + (package (inherit p)
> + (name (string-append p-name "-openmpi"))
> + (inputs `(,@(substitute-mpi-packages (package-inputs p))
> + ("openmpi" ,openmpi)))
> + (propagated-inputs
> + (substitute-mpi-packages (package-propagated-inputs p)))
> + (arguments
> + (substitute-keyword-arguments (package-arguments p)
> + ((#:phases phases '%standard-phases)
> + `(modify-phases ,phases
> + (add-before 'check 'mpi-setup
> + ,%openmpi-setup)))))
> + (synopsis (string-append (package-synopsis p) " (with MPI support)")))))
> + (begin
> + (set! transformed-packages
> + (acons p-name mpi-p transformed-packages))
> + mpi-p)))))
I think it’s a good idea to add those “-openmpi” packages. However, I
have suggestions regarding the code above. :-)
A general note: set!, car, cdr, etc. are frowned upon in Guix:
https://guix.gnu.org/manual/en/html_node/Coding-Style.html
It seems to me that ‘replace-package’ above is overly generic: since
it’s an internal procedure, we don’t need to add error cases, messages,
etc.
Last, could it be written in terms of ‘package-mapping’? That takes
care of graph traversal and memoization.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v3 0/2] Add dune-*-openmpi packages
2020-03-12 12:42 ` Ludovic Courtès
@ 2020-03-12 21:05 ` Felix Gruber
2020-03-12 21:05 ` [bug#39862] [PATCH v3 1/2] gnu: dune-*: remove openmpi dependency Felix Gruber
2020-03-12 21:05 ` [bug#39862] [PATCH v3 2/2] gnu: define dune-*-openmpi packages Felix Gruber
2 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-12 21:05 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, Ludovic Courtès
Hi Ludo’,
thanks for your suggestions regarding the creation of the dune-*-openmpi
packages. I've rewritten the add-openmpi-to-dune-package in terms of
package-mapping as you suggested.
You'll find the modified version of my last two patches in the following
two emails.
Many thanks,
Felix
Felix Gruber (2):
gnu: dune-*: remove openmpi dependency
gnu: define dune-*-openmpi packages
gnu/packages/maths.scm | 90 ++++++++++++++++++++++++++++--------------
1 file changed, 60 insertions(+), 30 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v3 1/2] gnu: dune-*: remove openmpi dependency
2020-03-12 12:42 ` Ludovic Courtès
2020-03-12 21:05 ` [bug#39862] [PATCH v3 0/2] Add " Felix Gruber
@ 2020-03-12 21:05 ` Felix Gruber
2020-03-12 21:05 ` [bug#39862] [PATCH v3 2/2] gnu: define dune-*-openmpi packages Felix Gruber
2 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-12 21:05 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, Ludovic Courtès
* gnu/packages/maths.scm (dune-*)[inputs]: Remove openmpi dependency.
[arguments]: remove code to setup openmpi for tests.
---
gnu/packages/maths.scm | 37 +++++++------------------------------
1 file changed, 7 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2c03c00366..33a5efd2f0 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4582,13 +4582,10 @@ linear algebra primitives specifically targeting graph analytics.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("gmp" ,gmp)
("metis" ,metis)
- ("openmpi" ,openmpi)
("openblas" ,openblas)
("python" ,python)
("superlu" ,superlu)))
@@ -4626,7 +4623,6 @@ Differences} (FD).")
(apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)
;; Optional
("openblas" ,openblas)
("gmp" ,gmp)
@@ -4666,8 +4662,7 @@ This package contains the basic DUNE geometry classes.")
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "build_tests" make-flags))))))
(inputs
- `(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)))
+ `(("dune-common" ,dune-common)))
(native-inputs
`(("gfortran" ,gfortran)
("pkg-config" ,pkg-config)))
@@ -4700,16 +4695,13 @@ This package contains the DUNE UG grid classes.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
("gmp" ,gmp)
("metis" ,metis)
("openblas" ,openblas)
- ("openmpi" ,openmpi)
("python" ,python)))
(propagated-inputs
`(("dune-uggrid" ,dune-uggrid)))
@@ -4746,12 +4738,9 @@ This package contains the basic DUNE grid classes.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("suitesparse" ,suitesparse)
@@ -4799,7 +4788,6 @@ aggregation-based algebraic multigrid.")
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("superlu" ,superlu)
@@ -4847,14 +4835,11 @@ assemble global function spaces on finite-element grids.")
(lambda* (#:key inputs make-flags #:allow-other-keys)
(setenv "CPLUS_INCLUDE_PATH"
(string-append (assoc-ref inputs "dune-grid") "/share"))
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
("dune-grid" ,dune-grid)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("openblas" ,openblas)
@@ -4892,14 +4877,11 @@ cubes.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
("dune-grid" ,dune-grid)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("openblas" ,openblas)
@@ -4938,7 +4920,6 @@ provides the full grid interface including adaptive mesh refinement.")
(apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)
;; Optional
("openblas" ,openblas)
("python" ,python)
@@ -4981,9 +4962,7 @@ operating on statically typed trees of objects.")
#t))
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-istl" ,dune-istl)
@@ -4991,7 +4970,6 @@ operating on statically typed trees of objects.")
("dune-grid" ,dune-grid)
("dune-geometry" ,dune-geometry)
("dune-typetree" ,dune-typetree)
- ("openmpi" ,openmpi)
("openblas" ,openblas)
("metis" ,metis)
("python" ,python)
@@ -5032,7 +5010,6 @@ implemented as callable objects, and bases of finite element spaces.")
("dune-grid" ,dune-grid)
("dune-typetree" ,dune-typetree)
("dune-functions" ,dune-functions)
- ("openmpi" ,openmpi)
;; Optional
("openblas" ,openblas)
("eigen" ,eigen)
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v3 2/2] gnu: define dune-*-openmpi packages
2020-03-12 12:42 ` Ludovic Courtès
2020-03-12 21:05 ` [bug#39862] [PATCH v3 0/2] Add " Felix Gruber
2020-03-12 21:05 ` [bug#39862] [PATCH v3 1/2] gnu: dune-*: remove openmpi dependency Felix Gruber
@ 2020-03-12 21:05 ` Felix Gruber
2020-03-13 9:42 ` Ludovic Courtès
2 siblings, 1 reply; 25+ messages in thread
From: Felix Gruber @ 2020-03-12 21:05 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, Ludovic Courtès
* gnu/packages/maths.scm (dune-*-openmpi): New variables.
* gnu/packages/maths.scm (add-openmpi-to-dune-package): New function to
add openmpi to the inputs of a dune-* package and replace all dune-*
packages in its input with the corresponding dune-*-openmpi package.
---
gnu/packages/maths.scm | 53 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 33a5efd2f0..ac89064a7f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5027,6 +5027,59 @@ built on top of DUNE, the Distributed and Unified Numerics Environment.")
;; Either GPL version 2 with "runtime exception" or LGPLv3+.
(license (list license:lgpl3+ license:gpl2))))
+(define add-openmpi-to-dune-package
+ (let ((dune-package?
+ (lambda (p) (string-prefix? "dune-" (package-name p)))))
+ (package-mapping
+ (lambda (p)
+ (if (dune-package? p)
+ (package (inherit p)
+ (name (string-append (package-name p) "-openmpi"))
+ (inputs `(,@(package-inputs p)
+ ("openmpi" ,openmpi)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments p)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup)))))
+ (synopsis (string-append (package-synopsis p) " (with MPI support)")))
+ p))
+ (lambda (p) (not (dune-package? p))))))
+
+(define-public dune-common-openmpi
+ (add-openmpi-to-dune-package dune-common))
+
+(define-public dune-geometry-openmpi
+ (add-openmpi-to-dune-package dune-geometry))
+
+(define-public dune-istl-openmpi
+ (add-openmpi-to-dune-package dune-istl))
+
+(define-public dune-typetree-openmpi
+ (add-openmpi-to-dune-package dune-typetree))
+
+(define-public dune-uggrid-openmpi
+ (add-openmpi-to-dune-package dune-uggrid))
+
+(define-public dune-grid-openmpi
+ (add-openmpi-to-dune-package dune-grid))
+
+(define-public dune-alugrid-openmpi
+ (add-openmpi-to-dune-package dune-alugrid))
+
+(define-public dune-subgrid-openmpi
+ (add-openmpi-to-dune-package dune-subgrid))
+
+(define-public dune-localfunctions-openmpi
+ (add-openmpi-to-dune-package dune-localfunctions))
+
+(define-public dune-functions-openmpi
+ (add-openmpi-to-dune-package dune-functions))
+
+(define-public dune-pdelab-openmpi
+ (add-openmpi-to-dune-package dune-pdelab))
+
(define-public mlucas
(package
(name "mlucas")
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v3 2/2] gnu: define dune-*-openmpi packages
2020-03-12 21:05 ` [bug#39862] [PATCH v3 2/2] gnu: define dune-*-openmpi packages Felix Gruber
@ 2020-03-13 9:42 ` Ludovic Courtès
2020-03-13 17:26 ` Felix Gruber
` (2 more replies)
0 siblings, 3 replies; 25+ messages in thread
From: Ludovic Courtès @ 2020-03-13 9:42 UTC (permalink / raw)
To: Felix Gruber; +Cc: 39862
Hi Felix,
Felix Gruber <felgru@posteo.net> skribis:
> * gnu/packages/maths.scm (dune-*-openmpi): New variables.
> * gnu/packages/maths.scm (add-openmpi-to-dune-package): New function to
> add openmpi to the inputs of a dune-* package and replace all dune-*
> packages in its input with the corresponding dune-*-openmpi package.
Nitpick: no need to repeat the file name above. It would also be great
if you could list all the new variables.
> + (lambda (p) (not (dune-package? p))))))
You can replace the lambda with:
(negate dune-package?)
One last thing: could you look at the output of, say, ‘guix graph
dune-geometry-openmpi’ and ensure we’re not duplicating more nodes than
needed in the graph?
For example, you can compare node counts with:
guix graph dune-geometry | grep 'label =' | wc -l
guix graph dune-geometry-openmpi | grep 'label =' | wc -l
The difference should be less than:
guix graph openmpi | grep 'label =' | wc -l
If that works well, please send an updated patch and we should be ready
to go!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v3 2/2] gnu: define dune-*-openmpi packages
2020-03-13 9:42 ` Ludovic Courtès
@ 2020-03-13 17:26 ` Felix Gruber
2020-03-13 21:28 ` Ludovic Courtès
2020-03-13 17:30 ` [bug#39862] [PATCH v4 1/2] gnu: dune-*: remove openmpi dependency Felix Gruber
2020-03-13 17:30 ` [bug#39862] [PATCH v4 2/2] gnu: define dune-*-openmpi packages Felix Gruber
2 siblings, 1 reply; 25+ messages in thread
From: Felix Gruber @ 2020-03-13 17:26 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 39862
Hi Ludo’,
On 3/13/20 10:42 AM, Ludovic Courtès wrote:
> Felix Gruber <felgru@posteo.net> skribis:
>
>> * gnu/packages/maths.scm (dune-*-openmpi): New variables.
>> * gnu/packages/maths.scm (add-openmpi-to-dune-package): New function to
>> add openmpi to the inputs of a dune-* package and replace all dune-*
>> packages in its input with the corresponding dune-*-openmpi package.
>
> Nitpick: no need to repeat the file name above. It would also be great
> if you could list all the new variables.
Sure, no problem.
>> + (lambda (p) (not (dune-package? p))))))
>
> You can replace the lambda with:
>
> (negate dune-package?)
Thanks for this hint, as I'm new to Scheme, my knowledge of its standard
library is still pretty limited. The negate function is quite useful.
> One last thing: could you look at the output of, say, ‘guix graph
> dune-geometry-openmpi’ and ensure we’re not duplicating more nodes than
> needed in the graph?
>
> For example, you can compare node counts with:
>
> guix graph dune-geometry | grep 'label =' | wc -l
> guix graph dune-geometry-openmpi | grep 'label =' | wc -l
>
> The difference should be less than:
>
> guix graph openmpi | grep 'label =' | wc -l
>
> If that works well, please send an updated patch and we should be ready
> to go!
I get the following numbers:
graph dune-geometry | grep 'label =' | wc -l
70
guix graph dune-geometry-openmpi | grep 'label =' | wc -l
143
guix graph openmpi | grep 'label =' | wc -l
137
The difference seems to be OK: 143 - 70 = 73 < 137.
I'll send the updated patch ASAP.
Best Regards,
Felix
^ permalink raw reply [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v4 1/2] gnu: dune-*: remove openmpi dependency
2020-03-13 9:42 ` Ludovic Courtès
2020-03-13 17:26 ` Felix Gruber
@ 2020-03-13 17:30 ` Felix Gruber
2020-03-14 16:55 ` bug#39862: " Ludovic Courtès
2020-03-13 17:30 ` [bug#39862] [PATCH v4 2/2] gnu: define dune-*-openmpi packages Felix Gruber
2 siblings, 1 reply; 25+ messages in thread
From: Felix Gruber @ 2020-03-13 17:30 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, Ludovic Courtès
* gnu/packages/maths.scm (dune-*)[inputs]: Remove openmpi dependency.
[arguments]: remove code to setup openmpi for tests.
---
gnu/packages/maths.scm | 37 +++++++------------------------------
1 file changed, 7 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2c03c00366..33a5efd2f0 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4582,13 +4582,10 @@ linear algebra primitives specifically targeting graph analytics.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("gmp" ,gmp)
("metis" ,metis)
- ("openmpi" ,openmpi)
("openblas" ,openblas)
("python" ,python)
("superlu" ,superlu)))
@@ -4626,7 +4623,6 @@ Differences} (FD).")
(apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)
;; Optional
("openblas" ,openblas)
("gmp" ,gmp)
@@ -4666,8 +4662,7 @@ This package contains the basic DUNE geometry classes.")
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "build_tests" make-flags))))))
(inputs
- `(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)))
+ `(("dune-common" ,dune-common)))
(native-inputs
`(("gfortran" ,gfortran)
("pkg-config" ,pkg-config)))
@@ -4700,16 +4695,13 @@ This package contains the DUNE UG grid classes.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
("gmp" ,gmp)
("metis" ,metis)
("openblas" ,openblas)
- ("openmpi" ,openmpi)
("python" ,python)))
(propagated-inputs
`(("dune-uggrid" ,dune-uggrid)))
@@ -4746,12 +4738,9 @@ This package contains the basic DUNE grid classes.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("suitesparse" ,suitesparse)
@@ -4799,7 +4788,6 @@ aggregation-based algebraic multigrid.")
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("superlu" ,superlu)
@@ -4847,14 +4835,11 @@ assemble global function spaces on finite-element grids.")
(lambda* (#:key inputs make-flags #:allow-other-keys)
(setenv "CPLUS_INCLUDE_PATH"
(string-append (assoc-ref inputs "dune-grid") "/share"))
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
("dune-grid" ,dune-grid)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("openblas" ,openblas)
@@ -4892,14 +4877,11 @@ cubes.")
(modify-phases %standard-phases
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-geometry" ,dune-geometry)
("dune-grid" ,dune-grid)
- ("openmpi" ,openmpi)
;; Optional
("metis" ,metis)
("openblas" ,openblas)
@@ -4938,7 +4920,6 @@ provides the full grid interface including adaptive mesh refinement.")
(apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
- ("openmpi" ,openmpi)
;; Optional
("openblas" ,openblas)
("python" ,python)
@@ -4981,9 +4962,7 @@ operating on statically typed trees of objects.")
#t))
(add-after 'build 'build-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "build_tests" make-flags)))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
+ (apply invoke "make" "build_tests" make-flags))))))
(inputs
`(("dune-common" ,dune-common)
("dune-istl" ,dune-istl)
@@ -4991,7 +4970,6 @@ operating on statically typed trees of objects.")
("dune-grid" ,dune-grid)
("dune-geometry" ,dune-geometry)
("dune-typetree" ,dune-typetree)
- ("openmpi" ,openmpi)
("openblas" ,openblas)
("metis" ,metis)
("python" ,python)
@@ -5032,7 +5010,6 @@ implemented as callable objects, and bases of finite element spaces.")
("dune-grid" ,dune-grid)
("dune-typetree" ,dune-typetree)
("dune-functions" ,dune-functions)
- ("openmpi" ,openmpi)
;; Optional
("openblas" ,openblas)
("eigen" ,eigen)
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v4 2/2] gnu: define dune-*-openmpi packages
2020-03-13 9:42 ` Ludovic Courtès
2020-03-13 17:26 ` Felix Gruber
2020-03-13 17:30 ` [bug#39862] [PATCH v4 1/2] gnu: dune-*: remove openmpi dependency Felix Gruber
@ 2020-03-13 17:30 ` Felix Gruber
2 siblings, 0 replies; 25+ messages in thread
From: Felix Gruber @ 2020-03-13 17:30 UTC (permalink / raw)
To: 39862; +Cc: Felix Gruber, Ludovic Courtès
* gnu/packages/maths.scm (dune-common-openmpi, dune-geometry-openmpi,
dune-istl-openmpi, dune-typetree-openmpi, dune-uggrid-openmpi,
dune-grid-openmpi, dune-alugrid-openmpi, dune-subgrid-openmpi,
dune-localfunctions-openmpi, dune-functions-openmpi,
dune-pdelab-openmpi): New variables.
(add-openmpi-to-dune-package): New function to add openmpi to the
inputs of a dune-* package and replace all dune-* packages in its
input with the corresponding dune-*-openmpi package.
---
gnu/packages/maths.scm | 53 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 33a5efd2f0..6c2813f100 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5027,6 +5027,59 @@ built on top of DUNE, the Distributed and Unified Numerics Environment.")
;; Either GPL version 2 with "runtime exception" or LGPLv3+.
(license (list license:lgpl3+ license:gpl2))))
+(define add-openmpi-to-dune-package
+ (let ((dune-package?
+ (lambda (p) (string-prefix? "dune-" (package-name p)))))
+ (package-mapping
+ (lambda (p)
+ (if (dune-package? p)
+ (package (inherit p)
+ (name (string-append (package-name p) "-openmpi"))
+ (inputs `(,@(package-inputs p)
+ ("openmpi" ,openmpi)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments p)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup)))))
+ (synopsis (string-append (package-synopsis p) " (with MPI support)")))
+ p))
+ (negate dune-package?))))
+
+(define-public dune-common-openmpi
+ (add-openmpi-to-dune-package dune-common))
+
+(define-public dune-geometry-openmpi
+ (add-openmpi-to-dune-package dune-geometry))
+
+(define-public dune-istl-openmpi
+ (add-openmpi-to-dune-package dune-istl))
+
+(define-public dune-typetree-openmpi
+ (add-openmpi-to-dune-package dune-typetree))
+
+(define-public dune-uggrid-openmpi
+ (add-openmpi-to-dune-package dune-uggrid))
+
+(define-public dune-grid-openmpi
+ (add-openmpi-to-dune-package dune-grid))
+
+(define-public dune-alugrid-openmpi
+ (add-openmpi-to-dune-package dune-alugrid))
+
+(define-public dune-subgrid-openmpi
+ (add-openmpi-to-dune-package dune-subgrid))
+
+(define-public dune-localfunctions-openmpi
+ (add-openmpi-to-dune-package dune-localfunctions))
+
+(define-public dune-functions-openmpi
+ (add-openmpi-to-dune-package dune-functions))
+
+(define-public dune-pdelab-openmpi
+ (add-openmpi-to-dune-package dune-pdelab))
+
(define-public mlucas
(package
(name "mlucas")
--
2.25.1
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [bug#39862] [PATCH v3 2/2] gnu: define dune-*-openmpi packages
2020-03-13 17:26 ` Felix Gruber
@ 2020-03-13 21:28 ` Ludovic Courtès
0 siblings, 0 replies; 25+ messages in thread
From: Ludovic Courtès @ 2020-03-13 21:28 UTC (permalink / raw)
To: Felix Gruber; +Cc: 39862
Hi,
Felix Gruber <felgru@posteo.net> skribis:
>>> + (lambda (p) (not (dune-package? p))))))
>>
>> You can replace the lambda with:
>>
>> (negate dune-package?)
>
> Thanks for this hint, as I'm new to Scheme, my knowledge of its standard
> library is still pretty limited.
Sure, I think sharing knowledge is one of the goals of review.
>> One last thing: could you look at the output of, say, ‘guix graph
>> dune-geometry-openmpi’ and ensure we’re not duplicating more nodes than
>> needed in the graph?
>>
>> For example, you can compare node counts with:
>>
>> guix graph dune-geometry | grep 'label =' | wc -l
>> guix graph dune-geometry-openmpi | grep 'label =' | wc -l
>>
>> The difference should be less than:
>>
>> guix graph openmpi | grep 'label =' | wc -l
>>
>> If that works well, please send an updated patch and we should be ready
>> to go!
>
> I get the following numbers:
>
> graph dune-geometry | grep 'label =' | wc -l
> 70
>
> guix graph dune-geometry-openmpi | grep 'label =' | wc -l
> 143
>
> guix graph openmpi | grep 'label =' | wc -l
> 137
>
> The difference seems to be OK: 143 - 70 = 73 < 137.
Looks good, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 25+ messages in thread
* bug#39862: [PATCH v4 1/2] gnu: dune-*: remove openmpi dependency
2020-03-13 17:30 ` [bug#39862] [PATCH v4 1/2] gnu: dune-*: remove openmpi dependency Felix Gruber
@ 2020-03-14 16:55 ` Ludovic Courtès
0 siblings, 0 replies; 25+ messages in thread
From: Ludovic Courtès @ 2020-03-14 16:55 UTC (permalink / raw)
To: Felix Gruber; +Cc: 39862-done
Hi,
Felix Gruber <felgru@posteo.net> skribis:
> * gnu/packages/maths.scm (dune-*)[inputs]: Remove openmpi dependency.
> [arguments]: remove code to setup openmpi for tests.
[...]
> * gnu/packages/maths.scm (dune-common-openmpi, dune-geometry-openmpi,
> dune-istl-openmpi, dune-typetree-openmpi, dune-uggrid-openmpi,
> dune-grid-openmpi, dune-alugrid-openmpi, dune-subgrid-openmpi,
> dune-localfunctions-openmpi, dune-functions-openmpi,
> dune-pdelab-openmpi): New variables.
> (add-openmpi-to-dune-package): New function to add openmpi to the
> inputs of a dune-* package and replace all dune-* packages in its
> input with the corresponding dune-*-openmpi package.
Pushed, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2020-03-14 16:56 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-01 19:49 [bug#39862] [PATCH 0/4] update Dune finite element packages Felix Gruber
2020-03-01 20:23 ` [bug#39862] [PATCH 1/4] gnu: dune-*: set up MPI for tests Felix Gruber
2020-03-01 20:24 ` [bug#39862] [PATCH 2/4] gnu: add dune-uggrid 2.6.0 Felix Gruber
2020-03-01 20:25 ` [bug#39862] [PATCH 3/4] gnu: Add dune-subgrid Felix Gruber
2020-03-01 20:25 ` [bug#39862] [PATCH 4/4] gnu: dune-istl: Build with suitesparse Felix Gruber
2020-03-02 14:53 ` [bug#39862] [PATCH 0/4] update Dune finite element packages zimoun
2020-03-02 21:56 ` Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 0/6] Update " Felix Gruber
2020-03-12 10:46 ` Ludovic Courtès
2020-03-10 19:29 ` [bug#39862] [PATCH v2 1/6] gnu: dune-*: set up MPI for tests Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 2/6] gnu: add dune-uggrid 2.6.0 Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 3/6] gnu: Add dune-subgrid Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 4/6] gnu: dune-istl: Build with suitesparse Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 5/6] gnu: dune-*: remove openmpi dependency Felix Gruber
2020-03-10 19:29 ` [bug#39862] [PATCH v2 6/6] gnu: define dune-*-openmpi packages Felix Gruber
2020-03-12 12:42 ` Ludovic Courtès
2020-03-12 21:05 ` [bug#39862] [PATCH v3 0/2] Add " Felix Gruber
2020-03-12 21:05 ` [bug#39862] [PATCH v3 1/2] gnu: dune-*: remove openmpi dependency Felix Gruber
2020-03-12 21:05 ` [bug#39862] [PATCH v3 2/2] gnu: define dune-*-openmpi packages Felix Gruber
2020-03-13 9:42 ` Ludovic Courtès
2020-03-13 17:26 ` Felix Gruber
2020-03-13 21:28 ` Ludovic Courtès
2020-03-13 17:30 ` [bug#39862] [PATCH v4 1/2] gnu: dune-*: remove openmpi dependency Felix Gruber
2020-03-14 16:55 ` bug#39862: " Ludovic Courtès
2020-03-13 17:30 ` [bug#39862] [PATCH v4 2/2] gnu: define dune-*-openmpi packages Felix Gruber
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).