emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#34188: closed ([PATCH] gnu: Add ELPA.)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#34188: closed ([PATCH] gnu: Add ELPA.)
Date: Wed, 13 Feb 2019 20:14:02 +0000

Your message dated Wed, 13 Feb 2019 14:13:07 -0600
with message-id <address@hidden>
and subject line Re: [bug#34188] [PATCH] gnu: Add ELPA.
has caused the debbugs.gnu.org bug report #34188,
regarding [PATCH] gnu: Add ELPA.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
34188: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34188
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] gnu: Add ELPA. Date: Thu, 24 Jan 2019 00:16:49 -0600
From: Eric Bavier <address@hidden>

* gnu/packages/maths.scm (elpa, elpa-openmpi): New variables.
---
 gnu/packages/maths.scm | 86 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 85 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2f52b4a0ff..5dff1c4d0a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <address@hidden>
 ;;; Copyright © 2013 Nikita Karetnikov <address@hidden>
 ;;; Copyright © 2014, 2016, 2017 John Darrington <address@hidden>
-;;; Copyright © 2014, 2015, 2016, 2017, 2018 Eric Bavier <address@hidden>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Eric Bavier <address@hidden>
 ;;; Copyright © 2014 Federico Beffa <address@hidden>
 ;;; Copyright © 2014 Mathieu Lirzin <address@hidden>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <address@hidden>
@@ -3990,6 +3990,90 @@ as equations, scalars, vectors, and matrices.")
 theories} (SMT) solver.  It provides a C/C++ API, as well as Python bindings.")
     (license license:expat)))

+(define-public elpa
+  (package
+    (name "elpa")
+    (version "2018.11.001")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://elpa.mpcdf.mpg.de/html/Releases/";
+                                  version "/elpa-" version ".tar.gz"))
+              (sha256
+               (base32
+                "05hv3v5i6xmziaizw350ff72y1c3k662r85fm3xfdrkclj5zw9yc"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("fortran" ,gfortran)
+       ("perl" ,perl)))                 ;for configure and deps
+    (inputs
+     `(("blas" ,openblas)))
+    (arguments
+     `(#:configure-flags
+       `(;"--enable-openmp"
+         "--with-mpi=no"
+         ;; ELPA unfortunately does not support runtime dispatch, so we can
+         ;; only enable the "generic" kernels.  See the "Cross compilation"
+         ;; section of INSTALL.md.
+         "--enable-generic"
+         "--disable-sse" "--disable-sse-assembly" ;Require SSE3
+         "--disable-avx" "--disable-avx2" "--disable-avx512"
+         ,(string-append "CFLAGS=-O3 "
+                         "-funsafe-loop-optimizations 
-funsafe-math-optimizations "
+                         "-ftree-vect-loop-version -ftree-vectorize "
+                         ,(let ((system (or (%current-target-system)
+                                            (%current-system))))
+                            (cond
+                             ((or (string-prefix? "x86_64" system)
+                                  (string-prefix? "i686" system))
+                              "-msse2")
+                             (else "")))))
+       #:parallel-tests? #f             ;tests are multi-threaded, via BLAS
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-header-generation
+           (lambda _
+             (substitute* "configure"
+               (("^  *make.*top_srcdir=\"\\$srcdir\"" &)
+                (string-append & " CPP=\"$CPP\"")))
+             #t))
+         (add-before 'check 'setup-tests
+           (lambda _
+             ;; Decrease test time and RAM use by computing fewer eigenvalues.
+             ;; The flags are (MATRIX-SIZE, EIGENVALUES, BLOCK-SIZE), where
+             ;; the default is (500, 250, 16) for C tests and (5000, 150, 16)
+             ;; for Fortran.  This also causes several tests to pass that
+             ;; otherwise would otherwise fail with matrix size 5000; possibly
+             ;; due to floating point tolerances that are too tight.
+             (setenv "TEST_FLAGS" "1500 50 16") ;from elpa.spec
+             (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
+             (substitute* "Makefile"
+               ;; Test scripts are generated, patch the shebang
+               (("#!/bin/bash") (string-append "#!" (which "sh"))))
+             #t)))))
+    (home-page "http://elpa.mpcdf.mpg.de";)
+    (synopsis "Eigenvalue solvers for symmetric matrices")
+    (description
+     "The ELPA library provides efficient and scalable direct eigensolvers for
+symmetric matrices.")
+    (license license:lgpl3)))
+
+(define-public elpa-openmpi
+  (package (inherit elpa)
+    (name "elpa-openmpi")
+    (inputs
+     `(("mpi" ,openmpi)
+       ("scalapack" ,scalapack)
+       ,@(package-inputs elpa)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments elpa)
+       ((#:configure-flags cf '())
+        `(cons "--with-mpi=yes" (delete "--with-mpi=no" ,cf)))
+       ((#:phases phases '%standard-phases)
+        `(modify-phases ,phases
+           (add-before 'check 'mpi-setup
+             ,%openmpi-setup)))))       ;XXX: Need to adjust OMP_NUM_THREADS?
+    (synopsis "Eigenvalue solvers for symmetric matrices (with MPI support)")))
+
 (define-public elemental
   (package
     (name "elemental")
--
2.20.1




--- End Message ---
--- Begin Message --- Subject: Re: [bug#34188] [PATCH] gnu: Add ELPA. Date: Wed, 13 Feb 2019 14:13:07 -0600
On Tue, 5 Feb 2019 09:12:55 -0600
Eric Bavier <address@hidden> wrote:

> >   
> > > +         "--with-mpi=no"
> > > +         ;; ELPA unfortunately does not support runtime dispatch, so we 
> > > can
> > > +         ;; only enable the "generic" kernels.  See the "Cross 
> > > compilation"
> > > +         ;; section of INSTALL.md.
> > > +         "--enable-generic"
> > > +         "--disable-sse" "--disable-sse-assembly" ;Require SSE3
> > > +         "--disable-avx" "--disable-avx2" "--disable-avx512"    
> > 
> > For a future patch, do you think you can enable function
> > multi-versioning (FMV) for this code using the scripts at
> > <https://github.com/clearlinux/make-fmv-patch>?  That’d be pretty cool.  
> 
> It would be cool.  And this package might be a good candidate to test,
> since we can also compare the achieved performance against the
> hand-rolled assembly.

Most of the computational bits are implemented in Fortran90, and it
turns out gfortran does not support FMV.  In order to use it, the
kernels would need to be wrapped with a higher-level interface written
in C.  This is doable, but for a later time.

Pushed in 6d433d6ef7c33b8599199481e1c1faff6584d1ac

`~Eric

Attachment: pgpQflRP3awK0.pgp
Description: OpenPGP digital signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]