Commit 49cb3421 authored by Douglas Serson's avatar Douglas Serson
Browse files

Fix FC verbose option when using --procid

parent e73317fd
......@@ -285,7 +285,7 @@ namespace Nektar
// In verbose mode, print out parameters and solver info sections
if (m_verbose && m_comm)
{
if (m_comm->GetRank() == 0 && m_parameters.size() > 0)
if (m_comm->TreatAsRankZero() && m_parameters.size() > 0)
{
cout << "Parameters:" << endl;
ParameterMap::iterator x;
......@@ -296,7 +296,7 @@ namespace Nektar
cout << endl;
}
if (m_comm->GetRank() == 0 && m_solverInfo.size() > 0)
if (m_comm->TreatAsRankZero() && m_solverInfo.size() > 0)
{
cout << "Solver Info:" << endl;
SolverInfoMap::iterator x;
......@@ -1555,7 +1555,7 @@ namespace Nektar
// Get row of comm, or the whole comm if not split
CommSharedPtr vCommMesh = m_comm->GetRowComm();
const bool isRoot = (m_comm->GetRank() == 0);
const bool isRoot = m_comm->TreatAsRankZero();
// Delete any existing loaded mesh
if (m_xmlDoc)
......@@ -1588,7 +1588,8 @@ namespace Nektar
// If the mesh is already partitioned, we are done. Remaining
// processes must load their partitions.
if (isPartitioned) {
if (isPartitioned)
{
if (!isRoot)
{
m_xmlDoc = MergeDoc(m_filenames);
......@@ -1662,7 +1663,7 @@ namespace Nektar
vector<unsigned int> keys, vals;
int i;
if (vComm->GetRank() == 0)
if (isRoot)
{
m_xmlDoc = MergeDoc(m_filenames);
......
......@@ -82,7 +82,10 @@ void InputDat::Process(po::variables_map &vm)
if(m_f->m_verbose)
{
cout << "Processing input dat file" << endl;
if(m_f->m_comm->TreatAsRankZero())
{
cout << "Processing input dat file" << endl;
}
}
string line, word, tag;
......
......@@ -93,7 +93,7 @@ void InputFld::Process(po::variables_map &vm)
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "Processing input fld file" << endl;
}
......
......@@ -82,7 +82,10 @@ void InputPts::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
cout << "Processing input pts file" << endl;
if(m_f->m_comm->TreatAsRankZero())
{
cout << "Processing input pts file" << endl;
}
}
string inFile = (m_f->m_inputfiles["pts"][0]).c_str();
......
......@@ -102,7 +102,7 @@ void InputXml::Process(po::variables_map &vm)
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "Processing input xml file" << endl;
timerpart.Start();
......@@ -275,7 +275,7 @@ void InputXml::Process(po::variables_map &vm)
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
timerpart.Stop();
NekDouble cpuTime = timerpart.TimePerTest(1);
......@@ -294,7 +294,7 @@ void InputXml::Process(po::variables_map &vm)
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
timerpart.Stop();
NekDouble cpuTime = timerpart.TimePerTest(1);
......@@ -391,7 +391,7 @@ void InputXml::Process(po::variables_map &vm)
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
timerpart.Stop();
NekDouble cpuTime = timerpart.TimePerTest(1);
......@@ -415,7 +415,7 @@ void InputXml::Process(po::variables_map &vm)
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
timerpart.Stop();
NekDouble cpuTime = timerpart.TimePerTest(1);
......
......@@ -73,7 +73,7 @@ void OutputFld::Process(po::variables_map &vm)
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "OutputFld: Writing boundary file(s): ";
for(int i = 0; i < m_f->m_bndRegionsToWrite.size(); ++i)
......@@ -308,7 +308,7 @@ void OutputFld::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "OutputFld: Writing file..." << endl;
}
......
......@@ -64,7 +64,10 @@ void OutputPts::Process(po::variables_map &vm)
if (m_f->m_verbose)
{
cout << "OutputPts: Writing file..." << endl;
if(m_f->m_comm->TreatAsRankZero())
{
cout << "OutputPts: Writing file..." << endl;
}
}
fs::path writefile(filename);
......
......@@ -86,7 +86,10 @@ void OutputTecplot::Process(po::variables_map &vm)
if (m_f->m_verbose)
{
cout << "OutputTecplot: Writing file..." << endl;
if(m_f->m_comm->TreatAsRankZero())
{
cout << "OutputTecplot: Writing file..." << endl;
}
}
......
......@@ -74,7 +74,10 @@ void OutputVtk::Process(po::variables_map &vm)
int i, j;
if (m_f->m_verbose)
{
cout << "OutputVtk: Writing file..." << endl;
if(m_f->m_comm->TreatAsRankZero())
{
cout << "OutputVtk: Writing file..." << endl;
}
}
// Extract the output filename and extension
......@@ -96,7 +99,7 @@ void OutputVtk::Process(po::variables_map &vm)
fs::path poutfile(filename.c_str());
fs::path specPath(path.c_str());
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
try
{
......
......@@ -67,7 +67,10 @@ void OutputXml::Process(po::variables_map &vm)
if (m_f->m_verbose)
{
cout << "OutputXml: Writing file..." << endl;
if(m_f->m_comm->TreatAsRankZero())
{
cout << "OutputXml: Writing file..." << endl;
}
}
// Extract the output filename and extension
......
......@@ -72,7 +72,7 @@ void ProcessAddFld::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessAddFld: Adding new fld to input fld..." << endl;
}
......
......@@ -73,7 +73,7 @@ void ProcessBoundaryExtract::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessBoundaryExtract: Setting up boundary extraction..."
<< endl;
......
......@@ -70,7 +70,7 @@ void ProcessC0Projection::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessC0Projection: Projecting field into C0 space..."
<< endl;
......
......@@ -70,7 +70,7 @@ void ProcessCombineAvg::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessCombineAvg: Combining new fld into input avg fld..."
<< endl;
......
......@@ -85,7 +85,7 @@ void ProcessConcatenateFld::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessConcatenateFld: Concatenating field file..."
<< endl;
......
......@@ -64,7 +64,7 @@ namespace Nektar
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessDeform: Deforming grid..." << endl;
}
......
......@@ -126,7 +126,7 @@ namespace Utilities
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessDisplacement: Calculating displacement..."
<< endl;
......
......@@ -83,7 +83,7 @@ void ProcessEquiSpacedOutput::SetupEquiSpacedField(void)
{
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "Interpolating fields to equispaced..." << endl;
}
......
......@@ -66,7 +66,7 @@ void ProcessGrad::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessGrad: Calculating gradients..." << endl;
}
......
......@@ -70,7 +70,7 @@ void ProcessHomogeneousPlane::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessHomogeneousPlane: Extracting plane..." << endl;
}
......
Supports Markdown
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