Skip to content

Commit

Permalink
Merge pull request #960 from berquist/736-tidying
Browse files Browse the repository at this point in the history
Minor tidying
  • Loading branch information
jpkenny authored Jul 11, 2023
2 parents 52299cf + 815f304 commit 6466a06
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
**/.deps/
**/.dirstamp
**/Makefile.in
**~
*.o
.libs/
.deps/
Expand All @@ -25,7 +26,8 @@ src/sst/core/sst-register
src/sst/SST-*.pc
src/sst/core/sst_config.h
src/sst/core/sst_config.h.in
src/sst/core/sst_config.h.in~
src/sst/core/sst-test-core
src/sst/core/sst-test-elements
stamp-h1
src/sst/sstsimulator.conf
build_info.h
Expand All @@ -39,3 +41,4 @@ libtool
*.pyc
*.lo
*.la
sst_test_outputs/
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Doxyfile
Makefile
Makefile.in
tagfile
html/
1 change: 1 addition & 0 deletions src/sst/core/configGraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "sst/core/namecheck.h"
#include "sst/core/simulation_impl.h"
#include "sst/core/timeLord.h"
#include "sst/core/warnmacros.h"

#include <algorithm>
#include <fstream>
Expand Down
2 changes: 1 addition & 1 deletion src/sst/core/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Event : public Activity
/** Constant, default value for id_types */
static const id_type NO_ID;

Event() : Activity()
Event() : Activity(), delivery_info(0)
{
setPriority(EVENTPRIORITY);
#if __SST_DEBUG_EVENT_TRACKING__
Expand Down
4 changes: 2 additions & 2 deletions src/sst/core/link.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Link::finalizeConfiguration()
{
mode = RUN;
if ( SYNC == type ) {
// No configuraiton changes to be made
// No configuration changes to be made
return;
}

Expand Down Expand Up @@ -147,7 +147,7 @@ Link::prepareForComplete()
mode = COMPLETE;

if ( SYNC == type ) {
// No configuraiton changes to be made
// No configuration changes to be made
return;
}

Expand Down
9 changes: 7 additions & 2 deletions src/sst/core/rng/uniform.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ class UniformDistribution : public RandomDistribution
Creates an uniform distribution with a specific number of bins
\param probsCount Number of probability bins in this distribution
*/
UniformDistribution(const uint32_t probsCount) : RandomDistribution(), probCount(probsCount), deleteDistrib(true)
UniformDistribution(const uint32_t probsCount) :
RandomDistribution(),
deleteDistrib(true),
probCount(probsCount),
probPerBin(1)
{

if ( probCount > 0 ) { probPerBin = 1.0 / static_cast<double>(probCount); }
Expand All @@ -52,8 +56,9 @@ class UniformDistribution : public RandomDistribution
*/
UniformDistribution(const uint32_t probsCount, SST::RNG::Random* baseDist) :
RandomDistribution(),
deleteDistrib(false),
probCount(probsCount),
deleteDistrib(false)
probPerBin(1)
{

if ( probCount > 0 ) { probPerBin = 1.0 / static_cast<double>(probCount); }
Expand Down
2 changes: 1 addition & 1 deletion src/sst/core/serialization/serialize_buffer_accessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ser_buffer_accessor
}

protected:
ser_buffer_accessor() : bufstart_(nullptr), bufptr_(nullptr), size_(0) {}
ser_buffer_accessor() : bufstart_(nullptr), bufptr_(nullptr), size_(0), max_size_(0) {}

protected:
char* bufstart_;
Expand Down
8 changes: 4 additions & 4 deletions src/sst/core/simulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ Simulation_impl::processGraphInfo(ConfigGraph& graph, const RankInfo& UNUSED(myR
interThreadLatencies[i] = MAX_SIMTIME_T;
}

interThreadMinLatency = MAX_SIMTIME_T;
int cross_thread_links = 0;
interThreadMinLatency = MAX_SIMTIME_T;
int num_cross_thread_links = 0;
if ( num_ranks.thread > 1 ) {
// Need to determine the lookahead for the thread synchronization
ConfigComponentMap_t comps = graph.getComponentMap();
Expand All @@ -277,7 +277,7 @@ Simulation_impl::processGraphInfo(ConfigGraph& graph, const RankInfo& UNUSED(myR
// At this point, we know that both endpoints are on this
// rank, but on different threads. Therefore, they
// contribute to the interThreadMinLatency.
cross_thread_links++;
num_cross_thread_links++;
if ( clink->getMinLatency() < interThreadMinLatency ) { interThreadMinLatency = clink->getMinLatency(); }

// Now check only those latencies that directly impact this
Expand Down Expand Up @@ -312,7 +312,7 @@ Simulation_impl::processGraphInfo(ConfigGraph& graph, const RankInfo& UNUSED(myR

// Determine if this thread is independent. That means there is
// no need to synchronize with any other threads or ranks.
if ( min_part == MAX_SIMTIME_T && cross_thread_links == 0 ) { independent = true; }
if ( min_part == MAX_SIMTIME_T && num_cross_thread_links == 0 ) { independent = true; }
else {
independent = false;
}
Expand Down

0 comments on commit 6466a06

Please sign in to comment.