From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Brown Subject: bug#32681: OpenBLAS with ILP64 storage model Date: Mon, 10 Sep 2018 08:41:41 -0500 Message-ID: <87h8ixjwq2.fsf@fastmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzMj5-0002Qr-KI for bug-guix@gnu.org; Mon, 10 Sep 2018 09:59:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzMT0-0007jF-Cj for bug-guix@gnu.org; Mon, 10 Sep 2018 09:43:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:46891) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fzMT0-0007iu-6v for bug-guix@gnu.org; Mon, 10 Sep 2018 09:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fzMSz-0001Bp-V8 for bug-guix@gnu.org; Mon, 10 Sep 2018 09:43:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzMRq-0006fj-8d for bug-guix@gnu.org; Mon, 10 Sep 2018 09:41:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzMRl-0005OY-54 for bug-guix@gnu.org; Mon, 10 Sep 2018 09:41:50 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44463) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzMRk-0005NK-Qh for bug-guix@gnu.org; Mon, 10 Sep 2018 09:41:45 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 45B2321C5F for ; Mon, 10 Sep 2018 09:41:44 -0400 (EDT) Received: from localhost (c-24-12-214-32.hsd1.il.comcast.net [24.12.214.32]) by mail.messagingengine.com (Postfix) with ESMTPA id CB1ED102AD for ; Mon, 10 Sep 2018 09:41:43 -0400 (EDT) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 32681@debbugs.gnu.org --=-=-= Content-Type: text/plain This patch introduces a new package named `openblas-ilp64', which uses the ILP64 model. The library name contains the suffix "_ilp64" to the library name and so hopefully may co-exist with the existing `openblas' port. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-openblas-ilp64.patch Content-Transfer-Encoding: quoted-printable Content-Description: openblas-ilp64 patch >From 8c9728eb66a45fd42f208df66d323981837c9c0c Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Mon, 10 Sep 2018 08:33:43 -0500 Subject: [PATCH] gnu: Add openblas-ilp64. * gnu/packages/maths.scm (openblas-ilp64): New variable. --- gnu/packages/maths.scm | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 01bd03c60..5f1dfec8a 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -27,6 +27,7 @@ ;;; Copyright =C2=A9 2018 Nadya Voronova ;;; Copyright =C2=A9 2018 Adam Massmann ;;; Copyright =C2=A9 2018 Marius Bakke +;;; Copyright =C2=A9 2018 Eric Brown ;;; ;;; This file is part of GNU Guix. ;;; @@ -2909,6 +2910,76 @@ parts of it.") "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD versio= n.") (license license:bsd-3))) =20 +(define-public openblas-ilp64 + (package + (name "openblas-ilp64") + (version "0.3.2") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/openblas/v" version "/Ope= nBLAS%20" + version "%20version.tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0b20km2jv7m6qiylrlvhq2vnmkmilb633mr8rhqmgbn1wqrp58jq")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and = no + ;; TARGET is specified, OpenBLAS will tune itself to the build host= , so + ;; we need to disable substitutions. + #:substitutable? + ,(let ((system (or (%current-target-system) (%current-system)))) + (or (string-prefix? "x86_64" system) + (string-prefix? "i686" system) + (string-prefix? "mips" system) + (string-prefix? "aarch64" system))) + #:make-flags + (list (string-append "PREFIX=3D" (assoc-ref %outputs "out")) + "SHELL=3Dbash" + ;; Build the library for all supported CPUs. This allows + ;; switching CPU targets at runtime with the environment vari= able + ;; OPENBLAS_CORETYPE=3D, where "type" is a supported CP= U type. + ;; Unfortunately, this is not supported on non-x86 architectu= res, + ;; where it leads to failed builds. + ,@(let ((system (or (%current-target-system) (%current-system= )))) + (cond + ((or (string-prefix? "x86_64" system) + (string-prefix? "i686" system)) + '("DYNAMIC_ARCH=3D1" "INTERFACE64=3D1" "LIBNAMESUFFIX= =3Dilp64")) + ;; On MIPS we force the "SICORTEX" TARGET, as for the ot= her + ;; two available MIPS targets special extended instructi= ons + ;; for Loongson cores are used. + ((string-prefix? "mips" system) + '("TARGET=3DSICORTEX" "INTERFACE64=3D1" "LIBNAMESUFFIX= =3Dilp64")) + ;; On aarch64 force the generic 'armv8-a' target + ((string-prefix? "aarch64" system) + '("TARGET=3DARMV8" "INTERFACE64=3D1" "LIBNAMESUFFIX=3Di= lp64")) + (else '("INTERFACE64=3D1" "LIBNAMESUFFIX=3Dilp64"))))) + ;; no configure script + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'set-extralib + (lambda* (#:key inputs #:allow-other-keys) + ;; Get libgfortran found when building in utest. + (setenv "FEXTRALIB" + (string-append "-L" (assoc-ref inputs "fortran-lib") + "/lib")) + #t))))) + (inputs + `(("fortran-lib" ,gfortran "lib"))) + (native-inputs + `(("cunit" ,cunit) + ("fortran" ,gfortran) + ("perl" ,perl))) + (home-page "http://www.openblas.net/") + (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)") + (description + "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD versio= n. (ILP64 version)") + (license license:bsd-3))) + (define* (make-blis implementation #:optional substitutable?) "Return a BLIS package with the given IMPLEMENTATION (see config/ in the source tree for a list of implementations.) --=20 2.18.0 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-openblas-ilp64.patch Content-Transfer-Encoding: quoted-printable Content-Description: openblas-ilp64 patch >From 8c9728eb66a45fd42f208df66d323981837c9c0c Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Mon, 10 Sep 2018 08:33:43 -0500 Subject: [PATCH] gnu: Add openblas-ilp64. * gnu/packages/maths.scm (openblas-ilp64): New variable. --- gnu/packages/maths.scm | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 01bd03c60..5f1dfec8a 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -27,6 +27,7 @@ ;;; Copyright =C2=A9 2018 Nadya Voronova ;;; Copyright =C2=A9 2018 Adam Massmann ;;; Copyright =C2=A9 2018 Marius Bakke +;;; Copyright =C2=A9 2018 Eric Brown ;;; ;;; This file is part of GNU Guix. ;;; @@ -2909,6 +2910,76 @@ parts of it.") "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD versio= n.") (license license:bsd-3))) =20 +(define-public openblas-ilp64 + (package + (name "openblas-ilp64") + (version "0.3.2") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/openblas/v" version "/Ope= nBLAS%20" + version "%20version.tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0b20km2jv7m6qiylrlvhq2vnmkmilb633mr8rhqmgbn1wqrp58jq")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and = no + ;; TARGET is specified, OpenBLAS will tune itself to the build host= , so + ;; we need to disable substitutions. + #:substitutable? + ,(let ((system (or (%current-target-system) (%current-system)))) + (or (string-prefix? "x86_64" system) + (string-prefix? "i686" system) + (string-prefix? "mips" system) + (string-prefix? "aarch64" system))) + #:make-flags + (list (string-append "PREFIX=3D" (assoc-ref %outputs "out")) + "SHELL=3Dbash" + ;; Build the library for all supported CPUs. This allows + ;; switching CPU targets at runtime with the environment vari= able + ;; OPENBLAS_CORETYPE=3D, where "type" is a supported CP= U type. + ;; Unfortunately, this is not supported on non-x86 architectu= res, + ;; where it leads to failed builds. + ,@(let ((system (or (%current-target-system) (%current-system= )))) + (cond + ((or (string-prefix? "x86_64" system) + (string-prefix? "i686" system)) + '("DYNAMIC_ARCH=3D1" "INTERFACE64=3D1" "LIBNAMESUFFIX= =3Dilp64")) + ;; On MIPS we force the "SICORTEX" TARGET, as for the ot= her + ;; two available MIPS targets special extended instructi= ons + ;; for Loongson cores are used. + ((string-prefix? "mips" system) + '("TARGET=3DSICORTEX" "INTERFACE64=3D1" "LIBNAMESUFFIX= =3Dilp64")) + ;; On aarch64 force the generic 'armv8-a' target + ((string-prefix? "aarch64" system) + '("TARGET=3DARMV8" "INTERFACE64=3D1" "LIBNAMESUFFIX=3Di= lp64")) + (else '("INTERFACE64=3D1" "LIBNAMESUFFIX=3Dilp64"))))) + ;; no configure script + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'set-extralib + (lambda* (#:key inputs #:allow-other-keys) + ;; Get libgfortran found when building in utest. + (setenv "FEXTRALIB" + (string-append "-L" (assoc-ref inputs "fortran-lib") + "/lib")) + #t))))) + (inputs + `(("fortran-lib" ,gfortran "lib"))) + (native-inputs + `(("cunit" ,cunit) + ("fortran" ,gfortran) + ("perl" ,perl))) + (home-page "http://www.openblas.net/") + (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)") + (description + "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD versio= n. (ILP64 version)") + (license license:bsd-3))) + (define* (make-blis implementation #:optional substitutable?) "Return a BLIS package with the given IMPLEMENTATION (see config/ in the source tree for a list of implementations.) --=20 2.18.0 --=-=-=--