sst-core
sst-core copied to clipboard
Link finalize and InitQueues
Link.cc line 128
// If we have a queue, it means we ended up having init events
// sent. No need to keep the initQueue around
if ( nullptr == pair_link->send_queue ) {
delete pair_link->send_queue;
pair_link->send_queue = nullptr;
}
Pretty sure that should be a !=
. Valgrind shows those initQueues as leaking with the above.
I'm actually surprised that's not causing segfaults when it tries to delete a nulltpr. I'll take a look at it and put in a fix.
Pretty sure delete does a nullptr check. At least cplusplus.com says it does.
@bpswenson Is this still an issue?
Yeah i think there's also another small one here:
` ////// Start ConfigGraph Creation ////// ConfigGraph* graph = nullptr;
double start_graph_gen = sst_get_cpu_time();
graph = new ConfigGraph();
// Only rank 0 will populate the graph, unless we are using
// parallel load. In this case, all ranks will load the graph
if ( myRank.rank == 0 || cfg.parallel_load() ) {
try {
graph = modelGen->createConfigGraph();
` Where it new's a config graph and then overwrites the graph variable on rank 0 or if parallel load. Sorry I kind of forgot about it. I'll try to get together a pull request on both of them.
The second bit of code had to be moved for the checkpointing PR, so please don't submit a PR for that. We can also add the other fix to the checkpointing PR. I'll close this issue once the checkpointing code is merged.