]> git.pld-linux.org Git - packages/mpich.git/commitdiff
This patch allows you to make MPICH use mosrun rather than rsh
authormisi3k <misi3k@pld-linux.org>
Thu, 8 May 2003 10:55:51 +0000 (10:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mpich-1.2.5-oM.patch -> 1.1

mpich-1.2.5-oM.patch [new file with mode: 0644]

diff --git a/mpich-1.2.5-oM.patch b/mpich-1.2.5-oM.patch
new file mode 100644 (file)
index 0000000..09573da
--- /dev/null
@@ -0,0 +1,166 @@
+--- mpich-1.2.5-orig/mpid/ch_p4/p4/lib/p4_sock_cr.c    Mon Jan 13 10:23:33 2003
++++ mpich-1.2.5/mpid/ch_p4/p4/lib/p4_sock_cr.c Fri May  2 17:38:15 2003
+@@ -424,19 +424,69 @@ int net_create_slave( int serv_port, int
+           child_pid = rc = fork_p4();
+           if (rc == 0)
+           {
++
++
++/* #define USE_ONLY_MOSRUN */
++#ifdef USE_ONLY_MOSRUN
++              char local_cmd[1024] = "mosrun";
++              char * mos_args;
++              mos_args = getenv("MOSRUN_ARGS");
++              if(!mos_args) mos_args="-l";
++
++              p4_dprintfl( 80, "Using mosrun instead of rsh\n" );
++
++              /* TODO:  Perhaps there's a nicer way than a bunch
++                 of strcat's ? */
++              strcat(local_cmd, " ");
++              strcat(local_cmd, mos_args);
++              strcat(local_cmd, " ");
++              strcat(local_cmd, pgm);
++              strcat(local_cmd, " ");
++              strcat(local_cmd, myhostname);
++              strcat(local_cmd, " ");
++              strcat(local_cmd, serv_port_c);
++              strcat(local_cmd, " ");
++              strcat(local_cmd, am_slave_c);
++              strcat(local_cmd, " ");
++              strcat(local_cmd, "-p4yourname");
++              strcat(local_cmd, " ");
++              strcat(local_cmd, host);
++              strcat(local_cmd, " ");
++              strcat(local_cmd, "-p4rmrank");
++              strcat(local_cmd, " ");
++              strcat(local_cmd, rm_rank_str);
++
++              rc = execlp("bash", "bash", "-c", local_cmd, NULL);
++
++
++#else   /* !USE_ONLY_MOSRUN */
+ /* define SHORT_CIRCUIT_LOCALHOST */
+-/* This doesn't work yet.  redirection of stdin/out/error are undoubtedly
+-   part of the problem.  We'll leave this for the next release */
++/* this is untested... Good luck! */
+ #ifdef SHORT_CIRCUIT_LOCALHOST
+               /* If host is localhost or myhost, then we don't need to run 
+-                 remote shell (do we? what about stdin/out/err?) */
++                 remote shell */
++              char local_cmd[1024];
+               if (strcmp( host, "localhost" ) == 0 ||
+                   strcmp( myhostname, host ) == 0) { 
+                   p4_dprintfl( 80, "Not using rsh to localhost\n" );
+-                  rc = execlp(pgm, pgm,
+-                          myhostname, serv_port_c, am_slave_c, 
+-                          "-p4yourname", host, "-p4rmrank", rm_rank_str, 
+-                              NULL);
++
++                  strcpy(local_cmd, pgm);
++                  strcat(local_cmd, " ");
++                  strcat(local_cmd, myhostname);
++                  strcat(local_cmd, " ");
++                  strcat(local_cmd, serv_port_c);
++                  strcat(local_cmd, " ");
++                  strcat(local_cmd, am_slave_c);
++                  strcat(local_cmd, " ");
++                  strcat(local_cmd, "-p4yourname");
++                  strcat(local_cmd, " ");
++                  strcat(local_cmd, host);
++                  strcat(local_cmd, " ");
++                  strcat(local_cmd, "-p4rmrank");
++                  strcat(local_cmd, " ");
++                  strcat(local_cmd, rm_rank_str);
++
++                  rc = execlp("bash", "bash", "-c", local_cmd, NULL);
+               }
+               else {
+                   rc = execlp(remote_shell, remote_shell,
+@@ -616,6 +666,7 @@ int net_create_slave( int serv_port, int
+                           NULL);
+ #endif /* RSH_NEEDS_OPTS */
+ #endif /* Short_circuit_localhost */
++#endif /* USE_ONLY_MOSRUN */
+               /* host,"-n","cluster","5",pgm,myhostname,serv_port_c,0); for butterfly */
+               if (rc < 0) {
+                   /* Trap common user errors and generate a more 
+--- mpich-1.2.5-orig/configure Mon Jan 13 14:34:56 2003
++++ mpich-1.2.5/configure      Fri May  2 17:15:29 2003
+@@ -1123,6 +1123,10 @@ do
+       rshnol=1
+       ;;
++     -use_only_mosrun)
++      use_only_mosrun=1
++      ;;
++
+      -lib=* | --lib=*)
+        package="`echo $arg|sed 's/-*lib=//'`"
+        USERLIB="$package" ;;
+--- mpich-1.2.5-orig/configure.in      Mon Jan 13 14:34:57 2003
++++ mpich-1.2.5/configure.in   Fri May  2 17:22:05 2003
+@@ -1132,6 +1132,10 @@ do
+       rshnol=1
+       ;;
++      -use_only_mosrun)
++      use_only_mosrun=1
++      ;;
++
+      -lib=* | --lib=*)
+        package="`echo $arg|sed 's/-*lib=//'`"
+        USERLIB="$package" ;;
+--- mpich-1.2.5-orig/mpid/ch_p4/setup_ch_p4    Fri Oct  4 07:30:41 2002
++++ mpich-1.2.5/mpid/ch_p4/setup_ch_p4 Fri May  2 17:17:10 2003
+@@ -166,6 +166,9 @@ fi
+ if test -n "$rshnol" ; then
+     otherargs="$otherargs -rshnol"
+ fi
++if test -n "$use_only_mosrun" ; then
++    otherargs="$otherargs -use_only_mosrun"
++fi
+ if test -n "$DLAST" ; then
+     otherargs="$otherargs $DLAST"
+ fi
+--- mpich-1.2.5-orig/mpid/ch_p4/p4/configure.in        Sun Jun  9 09:47:40 2002
++++ mpich-1.2.5/mpid/ch_p4/p4/configure.in     Fri May  2 17:20:05 2003
+@@ -121,6 +121,9 @@ case $arg in
+    -rshnol)
+      RSHNOL=1
+      ;;
++   -use_only_mosrun)
++     USE_ONLY_MOSRUN=1
++     ;;
+   -cflags=*)
+      USER_CFLAGS="`echo A$arg|sed 's/A-*cflags=//'`"
+      ;;
+--- mpich-1.2.5-orig/mpid/ch_p4/p4/configure   Tue Jun 11 07:04:29 2002
++++ mpich-1.2.5/mpid/ch_p4/p4/configure        Fri May  2 17:18:07 2003
+@@ -113,6 +113,9 @@ case $arg in
+    -rshnol)
+      RSHNOL=1
+      ;;
++   -use_only_mosrun)
++     USE_ONLY_MOSRUN=1
++     ;;
+   -cflags=*)
+      USER_CFLAGS="`echo A$arg|sed 's/A-*cflags=//'`"
+      ;;
+@@ -10301,6 +10304,16 @@ test -n "$verbose" && \
+ echo "        defining RSH_HAS_NO_L"
+ echo "#define" RSH_HAS_NO_L 1 >> confdefs.h
+ DEFS="$DEFS -DRSH_HAS_NO_L=1"
++}
++
++fi
++if test -n "$USE_ONLY_MOSRUN" ; then
++
++{
++test -n "$verbose" && \
++echo "        defining USE_ONLY_MOSRUN"
++echo "#define" USE_ONLY_MOSRUN 1 >> confdefs.h
++DEFS="$DEFS -DUSE_ONLY_MOSRUN=1"
+ }
+ fi
This page took 0.165113 seconds and 4 git commands to generate.