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

Destructor fix. Split Grid and MPI3 will not yet work without more effort from me.

This commit is contained in:
paboyle
2017-11-06 23:45:00 +00:00
parent 360efd0088
commit 69929f20bb
5 changed files with 62 additions and 36 deletions

View File

@ -55,8 +55,14 @@ void CartesianCommunicator::Init(int *argc, char ***argv) {
CartesianCommunicator::~CartesianCommunicator()
{
if (communicator && !MPI::Is_finalized())
int MPI_is_finalised;
MPI_Finalized(&MPI_is_finalised);
if (communicator && MPI_is_finalised) {
MPI_Comm_free(&communicator);
for(int i=0;i< communicator_halo.size();i++){
MPI_Comm_free(&communicator_halo[i]);
}
}
}