From 71ca16b58d20aa26157acc4c345c0af80ec8df5d Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Mon, 3 Sep 2018 11:57:38 +0100 Subject: gnu: petsc-openmpi: Configure with support for hdf5 data format. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/maths.scm (petsc-openmpi)[inputs]: Add hdf5-parallel-openmpi. [arguments]: Add '--with-hdf5-include' and '--with-hdf5-lib' flags. Add 'set-test-environment' phase. Signed-off-by: Ludovic Courtès --- gnu/packages/maths.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 50c0a320e0..42136f65ea 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2016, 2017, 2018 Ludovic Courtès ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Thomas Danckaert -;;; Copyright © 2017 Paul Garlick +;;; Copyright © 2017, 2018 Paul Garlick ;;; Copyright © 2017 Nils Gillmann ;;; Copyright © 2017 Ben Woodcroft ;;; Copyright © 2017 Theodoros Foradis @@ -1685,6 +1685,7 @@ (define-public petsc-openmpi (name "petsc-openmpi") (inputs `(("openmpi" ,openmpi) + ("hdf5" ,hdf5-parallel-openmpi) ,@(package-inputs petsc))) (arguments (substitute-keyword-arguments (package-arguments petsc) @@ -1692,7 +1693,21 @@ (define-public petsc-openmpi ``("--with-mpiexec=mpirun" ,(string-append "--with-mpi-dir=" (assoc-ref %build-inputs "openmpi")) - ,@(delete "--with-mpi=0" ,cf))))) + ,(string-append "--with-hdf5-include=" + (assoc-ref %build-inputs "hdf5") "/include") + ,(string-append "--with-hdf5-lib=" + (assoc-ref %build-inputs "hdf5") "/lib/libhdf5.a") + ,@(delete "--with-mpi=0" ,cf))) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'check 'set-test-environment + (lambda _ + ;; By default, running the test suite would fail because 'ssh' + ;; could not be found in $PATH. Define this variable to + ;; placate Open MPI without adding a dependency on OpenSSH (the + ;; agent isn't used anyway.) + (setenv "OMPI_MCA_plm_rsh_agent" (which "cat")) + #t)))))) (synopsis "Library to solve PDEs (with MPI support)"))) (define-public petsc-complex-openmpi -- cgit v1.2.3