guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: mumps: Remove input labels.


From: guix-commits
Subject: 02/03: gnu: mumps: Remove input labels.
Date: Tue, 15 Feb 2022 11:24:42 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit ee92b0fb7dfd8b55ea63254a59a1605fb870a44c
Author: Ludovic Court├Ęs <ludo@gnu.org>
AuthorDate: Tue Feb 15 16:52:32 2022 +0100

    gnu: mumps: Remove input labels.
    
    * gnu/packages/maths.scm (mumps)[inputs]: Remove labels.
    [arguments]: Adjust 'configure' phase to not rely on the "mpi" and
    "blas" labels.
    (mumps-metis, mumps-openmpi, mumps-metis-openmpi): Use 'modify-inputs'.
---
 gnu/packages/maths.scm | 41 ++++++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 677236e42d..04b7b00972 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3532,12 +3532,12 @@ language understood by many solvers.")
                                 "mumps-shared-pord.patch"))))
     (build-system gnu-build-system)
     (inputs
-     `(("fortran" ,gfortran)
-       ;; These are required for linking against mumps, but we let the user
-       ;; declare the dependency.
-       ("blas" ,openblas)
-       ("metis" ,metis)
-       ("scotch" ,scotch)))
+     (list gfortran
+           ;; These are required for linking against mumps, but we let the user
+           ;; declare the dependency.
+           openblas
+           metis
+           scotch))
     (arguments
      `(#:modules ((ice-9 match)
                   (ice-9 popen)
@@ -3594,8 +3594,9 @@ ORDERINGSC   = $(ORDERINGSF)
 LORDERINGS   = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ)
 IORDERINGSF  = $(ISCOTCH)
 IORDERINGSC  = $(IPORD) $(IMETIS) $(ISCOTCH)"
-                        (assoc-ref inputs "mpi")
-                        (assoc-ref inputs "blas")
+                        (->bool (which "mpicc"))  ;MPI support enabled?
+                        (dirname
+                         (dirname (search-input-file inputs 
"/include/cblas.h")))
                         (assoc-ref inputs "scalapack")
                         (assoc-ref inputs "metis")
                         (match (list (assoc-ref inputs "pt-scotch")
@@ -3656,19 +3657,20 @@ sparse system of linear equations A x = b using 
Gaussian elimination.")
     (license license:cecill-c)))
 
 (define-public mumps-metis
-  (package (inherit mumps)
+  (package
+    (inherit mumps)
     (name "mumps-metis")
-    (inputs
-     (alist-delete "scotch" (package-inputs mumps)))))
+    (inputs (modify-inputs (package-inputs mumps)
+              (delete "scotch")))))
 
 (define-public mumps-openmpi
-  (package (inherit mumps)
+  (package
+    (inherit mumps)
     (name "mumps-openmpi")
     (inputs
-     `(("mpi" ,openmpi)
-       ("scalapack" ,scalapack)
-       ("pt-scotch" ,pt-scotch)
-       ,@(alist-delete "scotch" (package-inputs mumps))))
+     (modify-inputs (package-inputs mumps)
+       (delete "scotch")
+       (prepend openmpi scalapack pt-scotch)))
     (arguments
      (substitute-keyword-arguments (package-arguments mumps)
        ((#:phases phases)
@@ -3682,10 +3684,11 @@ sparse system of linear equations A x = b using 
Gaussian elimination.")
     (synopsis "Multifrontal sparse direct solver (with MPI)")))
 
 (define-public mumps-metis-openmpi
-  (package (inherit mumps-openmpi)
+  (package
+    (inherit mumps-openmpi)
     (name "mumps-metis-openmpi")
-    (inputs
-     (alist-delete "pt-scotch" (package-inputs mumps-openmpi)))))
+    (inputs (modify-inputs (package-inputs mumps-openmpi)
+              (delete "pt-scotch")))))
 
 (define-public ruby-asciimath
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]