Changeset 24699 for gs2-extensions/parallel-building/trunk
- Timestamp:
- 2011-09-30T14:31:25+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/src/mpiimport-src/mpiimport.cpp
r24589 r24699 6 6 // 1 July 2010 7 7 8 // 2011MAR - added a bunch of commands to aid [my] understanding. jmt129 // - made site argument optional to support GS2. jmt128 // 2011MAR - added a bunch of commands to aid (my) understanding. 9 // - made site argument optional to support GS2. 10 10 // - moving manifest writing code into the rank=0 thread. This will 11 11 // remove the artificial limit on epoc size caused by size of 12 // message buffer between controller and child threads. jmt12 12 // message buffer between controller and child threads. [jmt12] 13 // 2011SEP - changing where the manifest files are written so I have the 14 // ability to set up the location as a RAMDisk. [jmt12] 13 15 14 16 #include "mpi.h" … … 19 21 #include <fstream> 20 22 #include <iostream> 23 #include <sstream> 21 24 #include <string> 22 25 #include <vector> … … 87 90 88 91 // scan through contents of file listing 92 int manifest_file_count = 1; 89 93 while (!infile.eof ()) 90 94 { … … 115 119 116 120 // construct manifest filename 117 char manifestfile_buffer[128]; 118 sprintf (manifestfile_buffer, "%u.manifest.xml", rank); 119 char* manifestfilename = tempnam(NULL,manifestfile_buffer); 121 stringstream manifestfilename_strstr; 122 manifestfilename_strstr << gsdlhomedir << "/collect/" << collection << "/tmp/manifest." << manifest_file_count << ".xml"; 123 string manifestfilename_str = manifestfilename_strstr.str(); 124 char *manifestfilename = new char [manifestfilename_str.size() + 1]; 125 strcpy(manifestfilename, manifestfilename_str.c_str()); 120 126 ofstream manifestfile; 121 127 if (manifestfilename != NULL) … … 169 175 actualTasks = dest; 170 176 } 177 // increase number of manifest files processed 178 manifest_file_count++; 171 179 } 172 180 }
Note:
See TracChangeset
for help on using the changeset viewer.