mirror of
https://github.com/paboyle/Grid.git
synced 2026-01-18 15:54:41 +00:00
Destructor fix. Split Grid and MPI3 will not yet work without more effort from me.
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user