free MPI Communicators on destruction (#134)
make sure that all communicators that have been created during the runtime of the application are correctly freed again, to avoid memory leaks.
This commit is contained in:
@@ -63,7 +63,10 @@ MPITransport::MPITransport(MPI_Comm comm, Queue* q)
|
||||
NET_CHECK(MPI_Comm_rank(ro_net_comm_world, &my_pe));
|
||||
}
|
||||
|
||||
MPITransport::~MPITransport() {}
|
||||
MPITransport::~MPITransport() {
|
||||
if (ro_net_comm_world != MPI_COMM_NULL)
|
||||
NET_CHECK(MPI_Comm_free(&ro_net_comm_world));
|
||||
}
|
||||
|
||||
void MPITransport::threadProgressEngine() {
|
||||
auto *bp{backend_proxy->get()};
|
||||
|
||||
@@ -169,7 +169,7 @@ private:
|
||||
|
||||
std::vector<int> outstanding{};
|
||||
|
||||
MPI_Comm ro_net_comm_world{};
|
||||
MPI_Comm ro_net_comm_world{MPI_COMM_NULL};
|
||||
|
||||
std::map<CommKey, MPI_Comm> comm_map{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user