Subject: [PATCH v4 1/2] gnu: dune-*: remove openmpi dependency

From: Felix Gruber <[email-masked]>
Date: Fri, 13 Mar 2020 18:30:37 +0100

* 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