From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] Add openblas. Date: Thu, 19 Mar 2015 12:25:54 +0100 Message-ID: References: <871tkmdoip.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYYaT-0004DM-SZ for guix-devel@gnu.org; Thu, 19 Mar 2015 07:26:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYYaR-0003T3-3N for guix-devel@gnu.org; Thu, 19 Mar 2015 07:26:05 -0400 In-Reply-To: <871tkmdoip.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel , Eric Bavier --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Eric Bavier skribis: > >> On 2015-03-17 06:32, Ricardo Wurmus wrote: >>> From: Ricardo Wurmus >>> Date: Tue, 17 Mar 2015 12:24:45 +0100 >>> Subject: [PATCH] gnu: Add openblas. >>> >>> * gnu/packages/maths.scm (openblas): New variable. >> >> Does the build system need any special flags for cpu-targeting? >> I.e. does the build system detect the cpu that it is building on? If >> that's the case, I believe we've usually targeted the least common >> denominator for our supported system (e.g. SSE2 for x86-64). With only "make" the CPU is detected as part of the build process. If the "TARGET" flag is provided a specific CPU is targeted. > Another option is to do the same as for ATLAS, which is to force a > local build. Attached is an updated patch that forces a local build. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-Add-openblas.patch" >From 19fe9456bc8f7570f5c34537fd2ce4921c117a01 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 17 Mar 2015 12:24:45 +0100 Subject: [PATCH] gnu: Add openblas. * gnu/packages/maths.scm (openblas): New variable. --- gnu/packages/maths.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index b253850..0d2efdd 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -35,6 +35,7 @@ #:use-module (guix build-system gnu) #:use-module (gnu packages algebra) #:use-module (gnu packages bison) + #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages curl) @@ -992,6 +993,40 @@ based on transforming an expression into a bytecode and precalculating constant parts of it.") (license license:expat))) +(define-public openblas + (package + (name "openblas") + (version "0.2.13") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/xianyi/OpenBLAS/tarball/v" + version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1asg5mix13ipxgj5h2yj2p0r8km1di5jbcjkn5gmhb37nx7qfv6k")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ;no "check" target + #:substitutable? #f ;force local build because of CPU detection + #:make-flags + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "SHELL=bash" + "NO_LAPACK=1") + ;; no configure script + #:phases (alist-delete 'configure %standard-phases))) + (inputs + `(("fortran" ,gfortran-4.8))) + (native-inputs + `(("cunit" ,cunit) + ("perl" ,perl))) + (home-page "http://www.openblas.net/") + (synopsis "Optimized BLAS library based on GotoBLAS") + (description + "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.") + (license license:bsd-3))) + (define-public openlibm (package (name "openlibm") -- 2.1.0 --=-=-=--