all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#30317] [PATCH 1/2] gnu: Add QD.
@ 2018-02-01 15:52 Eric Bavier
  2018-02-01 21:11 ` Leo Famulari
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Bavier @ 2018-02-01 15:52 UTC (permalink / raw)
  To: 30317

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

Hello Guix,

Here is a patch that adds the "QD" double-double/quad-double library.

-- 
Eric Bavier, Scientific Libraries, Cray Inc.

[-- Attachment #2: 0001-gnu-Add-QD.patch --]
[-- Type: text/x-patch, Size: 3273 bytes --]

From d6f9934721b818ce61e17ae60feb638ff57fbc9d Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@cray.com>
Date: Wed, 31 Jan 2018 13:55:37 -0600
Subject: [PATCH 1/2] gnu: Add QD.

* gnu/packages/multiprecision.scm (qd): New variable.
---
 gnu/packages/multiprecision.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index b6d2d7f4a..e137fe388 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +25,7 @@
   #:use-module (guix licenses)
   #:use-module (gnu packages)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages gcc)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -150,3 +152,41 @@ the other hand to obtain accurate results, thanks to multiple precision
 arithmetic.")
     (license lgpl2.1+)
     (home-page "https://perso.ens-lyon.fr/nathalie.revol/software.html")))
+
+(define-public qd
+  (package
+    (name "qd")
+    (version "2.3.18")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://crd.lbl.gov/~dhbailey/mpdist/qd-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0vkihcj9fyv2cycq8515713gbs3yskhmivy8bznvx72i6ddnn2c1"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("gfortran" ,gfortran)))
+    (arguments
+     `(#:configure-flags `("--disable-enable_fma" ;weird :/
+                           "--enable-shared"
+                           ,,@(if (string-prefix? "aarch64"
+                                                  (or (%current-target-system)
+                                                      (%current-system)))
+                                  ;; XXX: The qd_test test fails numerical
+                                  ;; accuracy checks for 'dd_real::exp()' on
+                                  ;; aarch64 with GCC 5.4 at -O2.  Disabling
+                                  ;; expensive optimizations lets it pass.
+                                  '("CXXFLAGS=-O3 -fno-expensive-optimizations")
+                                  '("CXXFLAGS=-O3")))))
+    (home-page "http://crd-legacy.lbl.gov/~dhbailey/mpdist/")
+    (synopsis "Double-double and quad-double library")
+    (description "This package supports both a double-double
+datatype (approx. 32 decimal digits) and a quad-double datatype (approx. 64
+decimal digits).  The computational library is written in C++.  Both C++ and
+Fortran-90 high-level language interfaces are provided to permit one to
+convert an existing C++ or Fortran-90 program to use the library with only
+minor changes to the source code.  In most cases only a few type statements
+and (for Fortran-90 programs) read/write statements need to be changed.  PSLQ
+and numerical quadrature programs are included.")
+    (license bsd-3)))
-- 
2.15.1


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

* [bug#30317] [PATCH 1/2] gnu: Add QD.
  2018-02-01 15:52 [bug#30317] [PATCH 1/2] gnu: Add QD Eric Bavier
@ 2018-02-01 21:11 ` Leo Famulari
  2018-02-02 14:40   ` bug#30317: " Eric Bavier
  0 siblings, 1 reply; 3+ messages in thread
From: Leo Famulari @ 2018-02-01 21:11 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 30317

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

On Thu, Feb 01, 2018 at 09:52:56AM -0600, Eric Bavier wrote:
> Subject: [PATCH 1/2] gnu: Add QD.
> 
> * gnu/packages/multiprecision.scm (qd): New variable.

> +    (arguments
> +     `(#:configure-flags `("--disable-enable_fma" ;weird :/

Lol. LGTM assuming it works for you.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* bug#30317: [PATCH 1/2] gnu: Add QD.
  2018-02-01 21:11 ` Leo Famulari
@ 2018-02-02 14:40   ` Eric Bavier
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Bavier @ 2018-02-02 14:40 UTC (permalink / raw)
  To: 30317-done

On Thu, Feb 01, 2018 at 04:11:19PM -0500, Leo Famulari wrote:
> On Thu, Feb 01, 2018 at 09:52:56AM -0600, Eric Bavier wrote:
> > Subject: [PATCH 1/2] gnu: Add QD.
> > 
> > * gnu/packages/multiprecision.scm (qd): New variable.
> 
> > +    (arguments
> > +     `(#:configure-flags `("--disable-enable_fma" ;weird :/
> 
> Lol. LGTM assuming it works for you.

Thanks.  Pushed in cbc084e1a7c25d1c8944bcb20a989f795acdb096.

-- 
Eric Bavier, Scientific Libraries, Cray Inc.

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

end of thread, other threads:[~2018-02-02 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01 15:52 [bug#30317] [PATCH 1/2] gnu: Add QD Eric Bavier
2018-02-01 21:11 ` Leo Famulari
2018-02-02 14:40   ` bug#30317: " Eric Bavier

Code repositories for project(s) associated with this external index

	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.