[Pkg-scicomp-devel] Bug#576276: mpich-bin: No way to force using ssh instead of rsh

Samuel Thibault sthibault at debian.org
Fri Apr 2 13:37:58 UTC 2010


Package: mpich-bin
Version: 1.2.7-9.1
Severity: important
tags: patch

Hello,

I want to use mpich on a machine I'm not root on, and that has the
rsh-client package installed. The problem is that when I run

mpirun.mpich -machinefile machines -np 2 ./test

mpirun runs /usr/bin/rsh by default, which thus tries to use the rsh
protocol, which is not supported by the particular machines I want to
connect to.  It seems there is no way to change it into /usr/bin/ssh:
none of the following work:

RSHCOMMAND=ssh mpirun.mpich -machinefile machines -np 2 ./test
mpirun.mpich -rsh ssh -machinefile machines -np 2 ./test

Indeed, mpirun.mpich forces RSHCOMMAND to /usr/bin/rsh, and although
mpirun.ch_p4.args indeed parses -rsh ssh, it gets overriden by further
parameter parsing:

$ sh -x /usr/bin/mpirun.mpich -machinefile machines -np 2 -rsh ssh ./test
...
+ RSHCOMMAND=/usr/bin/rsh
...
+ . /usr/lib/mpich/bin/mpirun.args
...
++ arg=-rsh
++ shift
++ case $arg in
...
++ . /usr/lib/mpich/bin/mpirun.ch_p4.args
+++ setrshcmd=no
...
+++ rshcmd=ssh
+++ setrshcmd=yes
...
++ arg=./test
++ shift
++ case $arg in
...
++ . /usr/lib/mpich/bin/mpirun.ch_p4.args
+++ setrshcmd=no

And indeed, mpirun.ch_p4 reads as 
# Last rshcmd steps
if [ "$setrshcmd" = "yes" ] ; then
    P4_RSHCOMMAND="$rshcmd"
fi
if [ -n "$P4_RSHCOMMAND" ] ; then
    export P4_RSHCOMMAND
fi

Could the attached patch be perhaps applied to fix this?

Samuel

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.33 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mpich-bin depends on:
ii  libc6                         2.10.2-6   Embedded GNU C Library: Shared lib
ii  libmpich1.0gf                 1.2.7-9.1  mpich runtime shared library
ii  openssh-client [rsh-client]   1:5.3p1-3  secure shell (SSH) client, for sec

mpich-bin recommends no packages.

Versions of packages mpich-bin suggests:
ii  libmpich1.0-dev               1.2.7-9.1  mpich static libraries and develop
ii  mpi-doc                       1.2.7-9.1  Documentation for the MPICH MPI im
pn  rsh-server                    <none>     (no description available)
ii  tk8.4 [wish]                  8.4.19-4   Tk toolkit for Tcl and X11, v8.4 -
ii  tk8.5 [wish]                  8.5.8-1    Tk toolkit for Tcl and X11, v8.5 -
ii  tk8.6 [wish]                  8.6.0~b1-2 Tk toolkit for Tcl and X11, v8.6 -
pn  update-cluster                <none>     (no description available)

-- no debconf information

-- 
Samuel Thibault <samuel.thibault at fnac.net>
`When you say "I wrote a program that crashed Windows", people just stare at
you blankly and say "Hey, I got those with the system, *for free*".'
(By Linus Torvalds)
-------------- next part --------------
--- ./mpid/ch_p4/mpirun.ch_p4.in.orig	2010-04-02 15:37:16.000000000 +0200
+++ ./mpid/ch_p4/mpirun.ch_p4.in	2010-04-02 15:37:27.000000000 +0200
@@ -190,7 +190,7 @@
 # startpgm="$startpgm < $stdinfile"
 #fi
 # Last rshcmd steps
-if [ "$setrshcmd" = "yes" ] ; then
+if [ -n "$rshcmd" ] ; then
     P4_RSHCOMMAND="$rshcmd"
 fi
 if [ -n "$P4_RSHCOMMAND" ] ; then


More information about the Pkg-scicomp-devel mailing list