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

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;
}
......
......@@ -79,7 +79,7 @@ void ProcessInnerProduct::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessInnerProduct: Evaluating inner product..." << endl;
}
......
......@@ -78,7 +78,7 @@ void ProcessInterpField::Process(po::variables_map &vm)
{
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessInterpField: Interpolating field..." << endl;
}
......
......@@ -73,7 +73,7 @@ void ProcessInterpPointDataToFld::Process(po::variables_map &vm)
{
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessInterpPointDataToFld: interpolating data to field..."
<< endl;
......
......@@ -111,7 +111,7 @@ void ProcessInterpPoints::Process(po::variables_map &vm)
{
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessInterpPoints: interpolating to points..." << endl;
}
......
......@@ -106,11 +106,9 @@ ProcessIsoContour::~ProcessIsoContour(void)
void ProcessIsoContour::Process(po::variables_map &vm)
{
int rank = m_f->m_comm->GetRank();
if(m_f->m_verbose)
{
if(rank == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessIsoContour: Extracting contours..." << endl;
}
......@@ -211,7 +209,7 @@ void ProcessIsoContour::Process(po::variables_map &vm)
{
vector<IsoSharedPtr> new_iso;
if(rank == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "Identifying separate regions [." << flush ;
}
......@@ -220,7 +218,7 @@ void ProcessIsoContour::Process(po::variables_map &vm)
iso[i]->separate_regions(new_iso,mincontour,m_f->m_verbose);
}
if(rank == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "]" << endl << flush ;
}
......
......@@ -68,7 +68,7 @@ void ProcessJacobianEnergy::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessJacobianEnergy: Processing Jacobian..." << endl;
}
......
......@@ -63,7 +63,7 @@ void ProcessMapping::Process(po::variables_map &vm)
{
if(m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessMapping: Applying mapping to field..." << endl;
}
......
......@@ -65,7 +65,7 @@ void ProcessMeanMode::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessMeanMode: Extracting mean mode..." << endl;
}
......
......@@ -74,7 +74,7 @@ void ProcessMultiShear::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessMultiShear: Calculating shear stress metrics..."
<< endl;
......
......@@ -65,7 +65,7 @@ void ProcessNumModes::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessNumModes: Calculating number of modes..." << endl;
}
......
......@@ -89,7 +89,7 @@ void ProcessPointDataToFld::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessPointDataToFld: projecting data to expansion..."
<< endl;
......
......@@ -66,7 +66,7 @@ void ProcessPrintFldNorms::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessPrintFldNorms: Printing norms..." << endl;
}
......
......@@ -65,7 +65,7 @@ void ProcessQCriterion::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessQCriterion: Calculating Q Criterion..." << endl;
}
......
......@@ -72,7 +72,7 @@ void ProcessQualityMetric::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessQualityMetric: Adding quality metric to field"
<< endl;
......
......@@ -69,7 +69,7 @@ void ProcessScalGrad::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessScalGrad: Calculating scalar gradient..." << endl;
}
......
......@@ -81,7 +81,7 @@ void ProcessScaleInFld::Process(po::variables_map &vm)
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessScaleInFld: Rescaling input fld by factor"
<< scale << "..." << endl;
......
......@@ -67,7 +67,7 @@ void ProcessSurfDistance::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessSurfDistance: Calculating distance to surface..."
<< endl;
......
......@@ -66,7 +66,7 @@ void ProcessVorticity::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessVorticity: Calculating vorticity..." << endl;
}
......
......@@ -70,7 +70,7 @@ void ProcessWSS::Process(po::variables_map &vm)
{
if (m_f->m_verbose)
{
if(m_f->m_comm->GetRank() == 0)
if(m_f->m_comm->TreatAsRankZero())
{
cout << "ProcessWSS: Calculating wall shear stress..." << endl;
}
......
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