summaryrefslogtreecommitdiff
path: root/gnu/packages/mpi.scm
diff options
context:
space:
mode:
authorRomain GARBAGE <romain.garbage@inria.fr>2024-12-18 10:37:39 +0100
committerLudovic Courtès <ludo@gnu.org>2024-12-23 20:45:31 +0100
commitecb8ca6266484d4f896f155b38d3c8ea122450da (patch)
tree213f4ffbb53a215e064905eefe3dd06747dfdcde /gnu/packages/mpi.scm
parent8b94d3d5b1963e2ddce0431c64a6e1c2ba173f7f (diff)
gnu: openmpi@4: Hard-code file name of ‘ssh’ command.
This patch fixes a runtime error when launching an MPI program using mpiexec/mpirun in an environment where the ssh command is not available. * gnu/packages/mpi.scm (openmpi-4)[inputs]: Add openssh-sans-x. (openmpi-4)[arguments]: Fix path in code. Change-Id: I65255186c37b6eaba3c283c7046163abc2cb38b7 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/mpi.scm')
-rw-r--r--gnu/packages/mpi.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 661531abb9..157bbfdecd 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -53,6 +53,7 @@
#:use-module (gnu packages parallel)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages ssh)
#:use-module (gnu packages valgrind)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match))
@@ -220,7 +221,8 @@ bind processes, and much more.")
gfortran
libfabric
libevent
- opensm)
+ opensm
+ openssh-sans-x)
(if-supported psm)
(if-supported psm2)
(if-supported ucx)
@@ -291,6 +293,14 @@ bind processes, and much more.")
'("./ompi/mca/io/romio321/src/io_romio321_component.c")
(("MCA_io_romio321_COMPLETE_CONFIGURE_FLAGS")
"\"[elided to reduce closure]\""))))
+ (add-before 'build 'ssh-absolute-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Avoid error at run time about 'ssh' not being found.
+ (substitute* "orte/mca/plm/rsh/plm_rsh_component.c"
+ (("mca_plm_rsh_component.agent = \"ssh : rsh\";")
+ (format #f "mca_plm_rsh_component.agent = \"~a : rsh\";"
+ (search-input-file inputs
+ "bin/ssh"))))))
(add-before 'build 'scrub-timestamps ;reproducibility
(lambda _
(substitute* '("ompi/tools/ompi_info/param.c"