Skip to content

Commit f3e0a57

Browse files
committed
Fixed bug where mpi+threads segfaulted in processGraphInfo(). Also added ability to exclude path keys that have _EXT_ in them from the path returned from ConfigShared::getLibPath(). This gives elements a place to put libraries that sst-info will not see.
1 parent 09281b5 commit f3e0a57

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

src/sst/core/configShared.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ConfigShared::addVerboseOptions(bool sdl_avail)
7171
7272
*/
7373
std::string
74-
ConfigShared::getLibPath() const
74+
ConfigShared::getLibPath(bool exclude_ext_paths) const
7575
{
7676
std::string fullLibPath;
7777

@@ -114,6 +114,8 @@ ConfigShared::getLibPath() const
114114

115115
if ( key.size() >= 6 ) {
116116
if ( "LIBDIR" == key.substr(key.size() - 6) ) {
117+
// See if this is an _EXT_ key and if we need to skip it
118+
if ( exclude_ext_paths && (key.find("_EXT_") != std::string::npos) ) continue;
117119
// See if there is a value, if not, skip it
118120
if ( value.size() > 0 ) {
119121
// If this is the first one, we don't need

src/sst/core/configShared.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class ConfigShared : public ConfigBase
9696

9797
public:
9898

99-
std::string getLibPath() const;
99+
std::string getLibPath(bool exclude_ext_paths = false) const;
100100
};
101101

102102
} // namespace SST

src/sst/core/simulation.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ Simulation_impl::processGraphInfo(ConfigGraph& graph, const RankInfo& UNUSED(myR
503503
if ( my_rank.thread == 0 ) {
504504
minPartTC = minPartToTC(min_part);
505505
}
506-
507506
// Get the minimum latencies for links between the various threads
508507
interThreadLatencies.resize(num_ranks.thread);
509508
for ( size_t i = 0; i < interThreadLatencies.size(); i++ ) {
@@ -519,7 +518,11 @@ Simulation_impl::processGraphInfo(ConfigGraph& graph, const RankInfo& UNUSED(myR
519518
// Find the minimum latency across a partition
520519
for ( auto iter = links.begin(); iter != links.end(); ++iter ) {
521520
ConfigLink* clink = *iter;
522-
RankInfo rank[2];
521+
// If link is nonlocal, then doesn't affect interthread latencies
522+
if ( clink->nonlocal ) continue;
523+
524+
// If link is not nonlocal, see if it crosses a thread boundary
525+
RankInfo rank[2];
523526
rank[0] = comps[COMPONENT_ID_MASK(clink->component[0])]->rank;
524527
rank[1] = comps[COMPONENT_ID_MASK(clink->component[1])]->rank;
525528
// We only care about links that are on my rank, but

src/sst/core/sstinfo.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ main(int argc, char* argv[])
152152
}
153153

154154
// Process all specified libraries
155-
g_searchPath = g_configuration.getLibPath();
155+
g_searchPath = g_configuration.getLibPath(true);
156156
processSSTElementFiles();
157157

158158
// Run interactive mode
@@ -175,7 +175,7 @@ main(int argc, char* argv[])
175175
}
176176

177177
// Process all specified libraries
178-
g_searchPath = g_configuration.getLibPath();
178+
g_searchPath = g_configuration.getLibPath(true);
179179
processSSTElementFiles();
180180

181181
// Run interactive mode

0 commit comments

Comments
 (0)