Commit 6c9c0631 authored by Spencer Sherwin's avatar Spencer Sherwin
Browse files

Modified the --nprocs option to use writemultiplefiles option on output...

Modified the --nprocs option to use writemultiplefiles option on output modules so we get a series of files generated
parent 38c042a8
...@@ -319,8 +319,8 @@ int main(int argc, char* argv[]) ...@@ -319,8 +319,8 @@ int main(int argc, char* argv[])
} }
else else
{ {
int dot = tmp1[0].find_last_of('.') + 1; int dot = tmp1[0].find_last_of('.') + 1;
string ext = tmp1[0].substr(dot, tmp1[0].length() - dot); string ext = tmp1[0].substr(dot, tmp1[0].length() - dot);
if(ext == "gz") if(ext == "gz")
{ {
...@@ -330,8 +330,8 @@ int main(int argc, char* argv[]) ...@@ -330,8 +330,8 @@ int main(int argc, char* argv[])
} }
module.second = ext; module.second = ext;
tmp1.push_back(string(i < nInput ? "infile=" : "outfile=") tmp1.push_back(string(i < nInput ? "infile=" :
+tmp1[0]); "outfile=") +tmp1[0]);
} }
} }
else else
...@@ -428,13 +428,23 @@ int main(int argc, char* argv[]) ...@@ -428,13 +428,23 @@ int main(int argc, char* argv[])
{ {
cout << endl << "Processing partition: " << p << endl; cout << endl << "Processing partition: " << p << endl;
} }
if (p > 0)
if (nParts > 0)
{ {
int rank = p; int rank = p;
f->ClearField(); f->ClearField();
f->m_comm = boost::shared_ptr<FieldConvertComm>( f->m_comm = boost::shared_ptr<FieldConvertComm>(
new FieldConvertComm(argc, argv, nParts,rank)); new FieldConvertComm(argc, argv, nParts,rank));
for (int i = 0; i < modules.size(); ++i)
{
if(modules[i]->GetModulePriority() == eOutput)
{
modules[i]->RegisterConfig("writemultiplefiles","true");
}
}
} }
// Run field process. // Run field process.
for (int n = 0; n < SIZE_ModulePriority; ++n) for (int n = 0; n < SIZE_ModulePriority; ++n)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment