Skip to content
Snippets Groups Projects
Commit c8b336e9 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Do not call MPI_Comm_free for invalid communicator

parent 0ce3ebe9
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,9 @@ PTScotchPartitioner::partition(const CRSGraph& graph)
SCOTCH_stratExit(&scotch_strategy);
}
MPI_Comm_free(&partitioning_comm);
if (partitioning_comm != MPI_COMM_NULL){
MPI_Comm_free(&partitioning_comm);
}
MPI_Group_free(&mesh_group);
MPI_Group_free(&world_group);
......
......@@ -72,7 +72,9 @@ ParMETISPartitioner::partition(const CRSGraph& graph)
// LCOV_EXCL_STOP
}
MPI_Comm_free(&partitioning_comm);
if (partitioning_comm != MPI_COMM_NULL){
MPI_Comm_free(&partitioning_comm);
}
MPI_Group_free(&mesh_group);
MPI_Group_free(&world_group);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment