summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm110
1 files changed, 100 insertions, 10 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 34c72dadad..7a03036b67 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2016, 2017 John Darrington <jmd@gnu.org>
-;;; Copyright © 2014, 2015, 2016, 2017, 2018 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org>
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
@@ -584,7 +584,8 @@ problems in numerical linear algebra.")
version ".tgz"))
(sha256
(base32
- "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))))
+ "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))
+ (patches (search-patches "scalapack-blacs-mpi-deprecations.patch"))))
(build-system cmake-build-system)
(inputs
`(("mpi" ,openmpi)
@@ -1635,7 +1636,7 @@ September 2004}")
(define-public petsc
(package
(name "petsc")
- (version "3.10.2")
+ (version "3.10.3")
(source
(origin
(method url-fetch)
@@ -1643,7 +1644,7 @@ September 2004}")
(uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
"petsc-lite-" version ".tar.gz"))
(sha256
- (base32 "0bl64pydak3rblnjffi482r8bin4xim9sb37ksl2jkcxf0i0irsi"))))
+ (base32 "10p9ap1rp6k8k2g8zdc505kdlsc3976fjymyp393sccjapm50dph"))))
(outputs '("out" ;libraries and headers
"examples")) ;~30MiB of examples
(build-system gnu-build-system)
@@ -3446,7 +3447,7 @@ revised simplex and the branch-and-bound methods.")
(define-public dealii
(package
(name "dealii")
- (version "8.5.1")
+ (version "9.0.1")
(source
(origin
(method url-fetch)
@@ -3454,7 +3455,8 @@ revised simplex and the branch-and-bound methods.")
"download/v" version "/dealii-" version ".tar.gz"))
(sha256
(base32
- "1bh9rsmkrg0zi70n27b11djmac9lximghsiy7mg7w7x544n82gnk"))
+ "0r7f8rhl3xr94imd372plizdcbqk0a70w73lwc3vw912dxk0sbyz"))
+ (patches (search-patches "dealii-mpi-deprecations.patch"))
(modules '((guix build utils)))
(snippet
;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
@@ -3507,10 +3509,8 @@ in finite element programs.")
(arguments
(substitute-keyword-arguments (package-arguments dealii)
((#:configure-flags cf)
- ``("-DMPI_C_COMPILER=mpicc"
- "-DMPI_CXX_COMPILER=mpicxx"
- "-DMPI_Fortran_COMPILER=mpifort"
- ,@,cf))
+ `(cons "-DDEAL_II_WITH_MPI:BOOL=ON"
+ ,cf))
((#:phases phases '%standard-phases)
`(modify-phases ,phases
(add-before 'check 'mpi-setup
@@ -3973,6 +3973,96 @@ 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
+ (lambda _
+ ;; Tests use 2 mpi tasks by default, use our remaining build
+ ;; cores as OpenMP threads.
+ (setenv "OMP_NUM_THREADS" (number->string
+ (max (quotient (parallel-job-count) 2)
+ 1)))
+ (,%openmpi-setup)))))))
+ (synopsis "Eigenvalue solvers for symmetric matrices (with MPI support)")))
+
(define-public elemental
(package
(name "elemental")