MPI: debug dumps prepend its rank to output filenames

pull/1/head
Thorsten Liebig 2011-02-21 10:00:11 +01:00
parent 9b55eab2f8
commit 211b6b7331
2 changed files with 31 additions and 0 deletions

View File

@ -175,3 +175,28 @@ void Operator_MPI::Reset()
Delete();
Operator_SSE_Compressed::Reset();
}
string Operator_MPI::PrependRank(string name)
{
stringstream out_name;
if (m_MPI_Enabled)
out_name << "ID" << m_MyID << "_" << name;
else
out_name << name;
return out_name.str();
}
void Operator_MPI::DumpOperator2File(string filename)
{
Operator_SSE_Compressed::DumpOperator2File(PrependRank(filename));
}
void Operator_MPI::DumpMaterial2File(string filename)
{
Operator_SSE_Compressed::DumpMaterial2File(PrependRank(filename));
}
void Operator_MPI::DumpPEC2File( string filename )
{
Operator_SSE_Compressed::DumpPEC2File(PrependRank(filename));
}

View File

@ -54,6 +54,12 @@ protected:
//the up and down neighbors, -1 if non for the given direction
int m_NeighborUp[3];
int m_NeighborDown[3];
string PrependRank(string name);
virtual void DumpOperator2File(string filename);
virtual void DumpMaterial2File(string filename);
virtual void DumpPEC2File( string filename );
};
#endif // OPERATOR_MPI_H