all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#56831] [PATCH] gnu: mumps: Update to 5.5.1
@ 2022-07-29 15:44 FELŠÖCI Marek
  2022-08-04 10:17 ` Ludovic Courtès
  2022-08-04 17:08 ` [bug#56831] [PATCH v2] " FELŠÖCI Marek
  0 siblings, 2 replies; 4+ messages in thread
From: FELŠÖCI Marek @ 2022-07-29 15:44 UTC (permalink / raw)
  To: 56831

---
 gnu/packages/maths.scm | 227 +++++++++++++++++++++++------------------
 1 file changed, 125 insertions(+), 102 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6a84f47468..983e8bf87a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -52,6 +52,7 @@
 ;;; Copyright © 2021 Pierre-Antoine Bouttier <pierre-antoine.bouttier@univ-grenoble-alpes.fr>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 ;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2022 Marek Felšöci <marek@felsoci.sk>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3681,19 +3682,15 @@ language understood by many solvers.")
 (define-public mumps
   (package
     (name "mumps")
-    (version "5.2.1")
+    (version "5.5.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "http://mumps.enseeiht.fr/MUMPS_"
-                           version ".tar.gz"))
+       (uri
+        (string-append "http://mumps.enseeiht.fr/MUMPS_" version ".tar.gz"))
        (sha256
         (base32
-         "0jklh54x4y3ik1zkw6db7766kakjm5910diyaghfxxf8vwsgr26r"))
-       (patches (search-patches "mumps-build-parallelism.patch"
-                                "mumps-shared-libseq.patch"
-                                "mumps-shared-mumps.patch"
-                                "mumps-shared-pord.patch"))))
+         "05gs2i8b76m9flm1826fxpyfnwibjjawbmfza3ylrvj7zaag5gqs"))))
     (build-system gnu-build-system)
     (inputs
      (list gfortran
@@ -3703,105 +3700,131 @@ language understood by many solvers.")
            metis
            scotch))
     (arguments
-     `(#:modules ((ice-9 match)
-                  (ice-9 popen)
-                  (srfi srfi-1)
-                  ,@%gnu-build-system-modules)
+     `(#:modules
+       ((ice-9 match)
+        (ice-9 popen)
+        (srfi srfi-1)
+        ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
-          (lambda* (#:key inputs #:allow-other-keys)
-            (call-with-output-file "Makefile.inc"
-              (lambda (port)
-                (format port "
-PLAT         =
-LIBEXT       = .a
-OUTC         = -o
-OUTF         = -o
-RM           = rm -f~:[
-CC           = gcc
-FC           = gfortran
-FL           = gfortran
-INCSEQ       = -I$(topdir)/libseq
-LIBSEQ       = $(topdir)/libseq/libmpiseq.a
-LIBSEQNEEDED = libseqneeded~;
-CC           = mpicc
-FC           = mpifort
-FL           = mpifort~]
-AR           = ar vr # rules require trailing space, ugh...
-RANLIB       = ranlib
-BLASDIR      = ~a
-LIBBLAS      = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -lopenblas~@[
-SCALAPDIR    = ~a
-SCALAP       = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~]
-LIBOTHERS    = -pthread
-CDEFS        = -DAdd_
-PIC          = -fPIC
-OPTF         = -O2 -DALLOW_NON_INIT -fallow-argument-mismatch $(PIC)
-OPTL         = -O2 $(PIC)
-OPTC         = -O2 $(PIC)
-INCS         = $(INCSEQ)
-LIBS         = $(SCALAP) $(LIBSEQ)
-LPORDDIR     = $(topdir)/PORD/lib
-IPORD        = -I$(topdir)/PORD/include
-LPORD        = $(LPORDDIR)/libpord.a
-ORDERINGSF   = -Dpord~@[
-METISDIR     = ~a
-IMETIS       = -I$(METISDIR)/include
-LMETIS       = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis
-ORDERINGSF  += -Dmetis~]~@[~:{
-SCOTCHDIR    = ~a
-ISCOTCH      = -I$(SCOTCHDIR)/include
-LSCOTCH      = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
-ORDERINGSF  += ~a~}~]
-ORDERINGSC   = $(ORDERINGSF)
-LORDERINGS   = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ)
-IORDERINGSF  = $(ISCOTCH)
-IORDERINGSC  = $(IPORD) $(IMETIS) $(ISCOTCH)"
-                        (->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")
-                                     (assoc-ref inputs "scotch"))
-                          ((#f #f)
-                           #f)
-                          ((#f scotch)
-                           `((,scotch "" "-Dscotch")))
-                          ((ptscotch _)
-                           `((,ptscotch
-                              "-lesmumps -lptscotch -lptscotcherr "
-                              "-Dptscotch")))))))))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (call-with-output-file "Makefile.inc"
+               (lambda (port)
+                 (format port "
+PLAT          =
+LIBEXT        = .a
+LIBEXT_SHARED = .so
+OUTC          = -o
+OUTF          = -o
+BLASDIR       = ~a
+LIBBLAS       = -Wl,-rpath=$(BLASDIR)/lib -Wl,-rpath='$$ORIGIN'
+LIBBLAS      += -L$(BLASDIR)/lib~:[
+LIBBLAS      += -lopenblas
+OPTF          = ~;
+LIBBLAS      += -L${BLASDIR}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64
+LIBBLAS      += -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl
+OPTF          = -DGEMMT_AVAILABLE~]~@[
+SCALAPDIR     = ~a
+SCALAP        = -Wl,-rpath=$(SCALAPDIR)/lib -Wl,-rpath='$$ORIGIN'
+SCALAP       += -L$(SCALAPDIR)/lib -lscalapack~]
+RM            = rm -f~:[
+CC            = gcc
+FC            = gfortran
+FL            = gfortran
+INCSEQ        = -I$(topdir)/libseq
+LIBSEQ        = $(LAPACK) -L$(topdir)/libseq -lmpiseq
+LIBSEQNEEDED  = libseqneeded
+INCS          = $(INCSEQ)
+LIBS          = $(LIBSEQ)~;
+CC            = mpicc
+FC            = mpifort
+FL            = mpifort
+INCPAR        =
+LIBPAR        = $(SCALAP) $(LAPACK)
+LIBSEQNEEDED  = 
+INCS          = $(INCPAR)
+LIBS          = $(LIBPAR)~]
+AR            = ar vr # rules require trailing space, ugh...
+RANLIB        = ranlib
+LIBOTHERS     = -pthread
+CDEFS         = -DAdd_
+PIC           = -fPIC
+FPIC_OPT      = $(PIC)
+RPATH_OPT     = -Wl,-rpath,~a/lib
+OPTF         += -O2 -fopenmp -DMUMPS_USE_BLAS2 -DALLOW_NON_INIT -DBLR_MT
+OPTF         += -fallow-argument-mismatch $(PIC)
+OPTL          = -O2 -fopenmp $(PIC)
+OPTC          = -O2 -fopenmp $(PIC)
+LPORDDIR      = $(topdir)/PORD/lib
+IPORD         = -I$(topdir)/PORD/include
+LPORD         = $(LPORDDIR)/libpord.a
+ORDERINGSF    = -Dpord~@[
+METISDIR      = ~a
+IMETIS        = -I$(METISDIR)/include
+LMETIS        = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis
+ORDERINGSF   += -Dmetis~]~@[~:{
+SCOTCHDIR     = ~a
+ISCOTCH       = -I$(SCOTCHDIR)/include
+LSCOTCH       = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a -lesmumps
+LSCOTCH      += -lscotch -lscotcherr
+ORDERINGSF   += ~a~}~]
+ORDERINGSC    = $(ORDERINGSF)
+LORDERINGS    = $(LPORD) $(LMETIS) $(LSCOTCH)
+IORDERINGSF   = $(ISCOTCH)
+IORDERINGSC   = $(IPORD) $(IMETIS) $(ISCOTCH)"
+                         (assoc-ref inputs "openblas")
+                         (->bool ;; OpenBLAS or MKL?
+                          (file-exists?
+                           (string-append
+                            (assoc-ref inputs "openblas")
+                            "/include/mkl_cblas.h")))
+                         (assoc-ref inputs "scalapack")
+                         (->bool (which "mpicc"))  ;; MPI support enabled?
+                         (assoc-ref outputs "out")
+                         (assoc-ref inputs "metis")
+                         (match (list (assoc-ref inputs "pt-scotch")
+                                      (assoc-ref inputs "scotch"))
+                                ((#f #f)
+                                 #f)
+                                ((#f scotch)
+                                 `((,scotch "" "-Dscotch")))
+                                ((ptscotch _)
+                                 `((,ptscotch
+                                    "-lesmumps -lptscotch -lptscotcherr "
+                                    "-Dptscotch")))))))))
          (replace 'build
-          ;; By default only the d-precision library is built.  Make with "all"
-          ;; target so that all precision libraries and examples are built.
-          (lambda _
-            (invoke "make" "all"
-                    (format #f "-j~a" (parallel-job-count)))))
+           ;; By default only the d-precision library is built. Make with "all"
+           ;; target so that all precision libraries and examples are built.
+           ;; Then, "make allshared" builts equivalent shared libraries as well.
+           (lambda _
+             (invoke "make" "all"
+                     (format #f "-j~a" (parallel-job-count)))
+             (invoke "make" "allshared"
+                     (format #f "-j~a" (parallel-job-count)))))
          (replace 'check
-          ;; Run the simple test drivers, which read test input from stdin:
-          ;; from the "real" input for the single- and double-precision
-          ;; testers, and from the "cmplx" input for complex-precision
-          ;; testers.  The EXEC-PREFIX key is used by the mumps-openmpi
-          ;; package to prefix execution with "mpirun".
-          (lambda* (#:key (exec-prefix '()) #:allow-other-keys)
-            (with-directory-excursion "examples"
-              (every
-               (lambda (prec type)
-                 (let ((tester (apply open-pipe*
-                                      `(,OPEN_WRITE
-                                        ,@exec-prefix
-                                        ,(string-append "./" prec
-                                                        "simpletest"))))
-                       (input  (open-input-file
-                                (string-append "input_simpletest_" type))))
-                   (begin
-                     (dump-port input tester)
-                     (close-port input)
-                     (zero? (close-pipe tester)))))
-               '("s" "d" "c" "z")
-               '("real" "real" "cmplx" "cmplx")))))
+           ;; Run the simple test drivers, which read test input from stdin:
+           ;; from the "real" input for the single- and double-precision
+           ;; testers, and from the "cmplx" input for complex-precision
+           ;; testers.  The EXEC-PREFIX key is used by the mumps-openmpi
+           ;; package to prefix execution with "mpirun".
+           (lambda* (#:key (exec-prefix '()) #:allow-other-keys)
+             (with-directory-excursion "examples"
+               (every
+                (lambda (prec type)
+                  (let ((tester (apply open-pipe*
+                                       `(,OPEN_WRITE
+                                         ,@exec-prefix
+                                         ,(string-append "./" prec
+                                                         "simpletest"))))
+                        (input  (open-input-file
+                                 (string-append "input_simpletest_" type))))
+                    (begin
+                      (dump-port input tester)
+                      (close-port input)
+                      (zero? (close-pipe tester)))))
+                '("s" "d" "c" "z")
+                '("real" "real" "cmplx" "cmplx")))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-- 
2.20.1





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#56831] [PATCH] gnu: mumps: Update to 5.5.1
  2022-07-29 15:44 [bug#56831] [PATCH] gnu: mumps: Update to 5.5.1 FELŠÖCI Marek
@ 2022-08-04 10:17 ` Ludovic Courtès
  2022-08-04 17:08 ` [bug#56831] [PATCH v2] " FELŠÖCI Marek
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2022-08-04 10:17 UTC (permalink / raw)
  To: FELŠÖCI Marek; +Cc: 56831

Hi Marek,

FELŠÖCI Marek <marek@felsoci.sk> skribis:

> -       (patches (search-patches "mumps-build-parallelism.patch"
> -                                "mumps-shared-libseq.patch"
> -                                "mumps-shared-mumps.patch"
> -                                "mumps-shared-pord.patch"))))

Good to see them go.  :-)

Could you please also remove the files and remove them from
‘gnu/local.mk’?

> -     `(#:modules ((ice-9 match)
> -                  (ice-9 popen)
> -                  (srfi srfi-1)
> -                  ,@%gnu-build-system-modules)
> +     `(#:modules
> +       ((ice-9 match)
> +        (ice-9 popen)
> +        (srfi srfi-1)
> +        ,@%gnu-build-system-modules)

This is unnecessary; if you could avoid it, that’d be great: it’d make
the important changes more visible.

>         #:phases
>         (modify-phases %standard-phases
>           (replace 'configure
> -          (lambda* (#:key inputs #:allow-other-keys)
> -            (call-with-output-file "Makefile.inc"
> -              (lambda (port)

Looks like this hunk is mostly reformatting as well?

> +                         (assoc-ref inputs "openblas")
> +                         (->bool ;; OpenBLAS or MKL?
> +                          (file-exists?
> +                           (string-append
> +                            (assoc-ref inputs "openblas")
> +                            "/include/mkl_cblas.h")))

I understand the intent and that’s fine, but I would prefer a solution
that does not explicitly refer to MKL.  Perhaps we could devise a
solution that, more generally, allows users to swap one BLAS for
another, but maybe that’s beyond the scope of this patch.

Could you send a v2 of the patch that addresses these comments?

Bonus points if you can provide a commit log that follows the ChangeLog
style:

  https://guix.gnu.org/manual/devel/en/html_node/Submitting-Patches.html

:-)

Thank you,
Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#56831] [PATCH v2] gnu: mumps: Update to 5.5.1
  2022-07-29 15:44 [bug#56831] [PATCH] gnu: mumps: Update to 5.5.1 FELŠÖCI Marek
  2022-08-04 10:17 ` Ludovic Courtès
@ 2022-08-04 17:08 ` FELŠÖCI Marek
  2022-08-05 13:30   ` bug#56831: [PATCH] " Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: FELŠÖCI Marek @ 2022-08-04 17:08 UTC (permalink / raw)
  To: 56831

* gnu/packages/maths.scm (mumps): Update to 5.5.1. Stop applying patches as the build configuration has been updated upstream. Allow for further optimized BLR compression by specifying the -DBLR_MT build option.
* gnu/packages/patches/mumps-build-parallelism.patch: File removed.
* gnu/packages/patches/mumps-shared-libseq.patch: File removed.
* gnu/packages/patches/mumps-shared-mumps.patch: File removed.
* gnu/packages/patches/mumps-shared-pord.patch: File removed.
---
 gnu/local.mk                                  |   4 -
 gnu/packages/maths.scm                        | 131 ++++++++++--------
 .../patches/mumps-build-parallelism.patch     |  13 --
 .../patches/mumps-shared-libseq.patch         |  42 ------
 gnu/packages/patches/mumps-shared-mumps.patch |  63 ---------
 gnu/packages/patches/mumps-shared-pord.patch  |  77 ----------
 6 files changed, 72 insertions(+), 258 deletions(-)
 delete mode 100644 gnu/packages/patches/mumps-build-parallelism.patch
 delete mode 100644 gnu/packages/patches/mumps-shared-libseq.patch
 delete mode 100644 gnu/packages/patches/mumps-shared-mumps.patch
 delete mode 100644 gnu/packages/patches/mumps-shared-pord.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 0e8b7b0447..88100416d5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1525,10 +1525,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/mosaicatcher-unbundle-htslib.patch	\
   %D%/packages/patches/mrrescue-support-love-11.patch		\
   %D%/packages/patches/mtools-mformat-uninitialized.patch	\
-  %D%/packages/patches/mumps-build-parallelism.patch		\
-  %D%/packages/patches/mumps-shared-libseq.patch		\
-  %D%/packages/patches/mumps-shared-mumps.patch			\
-  %D%/packages/patches/mumps-shared-pord.patch			\
   %D%/packages/patches/mupen64plus-ui-console-notice.patch	\
   %D%/packages/patches/mupen64plus-video-z64-glew-correct-path.patch    \
   %D%/packages/patches/musl-cross-locale.patch			\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 789de8f500..27103d876f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -53,6 +53,7 @@
 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 ;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
+;;; Copyright © 2022 Marek Felšöci <marek@felsoci.sk>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3735,7 +3736,7 @@ language understood by many solvers.")
 (define-public mumps
   (package
     (name "mumps")
-    (version "5.2.1")
+    (version "5.5.1")
     (source
      (origin
        (method url-fetch)
@@ -3743,11 +3744,7 @@ language understood by many solvers.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "0jklh54x4y3ik1zkw6db7766kakjm5910diyaghfxxf8vwsgr26r"))
-       (patches (search-patches "mumps-build-parallelism.patch"
-                                "mumps-shared-libseq.patch"
-                                "mumps-shared-mumps.patch"
-                                "mumps-shared-pord.patch"))))
+         "05gs2i8b76m9flm1826fxpyfnwibjjawbmfza3ylrvj7zaag5gqs"))))
     (build-system gnu-build-system)
     (inputs
      (list gfortran
@@ -3764,58 +3761,71 @@ language understood by many solvers.")
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
-          (lambda* (#:key inputs #:allow-other-keys)
+          (lambda* (#:key inputs outputs #:allow-other-keys)
             (call-with-output-file "Makefile.inc"
               (lambda (port)
                 (format port "
-PLAT         =
-LIBEXT       = .a
-OUTC         = -o
-OUTF         = -o
-RM           = rm -f~:[
-CC           = gcc
-FC           = gfortran
-FL           = gfortran
-INCSEQ       = -I$(topdir)/libseq
-LIBSEQ       = $(topdir)/libseq/libmpiseq.a
-LIBSEQNEEDED = libseqneeded~;
-CC           = mpicc
-FC           = mpifort
-FL           = mpifort~]
-AR           = ar vr # rules require trailing space, ugh...
-RANLIB       = ranlib
-BLASDIR      = ~a
-LIBBLAS      = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -lopenblas~@[
-SCALAPDIR    = ~a
-SCALAP       = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~]
-LIBOTHERS    = -pthread
-CDEFS        = -DAdd_
-PIC          = -fPIC
-OPTF         = -O2 -DALLOW_NON_INIT -fallow-argument-mismatch $(PIC)
-OPTL         = -O2 $(PIC)
-OPTC         = -O2 $(PIC)
-INCS         = $(INCSEQ)
-LIBS         = $(SCALAP) $(LIBSEQ)
-LPORDDIR     = $(topdir)/PORD/lib
-IPORD        = -I$(topdir)/PORD/include
-LPORD        = $(LPORDDIR)/libpord.a
-ORDERINGSF   = -Dpord~@[
-METISDIR     = ~a
-IMETIS       = -I$(METISDIR)/include
-LMETIS       = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis
-ORDERINGSF  += -Dmetis~]~@[~:{
-SCOTCHDIR    = ~a
-ISCOTCH      = -I$(SCOTCHDIR)/include
-LSCOTCH      = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
-ORDERINGSF  += ~a~}~]
-ORDERINGSC   = $(ORDERINGSF)
-LORDERINGS   = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ)
-IORDERINGSF  = $(ISCOTCH)
-IORDERINGSC  = $(IPORD) $(IMETIS) $(ISCOTCH)"
-                        (->bool (which "mpicc"))  ;MPI support enabled?
-                        (dirname
-                         (dirname (search-input-file inputs "/include/cblas.h")))
+PLAT          =
+LIBEXT        = .a
+LIBEXT_SHARED = .so
+OUTC          = -o
+OUTF          = -o
+BLASDIR       = ~a
+LIBBLAS       = -Wl,-rpath=$(BLASDIR)/lib -Wl,-rpath='$$ORIGIN'
+LIBBLAS      += -L$(BLASDIR)/lib
+LIBBLAS      += -lopenblas~@[
+SCALAPDIR     = ~a
+SCALAP        = -Wl,-rpath=$(SCALAPDIR)/lib -Wl,-rpath='$$ORIGIN'
+SCALAP       += -L$(SCALAPDIR)/lib -lscalapack~]
+RM            = rm -f~:[
+CC            = gcc
+FC            = gfortran
+FL            = gfortran
+INCSEQ        = -I$(topdir)/libseq
+LIBSEQ        = $(LAPACK) -L$(topdir)/libseq -lmpiseq
+LIBSEQNEEDED  = libseqneeded
+INCS          = $(INCSEQ)
+LIBS          = $(LIBSEQ)~;
+CC            = mpicc
+FC            = mpifort
+FL            = mpifort
+INCPAR        =
+LIBPAR        = $(SCALAP) $(LAPACK)
+LIBSEQNEEDED  = 
+INCS          = $(INCPAR)
+LIBS          = $(LIBPAR)~]
+AR            = ar vr # rules require trailing space, ugh...
+RANLIB        = ranlib
+LIBOTHERS     = -pthread
+CDEFS         = -DAdd_
+PIC           = -fPIC
+FPIC_OPT      = $(PIC)
+RPATH_OPT     = -Wl,-rpath,~a/lib
+OPTF          = -O2 -fopenmp -DALLOW_NON_INIT -DBLR_MT
+OPTF         += -fallow-argument-mismatch $(PIC)
+OPTL          = -O2 -fopenmp $(PIC)
+OPTC          = -O2 -fopenmp $(PIC)
+LPORDDIR      = $(topdir)/PORD/lib
+IPORD         = -I$(topdir)/PORD/include
+LPORD         = $(LPORDDIR)/libpord.a
+ORDERINGSF    = -Dpord~@[
+METISDIR      = ~a
+IMETIS        = -I$(METISDIR)/include
+LMETIS        = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis
+ORDERINGSF   += -Dmetis~]~@[~:{
+SCOTCHDIR     = ~a
+ISCOTCH       = -I$(SCOTCHDIR)/include
+LSCOTCH       = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a -lesmumps
+LSCOTCH      += -lscotch -lscotcherr
+ORDERINGSF   += ~a~}~]
+ORDERINGSC    = $(ORDERINGSF)
+LORDERINGS    = $(LPORD) $(LMETIS) $(LSCOTCH)
+IORDERINGSF   = $(ISCOTCH)
+IORDERINGSC   = $(IPORD) $(IMETIS) $(ISCOTCH)"
+                        (assoc-ref inputs "openblas")
                         (assoc-ref inputs "scalapack")
+                        (->bool (which "mpicc"))  ;; MPI support enabled?
+                        (assoc-ref outputs "out")
                         (assoc-ref inputs "metis")
                         (match (list (assoc-ref inputs "pt-scotch")
                                      (assoc-ref inputs "scotch"))
@@ -3828,11 +3838,14 @@ IORDERINGSC  = $(IPORD) $(IMETIS) $(ISCOTCH)"
                               "-lesmumps -lptscotch -lptscotcherr "
                               "-Dptscotch")))))))))
          (replace 'build
-          ;; By default only the d-precision library is built.  Make with "all"
-          ;; target so that all precision libraries and examples are built.
-          (lambda _
-            (invoke "make" "all"
-                    (format #f "-j~a" (parallel-job-count)))))
+           ;; By default only the d-precision library is built. Make with "all"
+           ;; target so that all precision libraries and examples are built.
+           ;; Then, "make allshared" builts equivalent shared libraries as well.
+           (lambda _
+             (invoke "make" "all"
+                     (format #f "-j~a" (parallel-job-count)))
+             (invoke "make" "allshared"
+                     (format #f "-j~a" (parallel-job-count)))))
          (replace 'check
           ;; Run the simple test drivers, which read test input from stdin:
           ;; from the "real" input for the single- and double-precision
diff --git a/gnu/packages/patches/mumps-build-parallelism.patch b/gnu/packages/patches/mumps-build-parallelism.patch
deleted file mode 100644
index 26dd330311..0000000000
--- a/gnu/packages/patches/mumps-build-parallelism.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Building sublibraries in parallel can lead to race conditions on the libseq
-and lipord targets.
-
---- MUMPS_5.0.0/Makefile.orig	2015-06-15 10:08:54.523146562 -0500
-+++ MUMPS_5.0.0/Makefile	2015-06-15 10:19:44.074367512 -0500
-@@ -11,6 +11,7 @@
- 	sexamples dexamples cexamples zexamples \
- 	mumps_lib requiredobj libseqneeded clean
- 
-+.NOTPARALLEL:
- alllib:		c z s d
- all:		cexamples zexamples sexamples dexamples
- 
diff --git a/gnu/packages/patches/mumps-shared-libseq.patch b/gnu/packages/patches/mumps-shared-libseq.patch
deleted file mode 100644
index eccf528f7a..0000000000
--- a/gnu/packages/patches/mumps-shared-libseq.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Create a shared version of the sequential library, MUST BE LAST IN SERIES
-
-Index: mumps/libseq/Makefile
-===================================================================
---- mumps.orig/libseq/Makefile
-+++ mumps/libseq/Makefile
-@@ -8,15 +8,17 @@ all: libmpiseq
- 
- include ../Makefile.inc
- 
--libmpiseq: libmpiseq$(PLAT)$(LIBEXT)
-+libmpiseq: libmpiseq$(PLAT).a libmpiseq$(PLAT).so
- 
--libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
--	$(AR)$@ mpi.o mpic.o elapse.o
-+libmpiseq$(PLAT).a: mpi.o mpic.o elapse.o
-+	$(AR) $@ mpi.o mpic.o elapse.o
- 	$(RANLIB) $@
-+libmpiseq$(PLAT).so: mpi.o mpic.o elapse.o
-+	$(FC) -shared $^ -Wl,-soname,libmpiseq$(PLAT)-5.2.1.so -o libmpiseq$(PLAT)-5.2.1.so -Wl,-z,defs
- .f.o:
--	$(FC) $(OPTF)              -c $*.f $(OUTF)$*.o
-+	$(FC) $(OPTF)              -fPIC -c $*.f $(OUTF)$*.o
- .c.o:
--	$(CC) $(OPTC) $(CDEFS) -I. -c $*.c $(OUTC)$*.o
-+	$(CC) $(OPTC) $(CDEFS) -I. -fPIC -c $*.c $(OUTC)$*.o
- 
- clean:
--	$(RM) *.o *$(LIBEXT)
-+	$(RM) *.o *.a *.so
-Index: mumps/Makefile
-===================================================================
---- mumps.orig/Makefile
-+++ mumps/Makefile
-@@ -60,6 +60,7 @@ requiredobj: Makefile.inc $(LIBSEQNEEDED
- 
- libseqneeded:
- 	(cd libseq; $(MAKE))
-+	cp libseq/lib* $(libdir)
- 
- # Build the libpord.a library and copy it into $(topdir)/lib
- $(libdir)/libpord$(PLAT).a:
diff --git a/gnu/packages/patches/mumps-shared-mumps.patch b/gnu/packages/patches/mumps-shared-mumps.patch
deleted file mode 100644
index d94ccf6ce9..0000000000
--- a/gnu/packages/patches/mumps-shared-mumps.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Create a shared version of the MUMPS library.
-
-Index: mumps/src/Makefile
-===================================================================
---- mumps.orig/src/Makefile
-+++ mumps/src/Makefile
-@@ -23,8 +23,10 @@ z:
- 
- include $(topdir)/Makefile.inc
- 
--mumps_lib:    $(libdir)/libmumps_common$(PLAT)$(LIBEXT) \
--              $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT)
-+mumps_lib:    $(libdir)/libmumps_common$(PLAT).a \
-+              $(libdir)/libmumps_common$(PLAT).so \
-+              $(libdir)/lib$(ARITH)mumps$(PLAT).a \
-+              $(libdir)/lib$(ARITH)mumps$(PLAT).so
- 
- OBJS_COMMON_MOD = \
-         lr_common.o \
-@@ -167,14 +169,22 @@ OBJS_OTHER = \
-         $(ARITH)tools.o\
-         $(ARITH)type3_root.o
- 
--$(libdir)/libmumps_common$(PLAT)$(LIBEXT):      $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
--	$(AR)$@ $?
-+$(libdir)/libmumps_common$(PLAT).a:      $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
-+	$(AR) $@ $?
- 	$(RANLIB) $@
- 
--$(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT):    $(OBJS_MOD) $(OBJS_OTHER)
--	$(AR)$@ $?
-+$(libdir)/libmumps_common$(PLAT).so:      $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER)
-+	$(FC) -shared $^ -Wl,-soname,libmumps_common$(PLAT)-5.2.1.so -L$(libdir) $(LORDERINGS) -lpthread $(MPIFLIB) $(MPICLIB) $(LEXTRAS) -o $(libdir)/libmumps_common$(PLAT)-5.2.1.so -Wl,-z,defs
-+	ln -s libmumps_common$(PLAT)-5.2.1.so $@
-+
-+$(libdir)/lib$(ARITH)mumps$(PLAT).a:    $(OBJS_MOD) $(OBJS_OTHER)
-+	$(AR) $@ $?
- 	$(RANLIB) $@
- 
-+$(libdir)/lib$(ARITH)mumps$(PLAT).so:    $(OBJS_MOD) $(OBJS_OTHER)
-+	$(FC) -shared $^ -Wl,-soname,lib$(ARITH)mumps$(PLAT)-5.2.1.so -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(MPIFLIB) $(LEXTRAS) $(LIBBLAS) $(SCALAP) $(LAPACK) -o $(libdir)/lib$(ARITH)mumps$(PLAT)-5.2.1.so -Wl,-z,defs
-+	ln -s lib$(ARITH)mumps$(PLAT)-5.2.1.so $@
-+
- # Dependencies between modules:
- $(ARITH)mumps_load.o:		$(ARITH)mumps_comm_buffer.o \
- 				$(ARITH)mumps_struc_def.o \
-@@ -290,13 +300,13 @@ $(OBJS_OTHER):$(OBJS_COMMON_MOD) $(OBJS_
- 
- .SUFFIXES: .c .F .o
- .F.o:
--	$(FC) $(OPTF) $(INCS) $(IORDERINGSF) $(ORDERINGSF) -I. -I../include -c $*.F $(OUTF)$*.o
-+	$(FC) $(OPTF) $(INCS) $(IORDERINGSF) $(ORDERINGSF) -I. -I../include -fPIC -c $*.F $(OUTF)$*.o
- .c.o:
--	$(CC) $(OPTC) $(INCS) -I../include $(CDEFS) $(IORDERINGSC) $(ORDERINGSC) -c $*.c $(OUTC)$*.o
-+	$(CC) $(OPTC) $(INCS) -I../include $(CDEFS) $(IORDERINGSC) $(ORDERINGSC) -fPIC -c $*.c $(OUTC)$*.o
- 
- $(ARITH)mumps_c.o:	mumps_c.c
- 	$(CC) $(OPTC) $(INCS) $(CDEFS) -DMUMPS_ARITH=MUMPS_ARITH_$(ARITH) \
--	      $(IORDERINGSC) $(ORDERINGSC) -I../include -c mumps_c.c $(OUTC)$@
-+	      $(IORDERINGSC) $(ORDERINGSC) -I../include -fPIC -c mumps_c.c $(OUTC)$@
- 
- 
- clean:
diff --git a/gnu/packages/patches/mumps-shared-pord.patch b/gnu/packages/patches/mumps-shared-pord.patch
deleted file mode 100644
index d3915b0ad9..0000000000
--- a/gnu/packages/patches/mumps-shared-pord.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Create static and shared versions of the PORD library.
-
-Index: mumps/PORD/lib/Makefile
-===================================================================
---- mumps.orig/PORD/lib/Makefile
-+++ mumps/PORD/lib/Makefile
-@@ -9,7 +9,7 @@
- 
- INCLUDES = -I../include
- 
--COPTIONS = $(INCLUDES) $(CFLAGS) $(OPTFLAGS)
-+COPTIONS = $(INCLUDES) $(CFLAGS) $(OPTFLAGS) -fPIC
- 
- OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o \
-        multisector.o gelim.o bucket.o tree.o \
-@@ -24,12 +24,16 @@ OBJS = graph.o gbipart.o gbisect.o ddcre
- .c.o:
- 	$(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
- 
--libpord$(LIBEXT):$(OBJS)
--	$(AR)$@ $(OBJS)
-+libpord$(PLAT).a:$(OBJS)
-+	$(AR) $@ $(OBJS)
- 	$(RANLIB) $@
- 
-+libpord$(PLAT).so: $(OBJS)
-+	$(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT)-5.2.1.so -o libpord$(PLAT)-5.2.1.so -Wl,-z,defs
-+	ln -s libpord$(PLAT)-5.2.1.so $@
-+
- clean:
- 	rm -f *.o
- 
- realclean:
--	rm -f *.o libpord.a
-+	rm -f *.o libpord*.a *.so
-Index: mumps/Makefile
-===================================================================
---- mumps.orig/Makefile
-+++ mumps/Makefile
-@@ -54,7 +54,7 @@ dexamples:	d
- multi_example:	s d c z
- 	(cd examples ; $(MAKE) multi)
- 
--requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
-+requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT).a $(libdir)/libpord$(PLAT).so
- 
- # dummy MPI library (sequential version)
- 
-@@ -62,19 +62,25 @@ libseqneeded:
- 	(cd libseq; $(MAKE))
- 
- # Build the libpord.a library and copy it into $(topdir)/lib
--$(libdir)/libpord$(PLAT)$(LIBEXT):
-+$(libdir)/libpord$(PLAT).a:
- 	if [ "$(LPORDDIR)" != "" ] ; then \
- 	  cd $(LPORDDIR); \
- 	  $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT); \
- 	fi;
- 	if [ "$(LPORDDIR)" != "" ] ; then \
--	  cp $(LPORDDIR)/libpord$(LIBEXT) $@; \
-+	  cp $(LPORDDIR)/libpord$(PLAT).a $@; \
- 	fi;
- 
-+$(libdir)/libpord$(PLAT).so:
-+	if [ "$(LPORDDIR)" != "" ] ; then \
-+	cd $(LPORDDIR); make CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" ARFUNCT= RANLIB="$(RANLIB)" libpord$(PLAT).so; fi;
-+	if [ "$(LPORDDIR)" != "" ] ; then \
-+	cp -a $(LPORDDIR)/libpord*.so lib/; fi;
-+
- clean:
- 	(cd src; $(MAKE) clean)
- 	(cd examples; $(MAKE) clean)
--	(cd $(libdir); $(RM) *$(PLAT)$(LIBEXT))
-+	(cd $(libdir); $(RM) *$(PLAT).a *$(PLAT).so)
- 	(cd libseq; $(MAKE) clean)
- 	if [ "$(LPORDDIR)" != "" ] ; then \
- 	  cd $(LPORDDIR); $(MAKE) realclean; \
-- 
2.20.1





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#56831: [PATCH] gnu: mumps: Update to 5.5.1
  2022-08-04 17:08 ` [bug#56831] [PATCH v2] " FELŠÖCI Marek
@ 2022-08-05 13:30   ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2022-08-05 13:30 UTC (permalink / raw)
  To: FELŠÖCI Marek; +Cc: 56831-done

Hi Marek,

FELŠÖCI Marek <marek@felsoci.sk> skribis:

> * gnu/packages/maths.scm (mumps): Update to 5.5.1. Stop applying patches as the build configuration has been updated upstream. Allow for further optimized BLR compression by specifying the -DBLR_MT build option.
> * gnu/packages/patches/mumps-build-parallelism.patch: File removed.
> * gnu/packages/patches/mumps-shared-libseq.patch: File removed.
> * gnu/packages/patches/mumps-shared-mumps.patch: File removed.
> * gnu/packages/patches/mumps-shared-pord.patch: File removed.

Pushed with a followup adding an alternate source URL as the main web
site is currently down:

  12087b1b19 gnu: mumps: Add alternate source code URL.
  b70d6ce627 gnu: mumps: Update to 5.5.1

Thank you!

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-05 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 15:44 [bug#56831] [PATCH] gnu: mumps: Update to 5.5.1 FELŠÖCI Marek
2022-08-04 10:17 ` Ludovic Courtès
2022-08-04 17:08 ` [bug#56831] [PATCH v2] " FELŠÖCI Marek
2022-08-05 13:30   ` bug#56831: [PATCH] " Ludovic Courtès

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.