Revision 692 branches/merge-trunk-davef/src/linad99/gradstak.cpp

gradstak.cpp (revision 692)
91 91
#include <string.h>
92 92
#include <time.h>
93 93

  
94
#if defined(USE_ADMPI)
95
  void add_slave_suffix(const adstring& tmp);
96
  void report_file_opening(const adstring& tmp);
97
#endif
98

  
99

  
100

  
94 101
  char lastchar(char *);
95 102

  
96 103
  char ad_random_part[6]="tmp";
......
194 201
    {
195 202
      sprintf(&gradfile_name1[0],"gradfil1.%s",ad_random_part);
196 203
    }
204
    adstring tmps=gradfile_name1;
205
    add_slave_suffix(tmps);
206
    strncpy(gradfile_name1,tmps,100);
197 207

  
198 208
    path = getenv("ADTMP1"); // NULL if not defined
199 209
#if defined(USE_ADPVM)
......
241 251
      sprintf(&var_store_file_name[0],"varssave.%s",
242 252
        ad_random_part);
243 253
    }
254
    adstring tmps2=gradfile_name2;
255
    add_slave_suffix(tmps2);
256
    strncpy(gradfile_name2,tmps2,100);
257

  
258
    adstring tmps3=var_store_file_name;
259
    add_slave_suffix(tmps3);
260
    strncpy(var_store_file_name,tmps3,100);
261

  
244 262
    create_gradfile();
245 263

  
246 264
    strcpy(gradfile_name, gradfile_name1);

Also available in: Unified diff