]> git.pld-linux.org Git - packages/mpich.git/blob - mpich-1.2.5-oM.patch
- updated for 1.2.7p1
[packages/mpich.git] / mpich-1.2.5-oM.patch
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();
5             if (rc == 0)
6             {
7 +
8 +
9 +/* #define USE_ONLY_MOSRUN */
10 +#ifdef USE_ONLY_MOSRUN
11 +               char local_cmd[1024] = "mosrun";
12 +               char * mos_args;
13 +               mos_args = getenv("MOSRUN_ARGS");
14 +               if(!mos_args) mos_args="-l";
15 +
16 +               p4_dprintfl( 80, "Using mosrun instead of rsh\n" );
17 +
18 +               /* TODO:  Perhaps there's a nicer way than a bunch
19 +                  of strcat's ? */
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);
38 +
39 +               rc = execlp("bash", "bash", "-c", local_cmd, NULL);
40 +
41 +
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?) */
50 +                  remote shell */
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, 
58 -                               NULL);
59 +
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);
75 +
76 +                   rc = execlp("bash", "bash", "-c", local_cmd, NULL);
77                 }
78                 else {
79                     rc = execlp(remote_shell, remote_shell,
80 @@ -616,6 +666,7 @@ int net_create_slave( int serv_port, int
81                             NULL);
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 */
86                 if (rc < 0) {
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
91         rshnol=1
92         ;;
93  
94 +     -use_only_mosrun)
95 +       use_only_mosrun=1
96 +       ;;
97 +
98       -lib=* | --lib=*)
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
104         rshnol=1
105         ;;
106  
107 +      -use_only_mosrun)
108 +       use_only_mosrun=1
109 +       ;;
110 +
111       -lib=* | --lib=*)
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"
119  fi
120 +if test -n "$use_only_mosrun" ; then
121 +    otherargs="$otherargs -use_only_mosrun"
122 +fi
123  if test -n "$DLAST" ; then
124      otherargs="$otherargs $DLAST"
125  fi
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
129     -rshnol)
130       RSHNOL=1
131       ;;
132 +   -use_only_mosrun)
133 +     USE_ONLY_MOSRUN=1
134 +     ;;
135    -cflags=*)
136       USER_CFLAGS="`echo A$arg|sed 's/A-*cflags=//'`"
137       ;;
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
141     -rshnol)
142       RSHNOL=1
143       ;;
144 +   -use_only_mosrun)
145 +     USE_ONLY_MOSRUN=1
146 +     ;;
147    -cflags=*)
148       USER_CFLAGS="`echo A$arg|sed 's/A-*cflags=//'`"
149       ;;
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"
154 +}
155 +
156 +fi
157 +if test -n "$USE_ONLY_MOSRUN" ; then
158 +
159 +{
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"
164  }
165  
166  fi
This page took 0.083021 seconds and 3 git commands to generate.