Commit 23245e1a authored by Ed Laughton's avatar Ed Laughton

Only write on rank 0

parent e1734248
Pipeline #1936 passed with stages
in 276 minutes and 48 seconds
......@@ -120,7 +120,11 @@ void FilterError::v_Update(
}
// Output to file L2 and Linf error for each variable
m_outFile << time;
if (m_comm->GetRank() == 0)
{
m_outFile << time;
}
for (size_t i = 0; i < m_numVariables; ++i)
{
Array<OneD, NekDouble> exactsoln(m_equationShPtr->GetTotPoints(), 0.0);
......@@ -137,7 +141,10 @@ void FilterError::v_Update(
}
}
m_outFile << std::endl;
if (m_comm->GetRank() == 0)
{
m_outFile << std::endl;
}
}
void FilterError::v_Finalise(
......@@ -145,7 +152,11 @@ void FilterError::v_Finalise(
const NekDouble &time)
{
boost::ignore_unused(pFields, time);
m_outFile.close();
if (m_comm->GetRank() == 0)
{
m_outFile.close();
}
}
bool FilterError::v_IsTimeDependent()
......
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