mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 20:57:06 +01:00
Finalize protection
This commit is contained in:
@ -401,7 +401,10 @@ void *SharedMemory::ShmBufferTranslate(int rank,void * local_p)
|
||||
}
|
||||
SharedMemory::~SharedMemory()
|
||||
{
|
||||
MPI_Comm_free(&ShmComm);
|
||||
int MPI_is_finalised; MPI_Finalized(&MPI_is_finalised);
|
||||
if ( !MPI_is_finalised ) {
|
||||
MPI_Comm_free(&ShmComm);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user