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:
+5
-1
@@ -129,7 +129,11 @@ void Backend::destroy_remaining_ctxs() {
|
||||
}
|
||||
}
|
||||
|
||||
Backend::~Backend() { CHECK_HIP(hipFree(print_lock)); }
|
||||
Backend::~Backend() {
|
||||
CHECK_HIP(hipFree(print_lock));
|
||||
if (backend_comm != MPI_COMM_NULL)
|
||||
NET_CHECK(MPI_Comm_free(&backend_comm));
|
||||
}
|
||||
|
||||
void Backend::dump_stats() {
|
||||
printf("PE %d\n", my_pe);
|
||||
|
||||
Reference in New Issue
Block a user