- Timestamp:
- 2015-10-09T17:26:26+13:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/src/mpiimport-src/mpiimport.cpp
r27415 r30298 31 31 #define BUFFERSIZE 512 32 32 33 #if defined _WIN32 || defined __CYGWIN__ 34 const char path_sep = '\\'; 35 #else 36 const char path_sep = '/'; 37 #endif 38 33 39 int 34 40 main ( int argc, char *argv [] ) … … 142 148 stringstream manifestfilename_strstr; 143 149 if (site == NULL) { 144 manifestfilename_strstr << gsdlhomedir << "/collect/" << collection << "/tmp/manifest." << manifest_file_count << ".xml";150 manifestfilename_strstr << gsdlhomedir << path_sep << "collect" << path_sep << collection << path_sep << "tmp" << path_sep << "manifest." << manifest_file_count << ".xml"; 145 151 } 146 152 else { 147 manifestfilename_strstr << gsdlhomedir << "/sites/" << site << "/collect/" << collection << "/tmp/manifest." << manifest_file_count << ".xml";153 manifestfilename_strstr << gsdlhomedir << path_sep << "web" << path_sep << "sites" << path_sep << site << path_sep << "collect" << path_sep << collection << path_sep << "tmp" << path_sep << "manifest." << manifest_file_count << ".xml"; 148 154 } 149 155 … … 268 274 // process a received job 269 275 seconds = time(NULL); 270 fprintf(stderr, "[W%d:%lu] Processing: %s \n", rank, seconds, incoming, counter);276 fprintf(stderr, "[W%d:%lu] Processing: %s (%d)\n", rank, seconds, incoming, counter); 271 277 // create Greenstone import command 272 278 // - incoming now contains the name of the manifest file to process … … 280 286 char affinity[16] = ""; 281 287 #endif 282 if (site != NULL && strlen(site) > 0) 288 289 // In the commands below, need to consider Windows. In particular: 290 // /dev/null => NUL 291 // /tmp/file.log => %temp%\\file.log 292 // But we'll also have issues with affinity and source bash files 293 if (site != NULL && strlen(site) > 0) 283 294 { 284 295 if (gsdlhometest != NULL) 285 296 { 286 297 sprintf(command, "%s import.pl -keepold -manifest %s -site %s %s > /tmp/gsimport-W%d-%d.log 2>&1", affinity, incoming, site, collection, rank, counter); 287 298 } 288 299 else
Note:
See TracChangeset
for help on using the changeset viewer.