unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Felix Gruber <felgru@posteo.net>
To: 39862@debbugs.gnu.org
Cc: "Felix Gruber" <felgru@posteo.net>, "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#39862] [PATCH v4 2/2] gnu: define dune-*-openmpi packages
Date: Fri, 13 Mar 2020 18:30:38 +0100	[thread overview]
Message-ID: <20200313173038.4175-2-felgru@posteo.net> (raw)
In-Reply-To: <87blp0pp4d.fsf@gnu.org>

* 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

      parent reply	other threads:[~2020-03-13 17:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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             ` Felix Gruber [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20200313173038.4175-2-felgru@posteo.net \
    --to=felgru@posteo.net \
    --cc=39862@debbugs.gnu.org \
    --cc=ludo@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 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).