From bbe46a4af5972b3b5b434fe5d99ec9a0078b0ab8 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 16 Aug 2018 15:47:41 -0500 Subject: mpi: Factorize openmpi setup build phase. * gnu/packages/mpi.scm (%openmpi-setup): New variable. * gnu/packages/maths.scm (scalapack, slepc-openmpi, mumps-openmpi) (superlu-dist, p4est, petsc-openmpi, hypre-openmpi, elemental) (sundials-openmpi, arpack-ng-openmpi)[arguments]: Use it in #:phases. --- gnu/packages/mpi.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'gnu/packages/mpi.scm') diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index f34b08e4ca..7dfec16fc7 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Eric Bavier +;;; Copyright © 2014, 2015, 2018 Eric Bavier ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès ;;; Copyright © 2014 Ian Denhardt ;;; Copyright © 2016 Andreas Enge @@ -250,3 +250,15 @@ (define-public openmpi-thread-multiple work correctly with all transports (such as @code{openib}), and the performance is generally worse than the vanilla @code{openmpi} package, which only provides @code{MPI_THREAD_FUNNELED}."))) + +;;; Build phase to be used for packages that execute MPI code. +(define-public %openmpi-setup + '(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 "false")) + ;; Allow oversubscription in case there are less physical cores available + ;; in the build environment than the package wants while testing. + (setenv "OMPI_MCA_rmaps_base_oversubscribe" "yes") + #t)) -- cgit v1.2.3