From patchwork Fri Jul 29 15:44:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RkVMxaDDlkNJIE1hcmVr?= X-Patchwork-Id: 41055 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C542927BBEA; Fri, 29 Jul 2022 16:45:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E9ACA27BBE9 for ; Fri, 29 Jul 2022 16:45:19 +0100 (BST) Received: from localhost ([::1]:52522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHSAx-0004mU-2g for patchwork@mira.cbaines.net; Fri, 29 Jul 2022 11:45:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHSAh-0004kn-2w for guix-patches@gnu.org; Fri, 29 Jul 2022 11:45:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHSAg-0006yR-Q1 for guix-patches@gnu.org; Fri, 29 Jul 2022 11:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHSAg-0001nS-Lb for guix-patches@gnu.org; Fri, 29 Jul 2022 11:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56831] [PATCH] gnu: mumps: Update to 5.5.1 Resent-From: =?utf-8?b?RkVMxaDDlkNJ?= Marek Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 29 Jul 2022 15:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56831 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56831@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16591094656817 (code B ref -1); Fri, 29 Jul 2022 15:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Jul 2022 15:44:25 +0000 Received: from localhost ([127.0.0.1]:33271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHSA4-0001lr-QE for submit@debbugs.gnu.org; Fri, 29 Jul 2022 11:44:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:39378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHSA1-0001li-ET for submit@debbugs.gnu.org; Fri, 29 Jul 2022 11:44:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHSA1-0004SC-9B for guix-patches@gnu.org; Fri, 29 Jul 2022 11:44:21 -0400 Received: from m1-out-mua-3.websupport.sk ([45.13.137.12]:59696) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHS9y-0006rv-6O for guix-patches@gnu.org; Fri, 29 Jul 2022 11:44:20 -0400 Received: from m1-u7-ing.websupport.sk (unknown [10.30.7.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by m1-out-mua-3.websupport.sk (Postfix) with ESMTPS id 4LvWz1286Gz1cpm for ; Fri, 29 Jul 2022 17:44:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felsoci.sk; s=mail; t=1659109453; bh=8Kx8a+pX3uUvUHM1/Y9n4Cc3MDcVmi+GSIBuj5cD+0Y=; h=From:To:Subject:Date:From; b=DC3fuvedZEsWK8GN0oAr7dCm4kDwYhdmpnuQCn6HbVrC4bvzXacDogKHbeK9yABRo +IcrywdYOsWAakVzeNQxvD5veP5R4T7pury3QnjTxohFQ/7x72awGaEoesy73kxOEY nncWSybJABLUtVr+c9lRr4GMacBot7G2q/X7tMBHyOEXmVXVhO2RRZLw+MfYthNxXl 97GK455Ka+2Uhk3MEHpgMgJOaEZcP4O8zJRdz0tjUkwI09AfiHnp8JmHzaIUt8qC30 tvoIIZ1nwdMiWMdGy3WEegh0uNSn8bE0NEnonqeoZ4Xjq72FER3IdCdsEb7fQV8mU/ BYENXRuTlTrog== Received: from in-6.websupport.sk (pfsense-ha.websupport.sk [37.9.169.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by m1-u7-ing.websupport.sk (Postfix) with ESMTPS id 4LvWz11GGqzTTST for ; Fri, 29 Jul 2022 17:44:12 +0200 (CEST) Received: from perun.bordeaux.inria.fr (unknown [193.50.110.66]) (Authenticated sender: marek@felsoci.sk) by in-6.websupport.sk (Postfix) with ESMTPA id 4LvWz03l7Fz12Nrr for ; Fri, 29 Jul 2022 17:44:12 +0200 (CEST) From: =?utf-8?b?RkVMxaDDlkNJ?= Marek Date: Fri, 29 Jul 2022 17:44:11 +0200 Message-Id: <20220729154411.8017-1-marek@felsoci.sk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Out-Rspamd-Server: m1-rspamd-out-6 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: WS_IP_WHITELIST Authentication-Results: m1-u7-ing.websupport.sk; none X-Out-Spamd-Result: default: False [0.00 / 1000.00]; ASN(0.00)[asn:51013, ipnet:37.9.168.0/21, country:SK]; WS_IP_WHITELIST(0.00)[37.9.169.236] X-Out-Rspamd-Queue-Id: 4LvWz11GGqzTTST Received-SPF: pass client-ip=45.13.137.12; envelope-from=marek@felsoci.sk; helo=m1-out-mua-3.websupport.sk X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- 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 ;;; Copyright © 2022 Zhu Zihao ;;; Copyright © 2022 Sharlatan Hellseher +;;; Copyright © 2022 Marek Felšöci ;;; ;;; 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"))