GNU bug report logs - #74940
[PATCH] gnu: openmpi-4: Fix hardcoded call to ssh command.

Previous Next

Package: guix-patches;

Reported by: Romain GARBAGE <romain.garbage <at> inria.fr>

Date: Wed, 18 Dec 2024 09:45:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#74940: closed ([PATCH] gnu: openmpi-4: Fix hardcoded call to
 ssh command.)
Date: Mon, 23 Dec 2024 17:21:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 23 Dec 2024 18:20:03 +0100
with message-id <87zfkm8gfw.fsf <at> gnu.org>
and subject line Re: [bug#74940] [PATCH] gnu: openmpi-4: Fix hardcoded call to ssh command.
has caused the debbugs.gnu.org bug report #74940,
regarding [PATCH] gnu: openmpi-4: Fix hardcoded call to ssh command.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
74940: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74940
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Romain GARBAGE <romain.garbage <at> inria.fr>
To: guix-patches <at> gnu.org
Cc: ludovic.courtes <at> inria.fr, Romain GARBAGE <romain.garbage <at> inria.fr>
Subject: [PATCH] gnu: openmpi-4: Fix hardcoded call to ssh command.
Date: Wed, 18 Dec 2024 10:37:39 +0100
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
---
The runtime error can be reproduced with:
---8<------------------>8---
$ guix shell -C openmpi <at> 4 hello -- mpirun -np 2 hello
--------------------------------------------------------------------------
The value of the MCA parameter "plm_rsh_agent" was set to a path
that could not be found:

  plm_rsh_agent: ssh : rsh

Please either unset the parameter, or check that the path is correct
--------------------------------------------------------------------------
[guix-A102:00001] [[INVALID],INVALID] FORCE-TERMINATE AT Not found:-13 - error plm_rsh_component.c(335)
---8<------------------>8---

The size of the closure as given by guix size is 406.7 MiB after the
patch vs 398.3 MiB before the patch.
---
 gnu/packages/mpi.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 661531abb9..60a1952809 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -53,6 +53,7 @@ (define-module (gnu packages mpi)
   #: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 @@ (define-public openmpi-4
                      gfortran
                      libfabric
                      libevent
-                     opensm)
+                     opensm
+                     openssh-sans-x)
                (if-supported psm)
                (if-supported psm2)
                (if-supported ucx)
@@ -291,6 +293,13 @@ (define-public openmpi-4
                            '("./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)
+                       (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"

base-commit: cd018214a3c0319451ab46855ea395b2be6a15dc
-- 
2.46.0



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Romain GARBAGE <romain.garbage <at> inria.fr>
Cc: 74940-done <at> debbugs.gnu.org
Subject: Re: [bug#74940] [PATCH] gnu: openmpi-4: Fix hardcoded call to ssh
 command.
Date: Mon, 23 Dec 2024 18:20:03 +0100
Hi there! :-)

Romain GARBAGE <romain.garbage <at> inria.fr> skribis:

> 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

I added a one-line comment in the source to explain, tweaked the commit
log, and committed.

Thanks for fixing this!

Ludo’.


This bug report was last modified 145 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.