1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-07-06 16:37:06 +01:00

Fixing the MPI memory leak in the communicators

This commit is contained in:
Guido Cossu
2017-11-07 13:55:37 +00:00
parent 360efd0088
commit c519aab19d
4 changed files with 14 additions and 3 deletions

View File

@ -57,7 +57,7 @@ CartesianCommunicator::~CartesianCommunicator()
{
int MPI_is_finalised;
MPI_Finalized(&MPI_is_finalised);
if (communicator && MPI_is_finalised)
if (communicator && !MPI_is_finalised)
MPI_Comm_free(&communicator);
}