Commit 1db5e3cd authored by Spencer Sherwin's avatar Spencer Sherwin

Added communicator fix for MPI_Comm not being released

parent 063902a4
......@@ -90,6 +90,12 @@ CommMpi::CommMpi(MPI_Comm pComm) : Comm()
*/
CommMpi::~CommMpi()
{
int flag;
MPI_Finalized(&flag);
if (!flag && m_comm != MPI_COMM_WORLD)
{
MPI_Comm_free(&m_comm);
}
}
/**
......
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