[mvapich-discuss] mpirun_rsh does not work with newer linux kernels
PHILIPP, Axel, Dr.
axel.philipp at mtu.de
Wed Feb 15 03:19:47 EST 2012
After upgrading to kernel 2.6.32.49-0.3-default (SLES11 SP1) mpirun_rsh
and mpispawn fail with bind errors.
Another problem arises with killing the remote processes because now rsh
and ssh use the user's shell instead of /bin/sh to execute commands.
Therefor the bash only syntax fails if the user's shell is ksh.
The following patches (applied to package mvapich-1.2.0-3635) resolve
both problems:
--- mpispawn.c.ori 2010-01-28 16:00:51.000000000 +0100
+++ mpispawn.c 2012-02-14 17:15:29.802596012 +0100
@@ -380,6 +380,7 @@
}
mc_sockaddr.sin_addr.s_addr = INADDR_ANY;
+ mc_sockaddr.sin_family = AF_INET;
mc_sockaddr.sin_port = 0;
if(bind(*mc_socket, (struct sockaddr *)&mc_sockaddr,
mc_sockaddr_len) < 0) { @@ -461,6 +462,7 @@
exit (EXIT_FAILURE);
}
c_sockaddr.sin_addr.s_addr = INADDR_ANY;
+ c_sockaddr.sin_family = AF_INET;
c_sockaddr.sin_port = 0;
if (bind (c_socket, (struct sockaddr *) &c_sockaddr, sockaddr_len)
< 0) {
--- mpirun_rsh.c.ori 2010-01-28 16:00:51.000000000 +0100
+++ mpirun_rsh.c 2012-02-14 17:08:59.074910138 +0100
@@ -488,6 +488,7 @@
exit(EXIT_FAILURE);
}
sockaddr.sin_addr.s_addr = INADDR_ANY;
+ sockaddr.sin_family = AF_INET;
sockaddr.sin_port = 0;
if (bind(s, (struct sockaddr *) &sockaddr, sockaddr_len) < 0) {
perror("bind");
@@ -1484,7 +1485,7 @@
strcat(kill_cmd, tmp);
}
- strcat(kill_cmd, " >&/dev/null");
+ strcat(kill_cmd, " >/dev/null 2>&1");
if(use_rsh) {
execl(RSH_CMD, RSH_CMD, pg->hostname, kill_cmd,
NULL); @@ -1554,7 +1555,7 @@
if(!plist[i].remote_pid) exit(EXIT_SUCCESS);
- snprintf(kill_cmd, 80, "kill -s 9 %d >&/dev/null",
+ snprintf(kill_cmd, 80, "kill -s 9 %d >/dev/null 2>&1",
plist[i].remote_pid);
if(use_rsh) {
Mit freundlichen Gruessen / Best Regards
Axel PHILIPP Geb. 044/557
Dr. rer. nat., Dipl. Phys.
MTU Aero Engines GmbH
Informationswirtschaft/Entwicklungssysteme (FIE)
Information Management/Engineering Systems (FIE)
Dachauer Str. 665
80995 Muenchen
Germany
Tel +49 (0)89 1489-4715
Fax +49 (0)89 1489-97533
mailto:Axel.Philipp at mtu.de
--
MTU Aero Engines GmbH
Geschaeftsfuehrung/Board of Management: Egon W. Behle, Vorsitzender/CEO; Dr. Rainer Martens, Dr. Stefan Weingartner, Reiner Winkler
Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt
Sitz der Gesellschaft/Registered Office: Muenchen
Handelsregister/Commercial Register: Muenchen HRB 154230
Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese E-Mail
sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet.
This e-mail and any attached documents are proprietary to MTU, confidential or protected by law.
If you are not the intended recipient, please advise the sender and delete this message and its attachments.
Any unauthorised storing, copying or distribution is prohibited.
More information about the mvapich-discuss
mailing list