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:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user