1 --- mpich-1.2.5-orig/mpid/ch_p4/p4/lib/p4_sock_cr.c Mon Jan 13 10:23:33 2003
2 +++ mpich-1.2.5/mpid/ch_p4/p4/lib/p4_sock_cr.c Fri May 2 17:38:15 2003
3 @@ -424,19 +424,69 @@ int net_create_slave( int serv_port, int
4 child_pid = rc = fork_p4();
9 +/* #define USE_ONLY_MOSRUN */
10 +#ifdef USE_ONLY_MOSRUN
11 + char local_cmd[1024] = "mosrun";
13 + mos_args = getenv("MOSRUN_ARGS");
14 + if(!mos_args) mos_args="-l";
16 + p4_dprintfl( 80, "Using mosrun instead of rsh\n" );
18 + /* TODO: Perhaps there's a nicer way than a bunch
20 + strcat(local_cmd, " ");
21 + strcat(local_cmd, mos_args);
22 + strcat(local_cmd, " ");
23 + strcat(local_cmd, pgm);
24 + strcat(local_cmd, " ");
25 + strcat(local_cmd, myhostname);
26 + strcat(local_cmd, " ");
27 + strcat(local_cmd, serv_port_c);
28 + strcat(local_cmd, " ");
29 + strcat(local_cmd, am_slave_c);
30 + strcat(local_cmd, " ");
31 + strcat(local_cmd, "-p4yourname");
32 + strcat(local_cmd, " ");
33 + strcat(local_cmd, host);
34 + strcat(local_cmd, " ");
35 + strcat(local_cmd, "-p4rmrank");
36 + strcat(local_cmd, " ");
37 + strcat(local_cmd, rm_rank_str);
39 + rc = execlp("bash", "bash", "-c", local_cmd, NULL);
42 +#else /* !USE_ONLY_MOSRUN */
43 /* define SHORT_CIRCUIT_LOCALHOST */
44 -/* This doesn't work yet. redirection of stdin/out/error are undoubtedly
45 - part of the problem. We'll leave this for the next release */
46 +/* this is untested... Good luck! */
47 #ifdef SHORT_CIRCUIT_LOCALHOST
48 /* If host is localhost or myhost, then we don't need to run
49 - remote shell (do we? what about stdin/out/err?) */
51 + char local_cmd[1024];
52 if (strcmp( host, "localhost" ) == 0 ||
53 strcmp( myhostname, host ) == 0) {
54 p4_dprintfl( 80, "Not using rsh to localhost\n" );
55 - rc = execlp(pgm, pgm,
56 - myhostname, serv_port_c, am_slave_c,
57 - "-p4yourname", host, "-p4rmrank", rm_rank_str,
60 + strcpy(local_cmd, pgm);
61 + strcat(local_cmd, " ");
62 + strcat(local_cmd, myhostname);
63 + strcat(local_cmd, " ");
64 + strcat(local_cmd, serv_port_c);
65 + strcat(local_cmd, " ");
66 + strcat(local_cmd, am_slave_c);
67 + strcat(local_cmd, " ");
68 + strcat(local_cmd, "-p4yourname");
69 + strcat(local_cmd, " ");
70 + strcat(local_cmd, host);
71 + strcat(local_cmd, " ");
72 + strcat(local_cmd, "-p4rmrank");
73 + strcat(local_cmd, " ");
74 + strcat(local_cmd, rm_rank_str);
76 + rc = execlp("bash", "bash", "-c", local_cmd, NULL);
79 rc = execlp(remote_shell, remote_shell,
80 @@ -616,6 +666,7 @@ int net_create_slave( int serv_port, int
82 #endif /* RSH_NEEDS_OPTS */
83 #endif /* Short_circuit_localhost */
84 +#endif /* USE_ONLY_MOSRUN */
85 /* host,"-n","cluster","5",pgm,myhostname,serv_port_c,0); for butterfly */
87 /* Trap common user errors and generate a more
88 --- mpich-1.2.5-orig/configure Mon Jan 13 14:34:56 2003
89 +++ mpich-1.2.5/configure Fri May 2 17:15:29 2003
90 @@ -1123,6 +1123,10 @@ do
99 package="`echo $arg|sed 's/-*lib=//'`"
100 USERLIB="$package" ;;
101 --- mpich-1.2.5-orig/configure.in Mon Jan 13 14:34:57 2003
102 +++ mpich-1.2.5/configure.in Fri May 2 17:22:05 2003
103 @@ -1132,6 +1132,10 @@ do
112 package="`echo $arg|sed 's/-*lib=//'`"
113 USERLIB="$package" ;;
114 --- mpich-1.2.5-orig/mpid/ch_p4/setup_ch_p4 Fri Oct 4 07:30:41 2002
115 +++ mpich-1.2.5/mpid/ch_p4/setup_ch_p4 Fri May 2 17:17:10 2003
116 @@ -166,6 +166,9 @@ fi
117 if test -n "$rshnol" ; then
118 otherargs="$otherargs -rshnol"
120 +if test -n "$use_only_mosrun" ; then
121 + otherargs="$otherargs -use_only_mosrun"
123 if test -n "$DLAST" ; then
124 otherargs="$otherargs $DLAST"
126 --- mpich-1.2.5-orig/mpid/ch_p4/p4/configure.in Sun Jun 9 09:47:40 2002
127 +++ mpich-1.2.5/mpid/ch_p4/p4/configure.in Fri May 2 17:20:05 2003
128 @@ -121,6 +121,9 @@ case $arg in
136 USER_CFLAGS="`echo A$arg|sed 's/A-*cflags=//'`"
138 --- mpich-1.2.5-orig/mpid/ch_p4/p4/configure Tue Jun 11 07:04:29 2002
139 +++ mpich-1.2.5/mpid/ch_p4/p4/configure Fri May 2 17:18:07 2003
140 @@ -113,6 +113,9 @@ case $arg in
148 USER_CFLAGS="`echo A$arg|sed 's/A-*cflags=//'`"
150 @@ -10301,6 +10304,16 @@ test -n "$verbose" && \
151 echo " defining RSH_HAS_NO_L"
152 echo "#define" RSH_HAS_NO_L 1 >> confdefs.h
153 DEFS="$DEFS -DRSH_HAS_NO_L=1"
157 +if test -n "$USE_ONLY_MOSRUN" ; then
160 +test -n "$verbose" && \
161 +echo " defining USE_ONLY_MOSRUN"
162 +echo "#define" USE_ONLY_MOSRUN 1 >> confdefs.h
163 +DEFS="$DEFS -DUSE_ONLY_MOSRUN=1"