unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add openblas.
@ 2015-03-17 11:32 Ricardo Wurmus
  2015-03-18 18:04 ` Eric Bavier
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2015-03-17 11:32 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-openblas.patch --]
[-- Type: text/x-patch, Size: 2107 bytes --]

From d8be3e7309ece54cf0323329dc29e24268034082 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
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 | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b3ece1b..89f5f5b 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,39 @@ 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
+       #: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

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

* Re: [PATCH] Add openblas.
  2015-03-17 11:32 [PATCH] Add openblas Ricardo Wurmus
@ 2015-03-18 18:04 ` Eric Bavier
  2015-03-18 20:44   ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Bavier @ 2015-03-18 18:04 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On 2015-03-17 06:32, Ricardo Wurmus wrote:
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> 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).

-- 
`~Eric

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

* Re: [PATCH] Add openblas.
  2015-03-18 18:04 ` Eric Bavier
@ 2015-03-18 20:44   ` Ludovic Courtès
  2015-03-19 11:25     ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2015-03-18 20:44 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <ericbavier@openmailbox.org> skribis:

> On 2015-03-17 06:32, Ricardo Wurmus wrote:
>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>> 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).

Another option is to do the same as for ATLAS, which is to force a
local build.

Ludo’.

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

* Re: [PATCH] Add openblas.
  2015-03-18 20:44   ` Ludovic Courtès
@ 2015-03-19 11:25     ` Ricardo Wurmus
  2015-03-22 15:56       ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2015-03-19 11:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Eric Bavier

[-- Attachment #1: Type: text/plain, Size: 899 bytes --]


Ludovic Courtès writes:

> Eric Bavier <ericbavier@openmailbox.org> skribis:
>
>> On 2015-03-17 06:32, Ricardo Wurmus wrote:
>>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>>> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-openblas.patch --]
[-- Type: text/x-patch, Size: 2181 bytes --]

From 19fe9456bc8f7570f5c34537fd2ce4921c117a01 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
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


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

* Re: [PATCH] Add openblas.
  2015-03-19 11:25     ` Ricardo Wurmus
@ 2015-03-22 15:56       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2015-03-22 15:56 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel, Eric Bavier

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> From 19fe9456bc8f7570f5c34537fd2ce4921c117a01 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Tue, 17 Mar 2015 12:24:45 +0100
> Subject: [PATCH] gnu: Add openblas.
>
> * gnu/packages/maths.scm (openblas): New variable.

LGTM, thanks.

Ludo’.

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

end of thread, other threads:[~2015-03-22 15:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-17 11:32 [PATCH] Add openblas Ricardo Wurmus
2015-03-18 18:04 ` Eric Bavier
2015-03-18 20:44   ` Ludovic Courtès
2015-03-19 11:25     ` Ricardo Wurmus
2015-03-22 15:56       ` Ludovic Courtès

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

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).