;;; 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 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015 Fabian Harfert <fhmgufs@web.de>
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016, 2018 Kei Kebreau <kkebreau@posteo.net>
-;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017, 2018 Paul Garlick <pgarlick@tourbillion-technology.com>
;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
-;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2019 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Dave Love <me@fx@gnu.org>
;;; Copyright © 2018 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
(define-module (gnu packages maths)
#:use-module (ice-9 regex)
+ #:use-module (ice-9 match)
#:use-module (gnu packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
- #:use-module (guix build utils)
+ #:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
- #:use-module (guix build-system ocaml)
#:use-module (guix build-system python)
#:use-module (guix build-system r)
#:use-module (guix build-system ruby)
#:use-module (gnu packages algebra)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages mpi)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages netpbm)
- #:use-module (gnu packages ocaml)
#:use-module (gnu packages pcre)
#:use-module (gnu packages popt)
#:use-module (gnu packages perl)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
+ #:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
#:use-module (gnu packages ruby)
(define-public c-graph
(package
(name "c-graph")
- (version "2.0")
+ (version "2.0.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/c-graph/c-graph-" version
".tar.gz"))
(sha256 (base32
- "1hlvpzrh7hzzf533diyfiabzskddi8zx92av9hwkjw3l46z7qv01"))))
+ "092412jzxy6wdvpk96pfj499hpmaww8xllavbvlqspfpr7ips9id"))))
(build-system gnu-build-system)
(inputs
- `(("fortran" ,gfortran)))
+ `(("fortran" ,gfortran)))
(synopsis "Visualizing and demonstrating convolution")
(description
- "GNU C-Graph is a tool for demonstrating the theory of convolution.
+ "GNU C-Graph is a tool for demonstrating the theory of convolution.
Thus, it can serve as an excellent aid to students of signal and systems
theory in visualizing the convolution process. Rather than forcing the
student to write code, the program offers an intuitive interface with
numbers.")
(license license:gpl3+)))
-(define-public ocaml-gsl
- (package
- (name "ocaml-gsl")
- (version "1.22.0")
- (source
- (origin
- (method url-fetch)
- (uri
- (string-append
- "https://github.com/mmottl/gsl-ocaml/releases/download/"
- version "/gsl-" version ".tbz"))
- (sha256
- (base32
- "17vcswipliq1b2idbzx1z95kskn1a4q4s5v04igilg0f7lnkaarb"))))
- (build-system ocaml-build-system)
- (inputs
- `(("gsl" ,gsl)))
- (home-page "https://mmottl.github.io/gsl-ocaml")
- (synopsis "Bindings to the GNU Scientific Library")
- (description
- "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
-the OCaml language.")
- (license license:gpl3+)))
-
-(define-public ocaml4.01-gsl
- (package-with-ocaml4.01 ocaml-gsl))
-
(define-public glpk
(package
(name "glpk")
(define-public 4ti2
(package
(name "4ti2")
- (version "1.6.7")
+ (version "1.6.9")
(source
(origin
- (method url-fetch)
- (uri (string-append "http://www.4ti2.de/version_" version
- "/4ti2-" version ".tar.gz"))
- (sha256
- (base32
- "1frix3rnm9ffr93alqzw4cavxbfpf524l8rfbmcpyhwd3n1km0yl"))))
+ (method url-fetch)
+ (uri (string-append "https://github.com/4ti2/4ti2/releases/download/"
+ "Release_"
+ (string-map (lambda (c) (if (char=? c #\.) #\_ c))
+ version)
+ "/4ti2-" version ".tar.gz"))
+ (sha256
+ (base32 "0rj92x6p9m3la5gasjbj7sa569im527ffmka5y2sv1amgd3fflrh"))))
(build-system gnu-build-system)
(native-inputs
`(("which" ,(@ (gnu packages base) which)))) ; for the tests
version ".tgz"))
(sha256
(base32
- "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))))
+ "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))
+ (patches (search-patches "scalapack-blacs-mpi-deprecations.patch"))))
(build-system cmake-build-system)
(inputs
`(("mpi" ,openmpi)
(define-public hdf5
(package
(name "hdf5")
- (version "1.8.19")
+ (version "1.8.21")
(source
(origin
(method url-fetch)
version ".tar.bz2")
(string-append "https://support.hdfgroup.org/ftp/HDF5/"
"current"
- (apply string-append
- (take (string-split version #\.) 2))
+ (match (string-split version #\.)
+ ((major minor _ ...)
+ (string-append major minor)))
"/src/hdf5-" version ".tar.bz2")))
(sha256
- (base32 "0f3jfbqpaaq21ighi40qzs52nb52kc2d2yjk541rjmsx20b3ih2r"))
- (patches (list (search-patch "hdf5-config-date.patch")))))
+ (base32 "03glk4w4wyb1jyb443g53y3y1ncnf6mj2cqwm6avfr2awkgb3cg5"))
+ (patches (search-patches "hdf5-config-date.patch"
+ "hdf5-1.8-mpi-deprecations.patch"))))
(build-system gnu-build-system)
(inputs
`(("zlib" ,zlib)))
"/src/hdf5-" version ".tar.bz2")))
(sha256
(base32 "1pr85fa1sh2ky6ai2hs3f21lp252grl2cq3wbyi4rh7dm83gyrqj"))
- (patches (list (search-patch "hdf5-config-date.patch")))))))
+ (patches (search-patches "hdf5-config-date.patch"
+ "hdf5-mpi-deprecations.patch"))))))
(define-public hdf-java
(package
(define-public octave-cli
(package
(name "octave-cli")
- (version "4.4.1")
+ (version "5.1.0")
(source
(origin
(method url-fetch)
version ".tar.lz"))
(sha256
(base32
- "0jsdgizlv02an2ppfjwk5qf209zpwi3317yb7jvlsjzxnir3lvhy"))))
+ "11wwxpy2q1bhxs2v41bqn05i2sb0905cj1xil6mg8l4k2kka4cq6"))))
(build-system gnu-build-system)
(inputs
`(("lapack" ,lapack)
(modify-phases %standard-phases
(add-after 'configure 'configure-makeinfo
(lambda* (#:key inputs #:allow-other-keys)
- (substitute* "libinterp/corefcn/help.cc"
- (("Vmakeinfo_program = \"makeinfo\"")
- (string-append "Vmakeinfo_program = \""
- (assoc-ref inputs "texinfo")
- "/bin/makeinfo\"")))
+ (substitute* "libinterp/corefcn/help.h"
+ (("\"makeinfo\"")
+ (string-append
+ "\"" (assoc-ref inputs "texinfo") "/bin/makeinfo\"")))
#t)))))
(home-page "https://www.gnu.org/software/octave/")
(synopsis "High-level language for numerical computation")
(define-public petsc
(package
(name "petsc")
- (version "3.10.2")
+ (version "3.10.3")
(source
(origin
(method url-fetch)
(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)
("mumps" ,mumps-openmpi)
("openmpi" ,openmpi)
("scalapack" ,scalapack)
- ("scotch" ,pt-scotch)
+ ("scotch" ,pt-scotch32)
,@(package-inputs petsc)))
(arguments
(substitute-keyword-arguments (package-arguments petsc)
(define-public python-petsc4py
(package
(name "python-petsc4py")
- (version "3.10.0")
+ (version "3.10.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "petsc4py" version))
(sha256
(base32
- "0ch3g6dsvxl7qi984fcssv7cxfbif4bw04gkvxl2l1b8wrmvrm25"))))
+ "094hcnran0r2z1wlvmjswsz3ski1m9kqrl5l0ax8jjhnk55x0flh"))))
(build-system python-build-system)
(arguments
`(#:phases
(define-public r-pracma
(package
(name "r-pracma")
- (version "2.1.8")
+ (version "2.2.2")
(source (origin
(method url-fetch)
(uri (cran-uri "pracma" version))
(sha256
- (base32 "0m8ladhrfyxwybblkcdgg4xv1mk5kibmwarpj2k0c2y34zzcix4z"))))
+ (base32 "18zhni05gwnxbphl6bmjjxmsgg5wwnnkwlb4g971cqyw3dsd83ki"))))
(build-system r-build-system)
(home-page "https://cran.r-project.org/web/packages/pracma/")
(synopsis "Practical numerical math functions")
(define-public superlu-dist
(package
(name "superlu-dist")
- (version "5.3.0")
+ (version "6.1.0")
(source
(origin
(method url-fetch)
(uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
"superlu_dist_" version ".tar.gz"))
(sha256
- (base32 "0ja5ihqivkda1wd58y4lmzvmwssm9g91f70c5q0fzwhng6580h6y"))
+ (base32 "0pqgcgh1yxhfzs99fas3mggajzd5wca3nbyp878rziy74gfk03dl"))
(modules '((guix build utils)))
(snippet
;; Replace the non-free implementation of MC64 with a stub
'(begin
- (use-modules (ice-9 regex)
- (ice-9 rdelim))
(call-with-output-file "SRC/mc64ad_dist.c"
(lambda (port)
(display "
abort ();
}\n" port)))
(substitute* "SRC/util.c" ;adjust default algorithm
- (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag")
- "RowPerm = NOROWPERM"))
+ (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag_MC64;")
+ ;; TODO: set to "LargeDiag_AWPM" once combinatorial-blas has
+ ;; general (i.e. non-square) processor-grid support.
+ "RowPerm = NOROWPERM;"))
#t))
- (patches (search-patches "superlu-dist-scotchmetis.patch"))))
- (build-system gnu-build-system)
+ (patches (search-patches "superlu-dist-scotchmetis.patch"
+ "superlu-dist-awpm-grid.patch"
+ "superlu-dist-fix-mpi-deprecations.patch"))))
+ (build-system cmake-build-system)
(native-inputs
`(("tcsh" ,tcsh)))
(inputs
- `(("gfortran" ,gfortran)))
+ `(("gfortran" ,gfortran)
+ ("blas" ,openblas)
+ ("lapack" ,lapack)
+ ("combblas" ,combinatorial-blas)))
(propagated-inputs
- `(("openmpi" ,openmpi) ;headers include MPI heades
- ("lapack" ,lapack) ;required to link with output library
- ("pt-scotch" ,pt-scotch))) ;same
+ `(("mpi" ,openmpi) ;headers include MPI heades
+ ("parmetis" ,pt-scotch32 "metis")
+ ("pt-scotch" ,pt-scotch32)))
(arguments
- `(#:parallel-build? #f ;race conditions using ar
+ `(#:parallel-tests? #f ;tests use MPI and OpenMP
+ #:configure-flags (list "-DBUILD_SHARED_LIBS:BOOL=YES"
+ "-DTPL_ENABLE_COMBBLASLIB=YES"
+ "-DTPL_BLAS_LIBRARIES=-lopenblas"
+ "-DTPL_LAPACK_LIBRARIES=-llapack"
+ (string-append "-DTPL_PARMETIS_LIBRARIES="
+ (string-join
+ '("ptscotchparmetis" "ptscotch" "ptscotcherr"
+ "scotchmetis" "scotch" "scotcherr")
+ ";"))
+ (string-append "-DTPL_PARMETIS_INCLUDE_DIRS="
+ (assoc-ref %build-inputs "parmetis")
+ "/include")
+ "-DTPL_ENABLE_COMBBLASLIB=ON"
+ (string-append "-DTPL_COMBBLAS_INCLUDE_DIRS="
+ (assoc-ref %build-inputs "combblas")
+ "/include/CombBLAS;"
+ (assoc-ref %build-inputs "combblas")
+ "/include/BipartiteMatchings")
+ "-DTPL_COMBBLAS_LIBRARIES=CombBLAS")
#:phases
(modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (call-with-output-file "make.inc"
- (lambda (port)
- (format port "
-PLAT =
-DSuperLUroot = ~a
-DSUPERLULIB = ~a/lib/libsuperlu_dist.a
-BLASDEF = -DUSE_VENDOR_BLAS
-BLASLIB = -L~a/lib -lblas
-PARMETISLIB = -L~a/lib \
- -lptscotchparmetis -lptscotch -lptscotcherr -lptscotcherrexit \
- -lscotch -lscotcherr -lscotcherrexit
-METISLIB = -L~:*~a/lib \
- -lscotchmetis -lscotch -lscotcherr -lscotcherrexit
-LIBS = $(DSUPERLULIB) $(PARMETISLIB) $(METISLIB) $(BLASLIB)
-ARCH = ar
-ARCHFLAGS = cr
-RANLIB = ranlib
-CC = mpicc
-PIC = -fPIC
-CFLAGS = -O3 -g -DPRNTlevel=0 $(PIC)
-NOOPTS = -O0 -g $(PIC)
-FORTRAN = mpifort
-FFLAGS = -O2 -g $(PIC)
-LOADER = $(CC)
-CDEFS = -DAdd_"
- (getcwd)
- (assoc-ref outputs "out")
- (assoc-ref inputs "lapack")
- (assoc-ref inputs "pt-scotch"))))
- #t))
- (add-after 'unpack 'remove-broken-symlinks
+ (add-before 'configure 'set-c++-standard
(lambda _
- (for-each delete-file
- (find-files "MAKE_INC" "\\.#make\\..*"))
- #t))
- (add-before 'build 'create-install-directories
- (lambda* (#:key outputs #:allow-other-keys)
- (for-each
- (lambda (dir)
- (mkdir-p (string-append (assoc-ref outputs "out")
- "/" dir)))
- '("lib" "include"))
- #t))
+ (substitute* "CMakeLists.txt"
+ ;; AWPM headers require C++14
+ (("CMAKE_CXX_STANDARD 11") "CMAKE_CXX_STANDARD 14"))))
(add-before 'check 'mpi-setup
,%openmpi-setup)
- (replace 'check
- (lambda _
- (with-directory-excursion "EXAMPLE"
- (invoke "mpirun" "-n" "2"
- "./pddrive" "-r" "1" "-c" "2" "g20.rua")
- (invoke "mpirun" "-n" "2"
- "./pzdrive" "-r" "1" "-c" "2" "cg20.cua"))
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Library is placed in lib during the build phase. Copy over
- ;; headers to include.
- (let* ((out (assoc-ref outputs "out"))
- (incdir (string-append out "/include")))
- (for-each (lambda (file)
- (let ((base (basename file)))
- (format #t "installing `~a' to `~a'~%"
- base incdir)
- (copy-file file
- (string-append incdir "/" base))))
- (find-files "SRC" ".*\\.h$")))
- #t)))))
+ (add-before 'check 'omp-setup
+ (lambda _ (setenv "OMP_NUM_THREADS" "1") #t)))))
(home-page (package-home-page superlu))
(synopsis "Parallel supernodal direct solver")
(description
(define-public scotch
(package
(name "scotch")
- (version "6.0.5a")
+ (version "6.0.6")
(source
(origin
(method url-fetch)
(uri (string-append "https://gforge.inria.fr/frs/download.php/"
"latestfile/298/scotch_" version ".tar.gz"))
(sha256
- (base32 "0vsmgjz8qv80di3ljmc7hbdsizxxxwy2b9rgd2fl1mdc6dgbj8av"))
- (patches (search-patches "scotch-test-threading.patch"
- "scotch-build-parallelism.patch"
- "scotch-graph-induce-type-64.patch"
- "scotch-graph-diam-64.patch"))))
+ (base32 "1ky4k9r6jvajhqaqnnx6h8fkmds2yxgp70dpr1qzwcyhi2nhqvv8"))
+ (patches (search-patches "scotch-build-parallelism.patch"
+ "scotch-integer-declarations.patch"))))
(build-system gnu-build-system)
(inputs
`(("zlib" ,zlib)
("flex" ,flex)
("bison" ,bison)))
+ (outputs '("out" "metis"))
(arguments
- `(#:phases
+ `(#:make-flags (list (string-append "prefix=" %output))
+ #:phases
(modify-phases %standard-phases
(add-after
'unpack 'chdir-to-src
'("COMMON_FILE_COMPRESS_GZ"
"COMMON_PTHREAD"
"COMMON_RANDOM_FIXED_SEED"
- "INTSIZE64" ;use 'long' instead of 'int'
+ "INTSIZE64" ;use 'int64_t'
;; Prevents symbolc clashes with libesmumps
"SCOTCH_RENAME"
;; XXX: Causes invalid frees in superlu-dist tests
(invoke "make"
(format #f "-j~a" (parallel-job-count))
"esmumps")))
- (replace
- 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (mkdir out)
- (invoke "make"
- (string-append "prefix=" out)
- "install")
- ;; esmumps files are not installed with the above
- (for-each (lambda (f)
- (copy-file f (string-append out "/include/" f)))
- (find-files "../include" ".*esmumps.h$"))
- (for-each (lambda (f)
- (copy-file f (string-append out "/lib/" f)))
- (find-files "../lib" "^lib.*esmumps.*"))
- #t))))))
+ (add-before 'install 'make-install-dirs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (mkdir (assoc-ref outputs "out"))))
+ (add-after 'install 'install-metis
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "metis")))
+ (mkdir out)
+ ;; metis files are not installed with 'make install'
+ (for-each (lambda (f)
+ (install-file f (string-append out "/include")))
+ (find-files "../include/" ".*metis\\.h"))
+ (for-each (lambda (f)
+ (install-file f (string-append out "/lib")))
+ (find-files "../lib/" ".*metis\\..*"))
+ #t))))))
(home-page "http://www.labri.fr/perso/pelegrin/scotch/")
(synopsis "Programs and libraries for graph algorithms")
(description "SCOTCH is a set of programs and libraries which implement
(define-public maxima
(package
(name "maxima")
- (version "5.42.1")
+ (version "5.42.2")
(source
(origin
(method url-fetch)
version "-source/" name "-" version ".tar.gz"))
(sha256
(base32
- "1ka0xf70a55ndgmyrq7p5xxbd78pq7bfkqhgxsivaqdw6gn5lmcg"))
+ "0kdncy6137sg3rradirxzj10mkcvafxd892zlclwhr9sa7b12zhn"))
(patches (search-patches "maxima-defsystem-mkdir.patch"))))
(build-system gnu-build-system)
(inputs
`(("gcl" ,gcl)
("gnuplot" ,gnuplot) ;for plots
+ ("sed" ,sed)
("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima'
(native-inputs
`(("texinfo" ,texinfo)
#:make-flags (list "TMPDIR=/tmp")
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed"))
+ (coreutils (assoc-ref inputs "coreutils"))
+ (dirname (string-append coreutils "/bin/dirname"))
+ (head (string-append coreutils "/bin/head")))
+ (substitute* "src/maxima.in"
+ (("sed ") (string-append sed " "))
+ (("dirname") dirname)
+ (("head") head))
+ #t)))
(add-before 'check 'pre-check
(lambda _
(chmod "src/maxima" #o555)
(define-public wxmaxima
(package
(name "wxmaxima")
- (version "18.11.4")
+ (version "19.01.3")
(source
(origin
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32
- "1sz8n9v23q442l7yjj67pjh0dk78rl4cbcc3j8m1bm88anlfxl9r"))))
+ "1vwahx3zxkn3qlv4z0fm7v8wh0wspvs026alrh7ff7s0c2dcy95x"))))
(build-system cmake-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)))
(define-public dealii
(package
(name "dealii")
- (version "8.5.1")
+ (version "9.0.1")
(source
(origin
(method url-fetch)
"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
(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
+ ,%openmpi-setup)))))
(synopsis "Finite element library (with MPI support)")))
(define-public flann
`(("doc++" ,doc++)
("netpbm" ,netpbm)
("perl" ,perl) ;needed to run 'ppmquant' during tests
- ("texlive" ,texlive) ;full package required for fonts
+ ("texlive" ,(texlive-union (list texlive-generic-xypic
+ texlive-fonts-xypic
+ texlive-latex-hyperref
+ texlive-bibtex)))
("ghostscript" ,ghostscript)))
(inputs
`(("blas" ,openblas)
"--with-blas")
#:phases
(modify-phases %standard-phases
+ (add-before 'build 'set-HOME
+ (lambda _
+ ;; FIXME: texlive-union does not find the built
+ ;; metafonts, so it tries to generate them in HOME.
+ (setenv "HOME" "/tmp")
+ #t))
(add-before 'configure 'chdir-src
(lambda _ (chdir "src")))
(replace 'configure
configure-flags)))))))
(add-after 'build 'build-docs
(lambda _
- (zero? (system* "make" "-Cdocs" "pdf" "html"))))
+ (invoke "make" "-Cdocs" "pdf" "html")))
(replace 'check
(lambda _
(setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
(define-public z3
(package
(name "z3")
- (version "4.8.1")
+ (version "4.8.4")
(home-page "https://github.com/Z3Prover/z3")
(source (origin
(method git-fetch)
(uri (git-reference (url home-page)
(commit (string-append "z3-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1vr57bwx40sd5riijyrhy70i2wnv9xrdihf6y5zdz56yq88rl48f"))))
- (build-system cmake-build-system)
+ "014igqm5vwswz0yhz0cdxsj3a6dh7i79hvhgc3jmmmz3z0xm1gyn"))))
+ (build-system gnu-build-system)
(arguments
- `(#:configure-flags
- (list "-DBUILD_PYTHON_BINDINGS=true"
- "-DINSTALL_PYTHON_BINDINGS=true"
- (string-append "-DCMAKE_INSTALL_PYTHON_PKG_DIR="
- %output
- "/lib/python2.7/site-packages"))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-compatability
+ ;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only.
+ (lambda _
+ (substitute* "src/util/mpz.cpp"
+ (("#include <immintrin.h>") ""))
+ #t))
(add-before 'configure 'bootstrap
(lambda _
(zero?
- (system* "python" "contrib/cmake/bootstrap.py" "create"))))
+ (system* "python" "scripts/mk_make.py"))))
+ ;; work around gnu-build-system's setting --enable-fast-install
+ ;; (z3's `configure' is a wrapper around the above python file,
+ ;; which fails when passed --enable-fast-install)
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (invoke "./configure"
+ (string-append "--prefix=" (assoc-ref outputs "out")))))
+ (add-after 'configure 'change-directory
+ (lambda _
+ (chdir "build")
+ #t))
(add-before 'check 'make-test-z3
(lambda _
;; Build the test suite executable.
;; Run all the tests that don't require arguments.
(zero? (system* "./test-z3" "/a")))))))
(native-inputs
- `(("python" ,python-2)))
+ `(("which" ,which)
+ ("python" ,python-wrapper)))
(synopsis "Theorem prover")
(description "Z3 is a theorem prover and @dfn{satisfiability modulo
theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.")
(license license:expat)))
-(define-public cubicle
+(define-public elpa
(package
- (name "cubicle")
- (version "1.1.2")
+ (name "elpa")
+ (version "2018.11.001")
(source (origin
(method url-fetch)
- (uri (string-append "http://cubicle.lri.fr/cubicle-"
- version ".tar.gz"))
+ (uri (string-append "http://elpa.mpcdf.mpg.de/html/Releases/"
+ version "/elpa-" version ".tar.gz"))
(sha256
(base32
- "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
+ "05hv3v5i6xmziaizw350ff72y1c3k662r85fm3xfdrkclj5zw9yc"))))
(build-system gnu-build-system)
(native-inputs
- `(("automake" ,automake)
- ("ocaml" ,ocaml)
- ("which" ,(@@ (gnu packages base) which))))
- (propagated-inputs
- `(("ocaml-num" ,ocaml-num)
- ("z3" ,z3)))
+ `(("fortran" ,gfortran)
+ ("perl" ,perl))) ;for configure and deps
+ (inputs
+ `(("blas" ,openblas)))
(arguments
- `(#:configure-flags (list "--with-z3")
- #:make-flags (list "QUIET=")
- #:tests? #f
+ `(#: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 'configure-for-release
- (lambda _
- (substitute* "Makefile.in"
- (("SVNREV=") "#SVNREV="))
- #t))
- (add-before 'configure 'fix-/bin/sh
+ (add-before 'configure 'patch-header-generation
(lambda _
(substitute* "configure"
- (("-/bin/sh") (string-append "-" (which "sh"))))
+ (("^ *make.*top_srcdir=\"\\$srcdir\"" &)
+ (string-append & " CPP=\"$CPP\"")))
#t))
- (add-before 'configure 'fix-smt-z3wrapper.ml
+ (add-before 'check 'setup-tests
(lambda _
- (substitute* "Makefile.in"
- (("\\\\n") ""))
- #t))
- (add-before 'configure 'fix-ocaml-num
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "Makefile.in"
- (("= \\$\\(FUNCTORYLIB\\)")
- (string-append "= -I "
- (assoc-ref inputs "ocaml-num")
- "/lib/ocaml/site-lib"
- " $(FUNCTORYLIB)")))
+ ;; 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://cubicle.lri.fr/")
- (synopsis "Model checker for array-based systems")
- (description "Cubicle is a model checker for verifying safety properties
-of array-based systems. This is a syntactically restricted class of
-parametrized transition systems with states represented as arrays indexed by
-an arbitrary number of processes. Cache coherence protocols and mutual
-exclusion algorithms are typical examples of such systems.")
- (license license:asl2.0)))
+ (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")
(version "0.87.7")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/elemental/Elemental/"
- "archive/v" version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/elemental/Elemental.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1nfp82w22pi8x8fg9sc37z8kf84dqi1dhxp8bbk7571y4aygvv3v"))))
+ "1687xpjjzig27y2pnqv7hv09smpijyfdpz7qjgmcxf4shfajlfkc"))))
(build-system cmake-build-system)
(home-page "http://libelemental.org")
(native-inputs
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DGFORTRAN_LIB=gfortran")
#:phases (modify-phases %standard-phases
- (add-before 'check 'mpi-setup
- ,%openmpi-setup)
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup)
(add-before 'check 'setup-tests
(lambda _
;; Parallelism is done at the MPI layer.
;; Tests are installed, with no easy configuration
;; switch to prevent this, so delete them.
(delete-file-recursively
- (string-append (assoc-ref outputs "out") "/bin"))
+ (string-append (assoc-ref outputs "out") "/bin"))
#t)))))
(synopsis "Dense and sparse-direct linear algebra and optimization")
(description "Elemental is a modern C++ library for distributed-memory
(add-before 'check 'mpi-setup
,%openmpi-setup)))))
(synopsis "SUNDIALS with OpenMPI support")))
+
+(define-public combinatorial-blas
+ (package
+ (name "combinatorial-blas")
+ (version "1.6.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://eecs.berkeley.edu/~aydin/CombBLAS_FILES/"
+ "CombBLAS_beta_"
+ (match (string-split version #\.)
+ ((major minor patch)
+ (string-append major minor "_" patch))) ;e.g. "16_2"
+ ".tgz"))
+ (sha256
+ (base32
+ "1a9wbgdqyy1whhfc0yl0yqkax3amnqa6iihhq48d063gc0jwfd9a"))
+ (patches (search-patches "combinatorial-blas-awpm.patch"
+ "combinatorial-blas-io-fix.patch"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("mpi" ,openmpi)
+ ("test-data" ,(origin
+ (method url-fetch)
+ (uri (string-append "https://people.eecs.berkeley.edu/~aydin/"
+ "CombBLAS_FILES/testdata_combblas1.6.1.tgz"))
+ (sha256
+ (base32
+ "01y2781cy3fww7znmidrp85mf8zx0c905w5vzvk1mgrmhhynim87"))))))
+ (arguments
+ `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
+ "-DCMAKE_CXX_FLAGS=-DUSE_FUNNEL")
+ #:parallel-tests? #f ;tests use 'mpiexec -n4'
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup)
+ (add-before 'check 'test-setup
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "OMP_NUM_THREADS" "2")
+ (invoke "tar" "xf" (assoc-ref inputs "test-data")))))))
+ (home-page "https://people.eecs.berkeley.edu/~aydin/CombBLAS/html/")
+ (synopsis "Linear algebra primitives for graph analytics")
+ (description "The Combinatorial BLAS (CombBLAS) is an extensible
+distributed-memory parallel graph library offering a small but powerful set of
+linear algebra primitives specifically targeting graph analytics.")
+ (license (list
+ license:gpl2+ ;include/psort/(funnel|sort)*.h
+ license:x11 ;usort and psort
+ license:bsd-3)))) ;CombBLAS and MersenneTwister.h
+
+(define-public dune-common
+ (package
+ (name "dune-common")
+ (version "2.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dune-project.org/download/"
+ version "/dune-common-" version ".tar.gz"))
+ (sha256
+ (base32
+ "019wcr1qf7jwyxx1y5y290wdlglylskvbb2m01ljkzcza2xnlmhw"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags)))
+ ;; These tests fail because they require a fully functional MPI
+ ;; environment.
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (setenv "ARGS"
+ (string-append "--exclude-regex '("
+ (string-join
+ (list
+ "remoteindicestest"
+ "remoteindicestest-mpi-2"
+ "syncertest"
+ "syncertest-mpi-2"
+ "variablesizecommunicatortest"
+ "variablesizecommunicatortest-mpi-2"
+ "arithmetictestsuitetest"
+ "assertandreturntest"
+ "assertandreturntest_ndebug"
+ "concept"
+ "debugaligntest"
+ "mpicollectivecommunication"
+ "mpicollectivecommunication-mpi-2"
+ "mpiguardtest"
+ "mpiguardtest-mpi-2"
+ "mpihelpertest"
+ "mpihelpertest-mpi-2"
+ "mpihelpertest2"
+ "mpihelpertest2-mpi-2")
+ "|")
+ ")'"))
+ #t)))))
+ (inputs
+ `(("gmp" ,gmp)
+ ("metis" ,metis)
+ ("openmpi" ,openmpi)
+ ("openblas" ,openblas)
+ ("python" ,python)
+ ("superlu" ,superlu)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "DUNE, the Distributed and Unified Numerics Environment is a
+modular toolbox for solving @dfn{partial differential equations} (PDEs) with
+grid-based methods. It supports the easy implementation of methods like
+@dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
+Differences} (FD).")
+ ;; GPL version 2 with "runtime exception" to make it behave like LGPLv2.
+ (license license:gpl2)))
+
+(define-public dune-geometry
+ (package
+ (name "dune-geometry")
+ (version "2.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dune-project.org/download/"
+ version "/dune-geometry-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0hlaaxjyv9j05blasvb67sy02hd0w4g9znf68gdh3l731dd1aqbn"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags))))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("openmpi" ,openmpi)
+ ;; Optional
+ ("openblas" ,openblas)
+ ("gmp" ,gmp)
+ ("python" ,python)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "DUNE, the Distributed and Unified Numerics Environment is a
+modular toolbox for solving @dfn{partial differential equations} (PDEs) with
+grid-based methods. It supports the easy implementation of methods like
+@dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
+Differences} (FD).
+
+This package contains the basic DUNE geometry classes.")
+ ;; GPL version 2 with "runtime exception"
+ (license license:gpl2)))
+
+(define-public dune-grid
+ (package
+ (name "dune-grid")
+ (version "2.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dune-project.org/download/"
+ version "/dune-grid-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1jp4vscm9yb9xg0lh7apzccfkhvgbnk652yahigmh3cvzpl4acd0"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags)))
+ ;; These tests fail because they require a fully functional MPI
+ ;; environment.
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (setenv "ARGS"
+ (string-append "--exclude-regex '("
+ (string-join
+ (list
+ "scsgmappertest"
+ "conformvolumevtktest"
+ "gnuplottest"
+ "nonconformboundaryvtktest"
+ "subsamplingvtktest"
+ "vtktest"
+ "vtktest-mpi-2"
+ "vtksequencetest"
+ "gmshtest-onedgrid"
+ "test-dgf-yasp"
+ "test-dgf-yasp-offset"
+ "test-dgf-oned"
+ "test-geogrid-yaspgrid"
+ "test-gridinfo"
+ "test-identitygrid"
+ "testiteratorranges"
+ "test-hierarchicsearch"
+ "test-parallel-ug-mpi-2"
+ "test-yaspgrid-backuprestore-equidistant"
+ "test-yaspgrid-backuprestore-equidistant-mpi-2"
+ "test-yaspgrid-backuprestore-equidistantoffset"
+ "test-yaspgrid-backuprestore-equidistantoffset-mpi-2"
+ "test-yaspgrid-backuprestore-tensor"
+ "test-yaspgrid-backuprestore-tensor-mpi-2"
+ "test-yaspgrid-tensorgridfactory"
+ "test-yaspgrid-tensorgridfactory-mpi-2"
+ "test-yaspgrid-yaspfactory-1d"
+ "test-yaspgrid-yaspfactory-1d-mpi-2"
+ "test-yaspgrid-yaspfactory-2d"
+ "test-yaspgrid-yaspfactory-2d-mpi-2"
+ "test-yaspgrid-yaspfactory-3d"
+ "test-yaspgrid-yaspfactory-3d-mpi-2"
+ "globalindexsettest"
+ "persistentcontainertest"
+ "structuredgridfactorytest"
+ "tensorgridfactorytest"
+ "vertexordertest")
+ "|")
+ ")'"))
+ #t)))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("dune-geometry" ,dune-geometry)
+ ("gmp" ,gmp)
+ ("metis" ,metis)
+ ("openblas" ,openblas)
+ ("openmpi" ,openmpi)
+ ("python" ,python)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "DUNE, the Distributed and Unified Numerics Environment is a
+modular toolbox for solving @dfn{partial differential equations} (PDEs) with
+grid-based methods. It supports the easy implementation of methods like
+@dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
+Differences} (FD).
+
+This package contains the basic DUNE grid classes.")
+ ;; GPL version 2 with "runtime exception"
+ (license license:gpl2)))
+
+(define-public dune-istl
+ (package
+ (name "dune-istl")
+ (version "2.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dune-project.org/download/"
+ version "/dune-istl-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0l2gyrvys5w6wsmk0ckbb7295s80b7yk7qrl7x66akv2jv1nzq2w"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags)))
+ ;; These tests fail because they require a fully functional MPI
+ ;; environment.
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ (setenv "ARGS"
+ (string-append "--exclude-regex '("
+ (string-join
+ (list
+ "galerkintest"
+ "hierarchytest"
+ "pamgtest"
+ "pamg_comm_repart_test"
+ "matrixredisttest"
+ "vectorcommtest"
+ "matrixmarkettest")
+ "|")
+ ")'"))
+ #t)))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("openmpi" ,openmpi)
+ ;; Optional
+ ("metis" ,metis)
+ ("superlu" ,superlu)
+ ("openblas" ,openblas)
+ ("gmp" ,gmp)
+ ("python" ,python)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "DUNE, the Distributed and Unified Numerics Environment is a
+modular toolbox for solving @dfn{partial differential equations} (PDEs) with
+grid-based methods.
+
+This is the iterative solver template library which provides generic sparse
+matrix/vector classes and a variety of solvers based on these classes. A
+special feature is the use of templates to exploit the recursive block
+structure of finite element matrices at compile time. Available solvers
+include Krylov methods, (block-) incomplete decompositions and
+aggregation-based algebraic multigrid.")
+ ;; GPL version 2 with "runtime exception"
+ (license license:gpl2)))
+
+(define-public dune-localfunctions
+ (package
+ (name "dune-localfunctions")
+ (version "2.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dune-project.org/download/"
+ version "/dune-localfunctions-" version ".tar.gz"))
+ (sha256
+ (base32
+ "19c6zjinwwpy8jh4v4prhphyd438rapd4x80fj93apmwgw04nrhl"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags))))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("dune-geometry" ,dune-geometry)
+ ("openmpi" ,openmpi)
+ ;; Optional
+ ("metis" ,metis)
+ ("superlu" ,superlu)
+ ("gmp" ,gmp)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment") ; TODO
+ (description "This DUNE module provides interface and implementation for
+shape functions defined on the DUNE reference elements. In addition to the
+shape function, interpolation operators and special keys are provided which
+can be used to assemble global function spaces on finite-element grids.
+
+This package provides an interface and implementation for shape functions
+defined on the DUNE reference elements. In addition to the shape function,
+interpolation operators and special keys are provided which can be used to
+assemble global function spaces on finite-element grids.")
+ ;; GPL version 2 with "runtime exception"
+ (license license:gpl2)))
+
+(define-public dune-alugrid
+ (package
+ (name "dune-alugrid")
+ (version "2.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dune-project.org/download/"
+ version "/dune-alugrid-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1l9adgyjpra8mvwm445s0lpjshnb63jag85fb2hisbjn6bm320yj"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; 7 of 8 tests fail because they need a full MPI
+ ; environment
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-include
+ (lambda _
+ (substitute* "dune/alugrid/test/test-alugrid.cc"
+ (("doc/grids/gridfactory/testgrids")
+ "doc/dune-grid/grids/gridfactory/testgrids"))
+ #t))
+ (add-after 'build 'build-tests
+ (lambda* (#:key inputs make-flags #:allow-other-keys)
+ (setenv "CPLUS_INCLUDE_PATH"
+ (string-append (assoc-ref inputs "dune-grid") "/share:"
+ (getenv "CPLUS_INCLUDE_PATH")))
+ (apply invoke "make" "build_tests" make-flags))))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("dune-geometry" ,dune-geometry)
+ ("dune-grid" ,dune-grid)
+ ("openmpi" ,openmpi)
+ ;; Optional
+ ("metis" ,metis)
+ ("openblas" ,openblas)
+ ("python" ,python)
+ ("superlu" ,superlu)
+ ("gmp" ,gmp)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "ALUGrid is an adaptive, loadbalancing, unstructured
+implementation of the DUNE grid interface supporting either simplices or
+cubes.")
+ (license license:gpl2+)))
+
+(define-public dune-typetree
+ (package
+ (name "dune-typetree")
+ (version "2.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.dune-project.org/staging/dune-typetree.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mnv6w2f22lz3j4bdpdjq55vjm8xxfx9v4vvhg9bd36xpsbjpjp9"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'build-tests
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (apply invoke "make" "build_tests" make-flags))))))
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("openmpi" ,openmpi)
+ ;; Optional
+ ("openblas" ,openblas)
+ ("python" ,python)
+ ("metis" ,metis)
+ ("superlu" ,superlu)
+ ("gmp" ,gmp)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "TypeTree is a template library for constructing and
+operating on statically typed trees of objects.")
+ ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
+ (license (list license:lgpl3+ license:gpl2))))
+
+(define-public dune-functions
+ (package
+ (name "dune-functions")
+ (version "2.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.dune-project.org/staging/dune-functions.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1an8gb477n8j0kzpbrv7nr1snh8pxip0gsxq6w63jc83gg3dj200"))))
+ (build-system cmake-build-system)
+ (arguments `(#:tests? #f)) ; FIXME: tests require dune-uugrid
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("dune-istl" ,dune-istl)
+ ("dune-localfunctions" ,dune-localfunctions)
+ ("dune-grid" ,dune-grid)
+ ("dune-geometry" ,dune-geometry)
+ ("dune-typetree" ,dune-typetree)
+ ("openmpi" ,openmpi)
+ ("openblas" ,openblas)
+ ("metis" ,metis)
+ ("python" ,python)
+ ("superlu" ,superlu)
+ ("gmp" ,gmp)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Distributed and Unified Numerics Environment")
+ (description "The dune-functions module provides an abstraction layer for
+global finite element functions. Its two main concepts are functions
+implemented as callable objects, and bases of finite element spaces.")
+ ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
+ (license (list license:lgpl3+ license:gpl2))))
+
+(define-public dune-pdelab
+ (package
+ (name "dune-pdelab")
+ (version "2.6.0-rc1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.dune-project.org/pdelab/dune-pdelab")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "07g0s9448z65vjrq88g5rv3340iifil85k170n8kbqchsvi4ny5v"))))
+ (build-system cmake-build-system)
+ (arguments '(#:tests? #f)) ; XXX: the tests cannot be compiled
+ (inputs
+ `(("dune-common" ,dune-common)
+ ("dune-istl" ,dune-istl)
+ ("dune-localfunctions" ,dune-localfunctions)
+ ("dune-geometry" ,dune-geometry)
+ ("dune-grid" ,dune-grid)
+ ("dune-typetree" ,dune-typetree)
+ ("dune-functions" ,dune-functions)
+ ("openmpi" ,openmpi)
+ ;; Optional
+ ("openblas" ,openblas)
+ ("eigen" ,eigen)
+ ("metis" ,metis)
+ ("python" ,python)
+ ("superlu" ,superlu)
+ ("gmp" ,gmp)))
+ (native-inputs
+ `(("gfortran" ,gfortran)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://dune-project.org/")
+ (synopsis "Differential equations solver toolbox")
+ (description "PDELab is a partial differential equations solver toolbox
+built on top of DUNE, the Distributed and Unified Numerics Environment.")
+ ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
+ (license (list license:lgpl3+ license:gpl2))))