In main.cc you are dynamically building the networkManager entity:
gdata.networkManager = new NetworkManager();
However, you are not checking if the memory has been correctly allocated (IDEM for the problem), and there are some exit conditions where the object is not removed:
if (nm_worldsize > MAX_NODES_PER_CLUSTER) {
cerr << "Too many nodes in cluster: " << nm_worldsize << " > " << MAX_NODES_PER_CLUSTER << endl;
exit(1);
}
(...)
if (!gdata.clOptions->gpudirect) {
// since H2D and D2H transfers have to wait for network transfers
fprintf(stderr, "FATAL: asynchronous network transfers require --gpudirect\n");
gdata.networkManager->finalizeNetwork();
return 1;
}
if (gdata.devices > 1) {
// since we were too lazy to implement a more complex mechanism
fprintf(stderr, "FATAL: asynchronous network transfers only supported with 1 process per device\n");
gdata.networkManager->finalizeNetwork();
return 1;
}
In NetworkManager.cc:70, you are in-place reallocating memory. If such operation fails, then the memory in m_requestsList is not realeased, and the pointer is nullified.
In main.cc you are dynamically building the networkManager entity:
However, you are not checking if the memory has been correctly allocated (IDEM for the problem), and there are some exit conditions where the object is not removed:
In NetworkManager.cc:70, you are in-place reallocating memory. If such operation fails, then the memory in
m_requestsList
is not realeased, and the pointer is nullified.