sst-core icon indicating copy to clipboard operation
sst-core copied to clipboard

Link finalize and InitQueues

Open bpswenson opened this issue 1 year ago • 5 comments

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.

bpswenson avatar Jul 25 '23 20:07 bpswenson

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.

feldergast avatar Jul 25 '23 20:07 feldergast

Pretty sure delete does a nullptr check. At least cplusplus.com says it does.

bpswenson avatar Jul 25 '23 20:07 bpswenson

@bpswenson Is this still an issue?

jwilso avatar Mar 28 '24 16:03 jwilso

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.

bpswenson avatar Apr 18 '24 16:04 bpswenson

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.

feldergast avatar Apr 18 '24 16:04 feldergast