diff --git a/config/sst_check_shm.m4 b/config/sst_check_shm.m4 new file mode 100644 index 0000000000..c57a0dfffd --- /dev/null +++ b/config/sst_check_shm.m4 @@ -0,0 +1,24 @@ + +AC_DEFUN([SST_CHECK_SHM], [ + + sst_check_shm_happy="yes" + + CPPFLAGS_saved="$CPPFLAGS" + LDFLAGS_saved="$LDFLAGS" + LIBS_saved="$LIBS" + + AC_LANG_PUSH(C) + AC_SEARCH_LIBS([shm_open], [rt], [SHM_LIB="$LIBS"], [sst_check_shm_happy="no"]) + AC_LANG_POP(C) + + CPPFLAGS="$CPPFLAGS_saved" + LDFLAGS="$LDFLAGS_saved" + LIBS="$LIBS_saved" + + AC_SUBST([SHM_LIB]) + AM_CONDITIONAL([HAVE_SHM], [test "$sst_check_shm_happy" = "yes"]) + AS_IF([test "$sst_check_shm_happy" = "yes"], + [AC_DEFINE([HAVE_SHM], [1], [Set to 1 if SHM was found])]) + + AS_IF([test "$sst_check_shm_happy" = "yes"], [$1], [$2]) +]) diff --git a/src/sst/elements/CramSim/c_DramSimTraceReader.cpp b/src/sst/elements/CramSim/c_DramSimTraceReader.cpp index a6a8f86e4d..fcad5b855a 100644 --- a/src/sst/elements/CramSim/c_DramSimTraceReader.cpp +++ b/src/sst/elements/CramSim/c_DramSimTraceReader.cpp @@ -19,7 +19,8 @@ #include #include #include -#include + +#include //local includes #include "c_DramSimTraceReader.hpp" @@ -168,8 +169,8 @@ void c_DramSimTraceReader::createTxn() { if (m_txnReqQ.size() < k_txnGenReqQEntries) { std::string l_line; if (std::getline(m_traceFileStream, l_line)) { - boost::char_separator sep(" "); - boost::tokenizer> l_tok(l_line, sep); + char_delimiter sep(" "); + Tokenizer<> l_tok(l_line, sep); unsigned l_numTokens = std::distance(l_tok.begin(), l_tok.end()); unsigned l_tokNum = 0; unsigned l_txnInterval = 0; @@ -177,7 +178,7 @@ void c_DramSimTraceReader::createTxn() { unsigned l_txnAddress = 0; unsigned l_txnDataWidth = 0; - for (boost::tokenizer>::iterator l_iter = + for (Tokenizer<>::iterator l_iter = l_tok.begin(); l_iter != l_tok.end(); ++l_iter) { switch (l_tokNum) { case 0: diff --git a/src/sst/elements/CramSim/c_DramSimTraceReader.hpp b/src/sst/elements/CramSim/c_DramSimTraceReader.hpp index 0d9c704203..17533c412c 100644 --- a/src/sst/elements/CramSim/c_DramSimTraceReader.hpp +++ b/src/sst/elements/CramSim/c_DramSimTraceReader.hpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/sst/elements/CramSim/c_TracefileReader.cpp b/src/sst/elements/CramSim/c_TracefileReader.cpp index 659d1f4525..8b3e775c14 100644 --- a/src/sst/elements/CramSim/c_TracefileReader.cpp +++ b/src/sst/elements/CramSim/c_TracefileReader.cpp @@ -20,6 +20,7 @@ #include #include +#include //local includes @@ -160,7 +161,7 @@ void c_TracefileReader::createTxn() { if (m_txnReqQ.size() < k_txnGenReqQEntries) { std::string l_line; if (std::getline(m_traceFileStream, l_line)) { - boost::tokenizer<> l_tok(l_line); + Tokenizer<> l_tok(l_line); unsigned l_numTokens = std::distance(l_tok.begin(), l_tok.end()); assert((3==l_numTokens) || (4==l_numTokens)); unsigned l_tokNum = 0; @@ -169,7 +170,7 @@ void c_TracefileReader::createTxn() { unsigned l_txnAddress = 0; unsigned l_txnDataWidth = 0; - for (boost::tokenizer<>::iterator l_iter = l_tok.begin(); + for (Tokenizer<>::iterator l_iter = l_tok.begin(); l_iter != l_tok.end(); ++l_iter){ switch (l_tokNum) { case 0: diff --git a/src/sst/elements/CramSim/c_USimmTraceReader.cpp b/src/sst/elements/CramSim/c_USimmTraceReader.cpp index 7bc5bd934e..c17b276d8e 100644 --- a/src/sst/elements/CramSim/c_USimmTraceReader.cpp +++ b/src/sst/elements/CramSim/c_USimmTraceReader.cpp @@ -20,8 +20,8 @@ #include #include #include -#include +#include //local includes #include "c_USimmTraceReader.hpp" @@ -177,8 +177,8 @@ void c_USimmTraceReader::createTxn() { if (m_txnReqQ.size() < k_txnGenReqQEntries) { std::string l_line; if (std::getline(m_traceFileStream, l_line)) { - boost::char_separator sep(" "); - boost::tokenizer> l_tok(l_line, sep); + char_delimiter sep(" "); + Tokenizer<> l_tok(l_line, sep); unsigned l_numTokens = std::distance(l_tok.begin(), l_tok.end()); unsigned l_tokNum = 0; unsigned l_txnInterval = 0; @@ -186,7 +186,7 @@ void c_USimmTraceReader::createTxn() { unsigned l_txnAddress = 0; unsigned l_txnDataWidth = 0; - for (boost::tokenizer>::iterator l_iter = l_tok.begin(); + for (Tokenizer<>::iterator l_iter = l_tok.begin(); l_iter != l_tok.end(); ++l_iter){ switch (l_tokNum) { case 0: diff --git a/src/sst/elements/CramSim/c_USimmTraceReader.hpp b/src/sst/elements/CramSim/c_USimmTraceReader.hpp index eb8ee27437..cbfcff5e8e 100644 --- a/src/sst/elements/CramSim/c_USimmTraceReader.hpp +++ b/src/sst/elements/CramSim/c_USimmTraceReader.hpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/sst/elements/ariel/Makefile.am b/src/sst/elements/ariel/Makefile.am index da37708fef..d37ac1924a 100644 --- a/src/sst/elements/ariel/Makefile.am +++ b/src/sst/elements/ariel/Makefile.am @@ -51,6 +51,7 @@ EXTRA_DIST = \ frontend/simple/examples/stream/stream.c libariel_la_LDFLAGS = -module -avoid-version +libariel_la_LIBADD = $(SHM_LIB) libariel_la_CPPFLAGS = \ -DARIEL_TRACE_LIB=$(libdir)/sst \ -DARIEL_TOOL_DIR="$(libexecdir)" \ diff --git a/src/sst/elements/ariel/configure.m4 b/src/sst/elements/ariel/configure.m4 index 9f3134c27a..151e26e76f 100644 --- a/src/sst/elements/ariel/configure.m4 +++ b/src/sst/elements/ariel/configure.m4 @@ -5,6 +5,7 @@ AC_DEFUN([SST_ariel_CONFIG], [ SST_CHECK_PINTOOL([have_pin=1],[have_pin=0],[AC_MSG_ERROR([PIN was requested but not found])]) SST_CHECK_PTRACE_SET_TRACER() + SST_CHECK_SHM() AS_IF( [test "$have_pin" = 1], [sst_check_ariel="yes"], [sst_check_ariel="no"] ) AS_IF([test "$sst_check_ariel" = "yes"], [$1], [$2]) diff --git a/src/sst/elements/firefly/loopBack.h b/src/sst/elements/firefly/loopBack.h index 56d3ffc741..0546b9e575 100644 --- a/src/sst/elements/firefly/loopBack.h +++ b/src/sst/elements/firefly/loopBack.h @@ -27,15 +27,6 @@ class LoopBackEvent : public Event { LoopBackEvent( int _core ) : Event(), core( _core ) {} int core; -// private: -// friend class boost::serialization::access; -// template -// void -// serialize(Archive & ar, const unsigned int version ) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Event); -// ar & BOOST_SERIALIZATION_NVP(core); -// } NotSerializable(LoopBackEvent) }; diff --git a/src/sst/elements/firefly/mem.h b/src/sst/elements/firefly/mem.h index a9d22d89b8..36deed9bd2 100644 --- a/src/sst/elements/firefly/mem.h +++ b/src/sst/elements/firefly/mem.h @@ -44,19 +44,6 @@ class MemCpyReqEvent : public Event { Addr from; size_t length; -// private: -// friend class boost::serialization::access; -// template -// void -// serialize(Archive & ar, const unsigned int version ) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Event); -// ar & BOOST_SERIALIZATION_NVP(callback); -// ar & BOOST_SERIALIZATION_NVP(core); -// ar & BOOST_SERIALIZATION_NVP(to); -// ar & BOOST_SERIALIZATION_NVP(from); -// ar & BOOST_SERIALIZATION_NVP(length); -// } NotSerializable(MemCpyReqEvent) }; @@ -78,18 +65,6 @@ class MemReadReqEvent : public Event { Addr addr; size_t length; -// private: -// friend class boost::serialization::access; -// template -// void -// serialize(Archive & ar, const unsigned int version ) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Event); -// ar & BOOST_SERIALIZATION_NVP(callback); -// ar & BOOST_SERIALIZATION_NVP(core); -// ar & BOOST_SERIALIZATION_NVP(addr); -// ar & BOOST_SERIALIZATION_NVP(length); -// } NotSerializable(MemReadReqEvent) }; @@ -111,18 +86,6 @@ class MemWriteReqEvent : public Event { Addr addr; size_t length; -// private: -// friend class boost::serialization::access; -// template -// void -// serialize(Archive & ar, const unsigned int version ) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Event); -// ar & BOOST_SERIALIZATION_NVP(callback); -// ar & BOOST_SERIALIZATION_NVP(core); -// ar & BOOST_SERIALIZATION_NVP(addr); -// ar & BOOST_SERIALIZATION_NVP(length); -// } NotSerializable(MemWriteReqEvent) }; @@ -136,15 +99,6 @@ class MemRespEvent : public Event { Callback callback; -// private: -// friend class boost::serialization::access; -// template -// void -// serialize(Archive & ar, const unsigned int version ) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Event); -// ar & BOOST_SERIALIZATION_NVP(callback); -// } NotSerializable(MemRespEvent) }; diff --git a/src/sst/elements/firefly/merlinEvent.h b/src/sst/elements/firefly/merlinEvent.h index 69382fd0fa..a3d05fbf0b 100644 --- a/src/sst/elements/firefly/merlinEvent.h +++ b/src/sst/elements/firefly/merlinEvent.h @@ -104,18 +104,6 @@ class FireflyNetworkEvent : public Event { size_t offset; size_t bufLen; -// friend class boost::serialization::access; -// template -// void -// serialize(Archive & ar, const unsigned int version ) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Event); -// ar & BOOST_SERIALIZATION_NVP(seq); -// ar & BOOST_SERIALIZATION_NVP(bufLen); -// ar & BOOST_SERIALIZATION_NVP(buf); -// ar & BOOST_SERIALIZATION_NVP(src); -// } - public: void serialize_order(SST::Core::Serialization::serializer &ser) { Event::serialize_order(ser); diff --git a/src/sst/elements/firefly/nic.h b/src/sst/elements/firefly/nic.h index a92d7c8d82..9a871634cb 100644 --- a/src/sst/elements/firefly/nic.h +++ b/src/sst/elements/firefly/nic.h @@ -55,18 +55,6 @@ class NicInitEvent : public Event { { } -// private: -// -// friend class boost::serialization::access; -// template -// void -// serialize(Archive & ar, const unsigned int version ) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Event); -// ar & BOOST_SERIALIZATION_NVP(node); -// ar & BOOST_SERIALIZATION_NVP(vNic); -// ar & BOOST_SERIALIZATION_NVP(num_vNics); -// } public: void serialize_order(SST::Core::Serialization::serializer &ser) { Event::serialize_order(ser); @@ -100,21 +88,6 @@ class NicCmdEvent : public Event { { } -// private: -// -// friend class boost::serialization::access; -// template -// void -// serialize(Archive & ar, const unsigned int version ) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Event); -// ar & BOOST_SERIALIZATION_NVP(type); -// ar & BOOST_SERIALIZATION_NVP(node); -// ar & BOOST_SERIALIZATION_NVP(dst_vNic); -// ar & BOOST_SERIALIZATION_NVP(tag); -// ar & BOOST_SERIALIZATION_NVP(iovec); -// ar & BOOST_SERIALIZATION_NVP(key); -// } NotSerializable(NicCmdEvent) }; @@ -158,21 +131,6 @@ class NicRespEvent : public Event { { } -// private: -// -// friend class boost::serialization::access; -// template -// void -// serialize(Archive & ar, const unsigned int version ) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Event); -// ar & BOOST_SERIALIZATION_NVP(type); -// ar & BOOST_SERIALIZATION_NVP(src_vNic); -// ar & BOOST_SERIALIZATION_NVP(node); -// ar & BOOST_SERIALIZATION_NVP(tag); -// ar & BOOST_SERIALIZATION_NVP(len); -// ar & BOOST_SERIALIZATION_NVP(key); -// } NotSerializable(NicRespEvent) }; diff --git a/src/sst/elements/memHierarchy/MESICoherenceController.cc b/src/sst/elements/memHierarchy/MESICoherenceController.cc index c959cb4481..fe79225d3d 100644 --- a/src/sst/elements/memHierarchy/MESICoherenceController.cc +++ b/src/sst/elements/memHierarchy/MESICoherenceController.cc @@ -693,7 +693,7 @@ CacheAction MESIController::handleFlushLineInvRequest(MemEvent * event, CacheLin cacheLine->setState(IM); return DONE; } - } else if (reqEvent->getCmd() == GetXResp) { + } else if (reqEvent->getCmd() == GetX) { cacheLine->setState(SM); return STALL; // Waiting for GetXResp } diff --git a/src/sst/elements/memHierarchy/bus.cc b/src/sst/elements/memHierarchy/bus.cc index ca0016c6dc..9c6c7053ab 100644 --- a/src/sst/elements/memHierarchy/bus.cc +++ b/src/sst/elements/memHierarchy/bus.cc @@ -27,7 +27,6 @@ #include "bus.h" #include -#include #include #include diff --git a/src/sst/elements/memHierarchy/cacheController.cc b/src/sst/elements/memHierarchy/cacheController.cc index f803ba9c84..8789e3f7fc 100644 --- a/src/sst/elements/memHierarchy/cacheController.cc +++ b/src/sst/elements/memHierarchy/cacheController.cc @@ -26,7 +26,6 @@ #include #include -#include #include "cacheController.h" #include "memEvent.h" diff --git a/src/sst/elements/memHierarchy/cacheEventProcessing.cc b/src/sst/elements/memHierarchy/cacheEventProcessing.cc index 0f3c060856..c97fb5a51b 100644 --- a/src/sst/elements/memHierarchy/cacheEventProcessing.cc +++ b/src/sst/elements/memHierarchy/cacheEventProcessing.cc @@ -23,7 +23,6 @@ #include "cacheController.h" #include "coherenceControllers.h" #include "hash.h" -#include #include #include "memEvent.h" diff --git a/src/sst/elements/memHierarchy/cacheFactory.cc b/src/sst/elements/memHierarchy/cacheFactory.cc index 03f2f918d8..e5e059d194 100644 --- a/src/sst/elements/memHierarchy/cacheFactory.cc +++ b/src/sst/elements/memHierarchy/cacheFactory.cc @@ -21,13 +21,13 @@ #include +#include #include #include "hash.h" #include "cacheController.h" #include "util.h" #include "cacheListener.h" #include -#include #include "mshr.h" #include "L1CoherenceController.h" #include "L1IncoherentController.h" @@ -103,10 +103,10 @@ Cache* Cache::cacheFactory(ComponentId_t id, Params ¶ms) { int dirNumEntries = params.find("noninclusive_directory_entries", 0); /* Convert all strings to lower case */ - boost::algorithm::to_lower(coherenceProtocol); - boost::algorithm::to_lower(replacement); - boost::algorithm::to_lower(dirReplacement); - boost::algorithm::to_lower(cacheType); + to_lower(coherenceProtocol); + to_lower(replacement); + to_lower(dirReplacement); + to_lower(cacheType); /* Check user specified all required fields */ if (frequency.empty()) dbg->fatal(CALL_INFO, -1, "Param not specified: frequency - cache frequency.\n"); @@ -169,25 +169,25 @@ Cache* Cache::cacheFactory(ComponentId_t id, Params ¶ms) { ReplacementMgr* replManager = NULL; ReplacementMgr* dirReplManager = NULL; if (cacheType == "inclusive" || cacheType == "noninclusive") { - if (boost::iequals(replacement, "lru")) replManager = new LRUReplacementMgr(dbg, numLines, associativity, true); - else if (boost::iequals(replacement, "lfu")) replManager = new LFUReplacementMgr(dbg, numLines, associativity); - else if (boost::iequals(replacement, "random")) replManager = new RandomReplacementMgr(dbg, associativity); - else if (boost::iequals(replacement, "mru")) replManager = new MRUReplacementMgr(dbg, numLines, associativity, true); - else if (boost::iequals(replacement, "nmru")) replManager = new NMRUReplacementMgr(dbg, numLines, associativity); + if (SST::strcasecmp(replacement, "lru")) replManager = new LRUReplacementMgr(dbg, numLines, associativity, true); + else if (SST::strcasecmp(replacement, "lfu")) replManager = new LFUReplacementMgr(dbg, numLines, associativity); + else if (SST::strcasecmp(replacement, "random")) replManager = new RandomReplacementMgr(dbg, associativity); + else if (SST::strcasecmp(replacement, "mru")) replManager = new MRUReplacementMgr(dbg, numLines, associativity, true); + else if (SST::strcasecmp(replacement, "nmru")) replManager = new NMRUReplacementMgr(dbg, numLines, associativity); else dbg->fatal(CALL_INFO, -1, "Invalid param: replacement_policy - supported policies are 'lru', 'lfu', 'random', 'mru', and 'nmru'. You specified %s.\n", replacement.c_str()); cacheArray = new SetAssociativeArray(dbg, numLines, lineSize, associativity, replManager, ht, !L1); } else if (cacheType == "noninclusive_with_directory") { - if (boost::iequals(replacement, "lru")) replManager = new LRUReplacementMgr(dbg, numLines, associativity, true); - else if (boost::iequals(replacement, "lfu")) replManager = new LFUReplacementMgr(dbg, numLines, associativity); - else if (boost::iequals(replacement, "random")) replManager = new RandomReplacementMgr(dbg, associativity); - else if (boost::iequals(replacement, "mru")) replManager = new MRUReplacementMgr(dbg, numLines, associativity, true); - else if (boost::iequals(replacement, "nmru")) replManager = new NMRUReplacementMgr(dbg, numLines, associativity); + if (SST::strcasecmp(replacement, "lru")) replManager = new LRUReplacementMgr(dbg, numLines, associativity, true); + else if (SST::strcasecmp(replacement, "lfu")) replManager = new LFUReplacementMgr(dbg, numLines, associativity); + else if (SST::strcasecmp(replacement, "random")) replManager = new RandomReplacementMgr(dbg, associativity); + else if (SST::strcasecmp(replacement, "mru")) replManager = new MRUReplacementMgr(dbg, numLines, associativity, true); + else if (SST::strcasecmp(replacement, "nmru")) replManager = new NMRUReplacementMgr(dbg, numLines, associativity); else dbg->fatal(CALL_INFO, -1, "Invalid param: replacement_policy - supported policies are 'lru', 'lfu', 'random', 'mru', and 'nmru'. You specified %s.\n", replacement.c_str()); - if (boost::iequals(dirReplacement, "lru")) dirReplManager = new LRUReplacementMgr(dbg, dirNumEntries, dirAssociativity, true); - else if (boost::iequals(dirReplacement, "lfu")) dirReplManager = new LFUReplacementMgr(dbg, dirNumEntries, dirAssociativity); - else if (boost::iequals(dirReplacement, "random")) dirReplManager = new RandomReplacementMgr(dbg, dirAssociativity); - else if (boost::iequals(dirReplacement, "mru")) dirReplManager = new MRUReplacementMgr(dbg, dirNumEntries, dirAssociativity, true); - else if (boost::iequals(dirReplacement, "nmru")) dirReplManager = new NMRUReplacementMgr(dbg, dirNumEntries, dirAssociativity); + if (SST::strcasecmp(dirReplacement, "lru")) dirReplManager = new LRUReplacementMgr(dbg, dirNumEntries, dirAssociativity, true); + else if (SST::strcasecmp(dirReplacement, "lfu")) dirReplManager = new LFUReplacementMgr(dbg, dirNumEntries, dirAssociativity); + else if (SST::strcasecmp(dirReplacement, "random")) dirReplManager = new RandomReplacementMgr(dbg, dirAssociativity); + else if (SST::strcasecmp(dirReplacement, "mru")) dirReplManager = new MRUReplacementMgr(dbg, dirNumEntries, dirAssociativity, true); + else if (SST::strcasecmp(dirReplacement, "nmru")) dirReplManager = new NMRUReplacementMgr(dbg, dirNumEntries, dirAssociativity); else dbg->fatal(CALL_INFO, -1, "Invalid param: directory_replacement_policy - supported policies are 'lru', 'lfu', 'random', 'mru', and 'nmru'. You specified %s.\n", replacement.c_str()); cacheArray = new DualSetAssociativeArray(dbg, static_cast(lineSize), ht, true, dirNumEntries, dirAssociativity, dirReplManager, numLines, associativity, replManager); } @@ -435,7 +435,7 @@ void Cache::configureLinks(Params ¶ms) { d_->debug(_INFO_, "Low Network Link ID: %u\n", (uint)link->getId()); lowNetPorts_->push_back(link); id++; - linkName = "low_network_" + boost::lexical_cast(id); + linkName = "low_network_" + std::to_string(id); } bottomNetworkLink_ = NULL; diff --git a/src/sst/elements/memHierarchy/libmemHierarchy.cc b/src/sst/elements/memHierarchy/libmemHierarchy.cc index 7299c1fdfe..d672e14e45 100644 --- a/src/sst/elements/memHierarchy/libmemHierarchy.cc +++ b/src/sst/elements/memHierarchy/libmemHierarchy.cc @@ -597,7 +597,7 @@ static SubComponent* create_Mem_RequestReorderSimple(Component * comp, Params& p static const ElementInfoParam requestReorderSimple_params[] = { {"verbose", "Sets the verbosity of the backend output", "0" }, - {"max_requests_per_cycle", "Maximum number of requests to issue per cycle. 0 or negative is unlimited.", "-1"}, + {"max_issue_per_cycle", "Maximum number of requests to issue per cycle. 0 or negative is unlimited.", "-1"}, {"search_window_size", "Maximum number of request to search each cycle. 0 or negative is unlimited.", "-1"}, {"backend", "Backend memory system", "memHierarchy.simpleDRAM"}, { NULL, NULL, NULL } @@ -610,7 +610,7 @@ static SubComponent* create_Mem_RequestReorderRow(Component * comp, Params& para static const ElementInfoParam requestReorderRow_params[] = { {"verbose", "Sets the verbosity of the backend output", "0" }, - {"max_requests_per_cycle", "Maximum number of requests to issue per cycle. 0 or negative is unlimited.", "-1"}, + {"max_issue_per_cycle", "Maximum number of requests to issue per cycle. 0 or negative is unlimited.", "-1"}, {"banks", "Number of banks", "8"}, {"bank_interleave_granularity", "Granularity of interleaving in bytes (B), generally a cache line. Must be a power of 2.", "64B"}, {"row_size", "Size of a row in bytes (B). Must be a power of 2.", "8KiB"}, diff --git a/src/sst/elements/memHierarchy/membackend/memBackend.h b/src/sst/elements/memHierarchy/membackend/memBackend.h index b2ea6ff244..3455a19020 100644 --- a/src/sst/elements/memHierarchy/membackend/memBackend.h +++ b/src/sst/elements/memHierarchy/membackend/memBackend.h @@ -51,8 +51,9 @@ class MemBackend : public SubComponent { output->fatal(CALL_INFO, -1, "MemBackend: clock is not set\n"); } - m_maxReqPerCycle = params.find<>("maxReqPerCycle",-1); - m_reqWidth = params.find<>("reqWidth",64); + m_maxReqPerCycle = params.find<>("max_requests_per_cycle",-1); + if (m_maxReqPerCycle == 0) m_maxReqPerCycle = -1; + m_reqWidth = params.find<>("request_width",64); bool found; UnitAlgebra backendRamSize = UnitAlgebra(params.find("mem_size", "0B", found)); diff --git a/src/sst/elements/memHierarchy/membackend/requestReorderByRow.cc b/src/sst/elements/memHierarchy/membackend/requestReorderByRow.cc index 30278f88e0..c76b49d44e 100644 --- a/src/sst/elements/memHierarchy/membackend/requestReorderByRow.cc +++ b/src/sst/elements/memHierarchy/membackend/requestReorderByRow.cc @@ -27,7 +27,8 @@ RequestReorderRow::RequestReorderRow(Component *comp, Params ¶ms) : SimpleMe fixupParams( params, "clock", "backend.clock" ); // Get parameters - reqsPerCycle = params.find("max_requests_per_cycle", -1); + reqsPerCycle = params.find("max_issue_per_cycle", -1); + banks = params.find("banks", 8); UnitAlgebra rowSize(params.find("row_size", "8KiB")); maxReqsPerRow = params.find("reorder_limit", 1); // No re-ordering diff --git a/src/sst/elements/memHierarchy/membackend/requestReorderSimple.cc b/src/sst/elements/memHierarchy/membackend/requestReorderSimple.cc index 9070a05aff..cb8845ab2f 100644 --- a/src/sst/elements/memHierarchy/membackend/requestReorderSimple.cc +++ b/src/sst/elements/memHierarchy/membackend/requestReorderSimple.cc @@ -26,7 +26,7 @@ RequestReorderSimple::RequestReorderSimple(Component *comp, Params ¶ms) : Si fixupParams( params, "clock", "backend.clock" ); - reqsPerCycle = params.find("max_requests_per_cycle", -1); + reqsPerCycle = params.find("max_issue_per_cycle", -1); searchWindowSize = params.find("search_window_size", -1); // Create our backend & copy 'mem_size' through for now diff --git a/src/sst/elements/memHierarchy/memoryController.cc b/src/sst/elements/memHierarchy/memoryController.cc index d2f6600797..187f98d63a 100644 --- a/src/sst/elements/memHierarchy/memoryController.cc +++ b/src/sst/elements/memHierarchy/memoryController.cc @@ -55,6 +55,7 @@ MemController::MemController(ComponentId_t id, Params ¶ms) : Component(id), fixupParams( params, "backend.", "backendConvertor.backend." ); fixupParams( params, "clock", "backendConvertor.backend.clock" ); fixupParams( params, "request_width", "backendConvertor.request_width" ); + fixupParams( params, "max_requests_per_cycle", "backendConvertor.backend.max_requests_per_cycle" ); // Output for debug dbg.init("@t:---> ", debugLevel, 0, (Output::output_location_t)params.find("debug", 0)); diff --git a/src/sst/elements/memHierarchy/mshr.h b/src/sst/elements/memHierarchy/mshr.h index fac9046917..5bc71fa56d 100644 --- a/src/sst/elements/memHierarchy/mshr.h +++ b/src/sst/elements/memHierarchy/mshr.h @@ -29,6 +29,7 @@ #include #include #include +#include namespace SST { namespace MemHierarchy { diff --git a/src/sst/elements/memHierarchy/tests/testBackendChaining.py b/src/sst/elements/memHierarchy/tests/testBackendChaining.py index 731056f0d6..3bbad9a468 100644 --- a/src/sst/elements/memHierarchy/tests/testBackendChaining.py +++ b/src/sst/elements/memHierarchy/tests/testBackendChaining.py @@ -169,7 +169,7 @@ "backend" : "memHierarchy.DelayBuffer", "backend.request_delay" : "20ns", "backend.backend" : "memHierarchy.reorderByRow", - "backend.backendmax_requests_per_cycle" : 2, + "backend.backend.max_issue_per_cycle" : 2, "backend.backend.reorder_limit" : "20", "backend.backend.backend" : "memHierarchy.simpleDRAM", "backend.backend.backend.tCAS" : 3, # 11@800MHz roughly coverted to 200MHz diff --git a/src/sst/elements/memHierarchy/tests/testBackendReorderRow.py b/src/sst/elements/memHierarchy/tests/testBackendReorderRow.py index 242cba1a41..1a2c5cb827 100644 --- a/src/sst/elements/memHierarchy/tests/testBackendReorderRow.py +++ b/src/sst/elements/memHierarchy/tests/testBackendReorderRow.py @@ -166,7 +166,7 @@ "max_requests_per_cycle" : 50, "do_not_back" : 1, "backend" : "memHierarchy.reorderByRow", - "backend.max_requests_per_cycle" : 2, + "backend.max_issue_per_cycle" : 2, "backend.reorder_limit" : "20", "backend.backend" : "memHierarchy.simpleDRAM", "backend.backend.tCAS" : 3, # 11@800MHz roughly coverted to 200MHz diff --git a/src/sst/elements/memHierarchy/tests/testBackendReorderSimple.py b/src/sst/elements/memHierarchy/tests/testBackendReorderSimple.py index b59f6236d3..ebff566f01 100644 --- a/src/sst/elements/memHierarchy/tests/testBackendReorderSimple.py +++ b/src/sst/elements/memHierarchy/tests/testBackendReorderSimple.py @@ -157,7 +157,7 @@ "max_requests_per_cycle" : 0, "do_not_back" : 1, "backend" : "memHierarchy.reorderSimple", - "backend.max_requests_per_cycle" : 2, + "backend.max_issue_per_cycle" : 2, "backend.search_window_size" : 5, "backend.backend" : "memHierarchy.simpleDRAM", "backend.backend.tCAS" : 3, # 11@800MHz roughly coverted to 200MHz diff --git a/src/sst/elements/memHierarchy/trivialCPU.cc b/src/sst/elements/memHierarchy/trivialCPU.cc index ff7a7704be..7aefde4726 100644 --- a/src/sst/elements/memHierarchy/trivialCPU.cc +++ b/src/sst/elements/memHierarchy/trivialCPU.cc @@ -111,9 +111,9 @@ void trivialCPU::handleEvent(Interfaces::SimpleMem::Request *req) } else { SimTime_t et = getCurrentSimTime() - i->second; requests.erase(i); - out.output("%s: Received Request with command %d (response to %" PRIu64 ", addr 0x%" PRIx64 ") [Time: %" PRIu64 "] [%zu outstanding requests]\n", + out.output("%s: Received Request with command %d (addr 0x%" PRIx64 ") [Time: %" PRIu64 "] [%zu outstanding requests]\n", getName().c_str(), - req->cmd, req->id, req->addr, et, + req->cmd, req->addr, et, requests.size()); num_reads_returned++; } @@ -183,8 +183,8 @@ bool trivialCPU::clockTic( Cycle_t ) memory->sendRequest(req); requests[req->id] = getCurrentSimTime(); - out.output("%s: %d Issued %s%s (%" PRIu64 ") for address 0x%" PRIx64 "\n", - getName().c_str(), numLS, noncacheable ? "Noncacheable " : "" , cmdString.c_str(), req->id, addr); + out.output("%s: %d Issued %s%s for address 0x%" PRIx64 "\n", + getName().c_str(), numLS, noncacheable ? "Noncacheable " : "" , cmdString.c_str(), addr); num_reads_issued++; numLS--; diff --git a/src/sst/elements/memHierarchy/util.h b/src/sst/elements/memHierarchy/util.h index 0fc1d61abb..7cb728bbcc 100644 --- a/src/sst/elements/memHierarchy/util.h +++ b/src/sst/elements/memHierarchy/util.h @@ -22,8 +22,7 @@ #ifndef UTIL_H #define UTIL_H -#include -#include +#include #include #include @@ -64,7 +63,6 @@ const unsigned int pebi = tebi * 1024; const unsigned int exbi = pebi * 1024; -using namespace boost::algorithm; using namespace std; /* diff --git a/src/sst/elements/merlin/hr_router/hr_router.cc b/src/sst/elements/merlin/hr_router/hr_router.cc index f07b1e5a8d..70a0262f33 100644 --- a/src/sst/elements/merlin/hr_router/hr_router.cc +++ b/src/sst/elements/merlin/hr_router/hr_router.cc @@ -283,7 +283,7 @@ hr_router::hr_router(ComponentId_t cid, Params& params) : xbar_stalls = new Statistic*[num_ports]; for ( int i = 0; i < num_ports; i++ ) { std::string port_name("port"); - port_name = port_name + boost::lexical_cast(i); + port_name = port_name + std::to_string(i); xbar_stalls[i] = registerStatistic("xbar_stalls",port_name); } } diff --git a/src/sst/elements/merlin/portControl.cc b/src/sst/elements/merlin/portControl.cc index 0e06943e67..853a3e1a05 100644 --- a/src/sst/elements/merlin/portControl.cc +++ b/src/sst/elements/merlin/portControl.cc @@ -17,8 +17,6 @@ #include "portControl.h" #include "merlin.h" -#include - #define TRACK 0 #define TRACK_ID 131 #define TRACK_PORT 4 @@ -207,7 +205,7 @@ PortControl::PortControl(Router* rif, int rtr_id, std::string link_port_name, // Register statistics std::string port_name("port"); - port_name = port_name + boost::lexical_cast(port_number); + port_name = port_name + std::to_string(port_number); send_bit_count = rif->registerStatistic("send_bit_count", port_name); send_packet_count = rif->registerStatistic("send_packet_count", port_name); diff --git a/src/sst/elements/prospero/Makefile.am b/src/sst/elements/prospero/Makefile.am index 3bd2f0f89b..96b9b39115 100644 --- a/src/sst/elements/prospero/Makefile.am +++ b/src/sst/elements/prospero/Makefile.am @@ -38,9 +38,10 @@ EXTRA_DIST = \ tracetool/api/prospero.h libprospero_la_LDFLAGS = -module -avoid-version +libprospero_la_LIBADD = $(SHM_LIB) if USE_LIBZ -libprospero_la_LIBADD = -lz +libprospero_la_LIBADD += -lz libprospero_la_SOURCES += \ prosbingzreader.h \ diff --git a/src/sst/elements/prospero/configure.m4 b/src/sst/elements/prospero/configure.m4 index 2c1ba39396..effc11fcbf 100644 --- a/src/sst/elements/prospero/configure.m4 +++ b/src/sst/elements/prospero/configure.m4 @@ -6,6 +6,7 @@ AC_DEFUN([SST_prospero_CONFIG], [ SST_CHECK_LIBZ() SST_CHECK_PINTOOL([have_pin=1],[have_pin=0],[]) + SST_CHECK_SHM() AS_IF([test "$prospero_happy" = "yes"], [$1], [$2]) ]) diff --git a/src/sst/elements/pyproto/Makefile.am b/src/sst/elements/pyproto/Makefile.am index 52df553750..21e8ecfd82 100644 --- a/src/sst/elements/pyproto/Makefile.am +++ b/src/sst/elements/pyproto/Makefile.am @@ -20,4 +20,6 @@ libpyproto_la_SOURCES = \ libpyproto_la_LDFLAGS = -module -avoid-version \ $(PYTHON_LDFLAGS) +# $(BOOST_LDFLAGS) +#libpyproto_la_LIBADD = -lboost_serialization$(BOOST_LIB_SUFFIX) diff --git a/src/sst/elements/scheduler/InputParser.cc b/src/sst/elements/scheduler/InputParser.cc index abd3fc6acf..d1d2430ada 100644 --- a/src/sst/elements/scheduler/InputParser.cc +++ b/src/sst/elements/scheduler/InputParser.cc @@ -19,12 +19,11 @@ #include #include -#include -#include // for reading YumYum jobs -#include #include +#include +#include "util.h" #include "InputParser.h" #include "Job.h" #include "Machine.h" @@ -82,9 +81,7 @@ JobParser::JobParser(Machine* machine, fileName = jobTrace; } - fileNamePath = boost::filesystem::path(fileName.c_str()); - folderPath = boost::filesystem::path(fileNamePath); - folderPath.remove_leaf(); + fileNamePath = fileName; } std::vector JobParser::parseJobs(SimTime_t currSimTime) @@ -100,7 +97,7 @@ std::vector JobParser::parseJobs(SimTime_t currSimTime) jobs.clear(); - LastJobFileModTime = boost::filesystem::last_write_time( fileNamePath ); + LastJobFileModTime = Utils::file_time_last_written( fileNamePath ); //read line by line string line; @@ -237,8 +234,8 @@ std::map > JobParser::parseJobsEmberRunning() */ bool JobParser::checkJobFile() { - if( boost::filesystem::exists( fileNamePath ) ){ - time_t lastWritten = boost::filesystem::last_write_time( fileNamePath ); + if( Utils::file_exists( fileNamePath ) ){ + time_t lastWritten = Utils::file_time_last_written( fileNamePath ); if( lastWritten > LastJobFileModTime ){ LastJobFileModTime = lastWritten; return true; @@ -257,7 +254,7 @@ bool JobParser::checkJobFile() */ bool JobParser::newYumYumJobLine(std::string line, SimTime_t currSimTime) { - boost::algorithm::trim(line); + trim(line); if (line.compare("YYKILL") == 0) { *YumYumSimulationKillFlag = true; @@ -272,13 +269,13 @@ bool JobParser::newYumYumJobLine(std::string line, SimTime_t currSimTime) uint64_t duration; uint64_t procs; - boost::tokenizer< boost::escaped_list_separator > Tokenizer(line); + Tokenizer< escaped_list_separator > Tokenizer(line); vector tokens; tokens.assign(Tokenizer.begin(), Tokenizer.end()); - boost::algorithm::trim(tokens.at(0)); - boost::algorithm::trim(tokens.at(1)); - boost::algorithm::trim(tokens.at(2)); + trim(tokens.at(0)); + trim(tokens.at(1)); + trim(tokens.at(2)); strncpy(ID, tokens.at(0).c_str(), JobIDlength); if (JobIDlength > 0) { diff --git a/src/sst/elements/scheduler/InputParser.h b/src/sst/elements/scheduler/InputParser.h index 8038fedeec..7e42828c6c 100644 --- a/src/sst/elements/scheduler/InputParser.h +++ b/src/sst/elements/scheduler/InputParser.h @@ -19,8 +19,6 @@ #include #include -#include - #include namespace SST { @@ -56,8 +54,7 @@ namespace SST { std::vector jobs; std::string fileName; - boost::filesystem::path fileNamePath; - boost::filesystem::path folderPath; + std::string fileNamePath; std::string jobTrace; std::string completedJobTrace; // NetworkSim: File that lists all jobs that has been completed in ember diff --git a/src/sst/elements/scheduler/Makefile.am b/src/sst/elements/scheduler/Makefile.am index df6063fc4d..a7b9ecc3f2 100644 --- a/src/sst/elements/scheduler/Makefile.am +++ b/src/sst/elements/scheduler/Makefile.am @@ -55,6 +55,8 @@ libscheduler_la_SOURCES = \ TaskMapper.h \ Torus3DMachine.cc \ Torus3DMachine.h \ + util.h \ + util.cc \ allocators/BestFitAllocator.cc \ allocators/BestFitAllocator.h \ allocators/ConstraintAllocator.cc \ @@ -141,8 +143,8 @@ EXTRA_DIST = \ simulations/test_DetailedNetwork.py \ simulations/test_DetailedNetwork.sim -libscheduler_la_LDFLAGS = -module -avoid-version $(BOOST_LDFLAGS) -libscheduler_la_LIBADD = -lboost_filesystem$(BOOST_LIB_SUFFIX) -lboost_thread$(BOOST_LIB_SUFFIX) +libscheduler_la_LDFLAGS = -module -avoid-version +libscheduler_la_LIBADD = if HAVE_GLPK libscheduler_la_LDFLAGS += $(GLPK_LDFLAGS) diff --git a/src/sst/elements/scheduler/allocators/ConstraintAllocator.cc b/src/sst/elements/scheduler/allocators/ConstraintAllocator.cc index a7415e44c3..5e6d959b64 100644 --- a/src/sst/elements/scheduler/allocators/ConstraintAllocator.cc +++ b/src/sst/elements/scheduler/allocators/ConstraintAllocator.cc @@ -24,8 +24,6 @@ #include #include -#include - #include "AllocInfo.h" #include "Job.h" #include "Machine.h" @@ -33,6 +31,8 @@ #include "SimpleMachine.h" #include "schedComponent.h" +#include + #define DEBUG false using namespace SST::Scheduler; @@ -209,7 +209,7 @@ bool ConstraintAllocator::constraints_changed(){ void ConstraintAllocator::read_constraints(){ - boost::char_separator space_separator( " " ); + SST::char_delimiter space_separator( " " ); std::ifstream ConstraintsStream(ConstraintsFileName.c_str(), std::ifstream::in ); while( !constraint_leaves.empty() ){ @@ -227,8 +227,8 @@ void ConstraintAllocator::read_constraints(){ std::vector * CurrentCluster = new std::vector(); getline(ConstraintsStream, curline); - boost::tokenizer< boost::char_separator > tok( curline, space_separator ); - for (boost::tokenizer< boost::char_separator >::iterator iter = tok.begin(); iter != tok.end(); ++iter) { + SST::Tokenizer<> tok( curline, space_separator ); + for (SST::Tokenizer<>::iterator iter = tok.begin(); iter != tok.end(); ++iter) { CurrentCluster->push_back(*iter); } diff --git a/src/sst/elements/scheduler/faultInjectionComponent.cc b/src/sst/elements/scheduler/faultInjectionComponent.cc index ce72c6f048..69849034db 100644 --- a/src/sst/elements/scheduler/faultInjectionComponent.cc +++ b/src/sst/elements/scheduler/faultInjectionComponent.cc @@ -19,16 +19,18 @@ #include "events/CommunicationEvent.h" #include "output.h" #include "misc.h" +#include "util.h" #include #include #include -#include -#include -#include +#include +#include + #include +#include using namespace SST; using namespace SST::Scheduler; @@ -125,7 +127,7 @@ std::map * faultInjectionComponent::readFailFile(){ // block until the token exists in the file. It should be the last line. while( !fileContainsToken ){ - if( boost::filesystem::exists( failFilename ) && fileLastWritten < boost::filesystem::last_write_time( failFilename ) ){ + if( Utils::file_exists( failFilename ) && fileLastWritten < Utils::file_time_last_written( failFilename ) ){ fileContainsToken = false; std::ifstream failFile; std::string fileLine; @@ -139,9 +141,9 @@ std::map * faultInjectionComponent::readFailFile(){ failFile.close(); if( fileContainsToken ){ - fileLastWritten = boost::filesystem::last_write_time( failFilename ); + fileLastWritten = Utils::file_time_last_written( failFilename ); }else{ - boost::this_thread::sleep( boost::posix_time::milliseconds( failPollFreq ) ); + std::this_thread::sleep_for( std::chrono::milliseconds( failPollFreq ) ); } } } @@ -153,16 +155,16 @@ std::map * faultInjectionComponent::readFailFile(){ while( std::getline( failFile, fileLine ) ){ if( fileLine.find( resumeSimulationToken ) == std::string::npos ){ - boost::tokenizer > Tokenizer( fileLine ); + Tokenizer tokenizer( fileLine ); std::vector tokens; - tokens.assign( Tokenizer.begin(), Tokenizer.end() ); + tokens.assign( tokenizer.begin(), tokenizer.end() ); if( 2 != tokens.size() ){ schedout.fatal( CALL_INFO, 1, "malformed line in failure file: %s\n", fileLine.c_str() ); } - boost::algorithm::trim( tokens.at( 0 ) ); - boost::algorithm::trim( tokens.at( 1 ) ); + trim( tokens.at( 0 ) ); + trim( tokens.at( 1 ) ); nodes->insert( std::pair( tokens.at( 0 ), tokens.at( 1 ) ) ); }else{ diff --git a/src/sst/elements/scheduler/faultInjectionComponent.h b/src/sst/elements/scheduler/faultInjectionComponent.h index 48e2fc7138..6fc8247b10 100644 --- a/src/sst/elements/scheduler/faultInjectionComponent.h +++ b/src/sst/elements/scheduler/faultInjectionComponent.h @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/sst/elements/scheduler/nodeComponent.cc b/src/sst/elements/scheduler/nodeComponent.cc index ac5addf988..434cef633d 100644 --- a/src/sst/elements/scheduler/nodeComponent.cc +++ b/src/sst/elements/scheduler/nodeComponent.cc @@ -24,11 +24,9 @@ #include #include -#include -#include - #include "sst/core/element.h" #include +#include #include "events/CommunicationEvent.h" #include "events/CompletionEvent.h" @@ -53,28 +51,28 @@ int yumyumJobKillRand48Seed; static std::ofstream faultLog; static std::ofstream errorLog; -void readCSVpairsIntoMap( boost::tokenizer< boost::escaped_list_separator > Tokenizer, std::map * Map ) +void readCSVpairsIntoMap( Tokenizer< escaped_list_separator > Tokenizer, std::map * Map ) { std::vector tokens; tokens.assign( Tokenizer.begin(), Tokenizer.end() ); for ( unsigned int counter = 0; counter < tokens.size(); counter += 2 ){ - boost::algorithm::trim( tokens.at( counter ) ); - boost::algorithm::trim( tokens.at( counter + 1 ) ); + trim( tokens.at( counter ) ); + trim( tokens.at( counter + 1 ) ); Map -> insert( std::pair( tokens.at( counter ), atof( tokens.at( counter + 1 ).c_str() ) ) ); } } -void readDelaysIntoMap( boost::tokenizer< boost::escaped_list_separator > Tokenizer, std::map > * FaultLatencyBounds, int nodeNum ){ +void readDelaysIntoMap( Tokenizer< escaped_list_separator > Tokenizer, std::map > * FaultLatencyBounds, int nodeNum ){ std::vector tokens; tokens.assign(Tokenizer.begin(), Tokenizer.end()); for(unsigned int counter = 0; counter + 2 < tokens.size(); counter += 3){ - boost::algorithm::trim(tokens.at(counter)); - boost::algorithm::trim(tokens.at(counter + 1)); - boost::algorithm::trim(tokens.at(counter + 2)); + trim(tokens.at(counter)); + trim(tokens.at(counter + 1)); + trim(tokens.at(counter + 2)); std::string faultName = tokens.at(counter); unsigned int lowerLatencyBound = atoi(tokens.at(counter + 1).c_str()); @@ -142,11 +140,11 @@ nodeComponent::nodeComponent(ComponentId_t id, Params& params) : SelfLink -> setDefaultTimeBase(registerTimeBase(SCHEDULER_TIME_BASE)); - readCSVpairsIntoMap(boost::tokenizer< boost::escaped_list_separator >(params.find("faultActivationRate")), &Faults); - readDelaysIntoMap(boost::tokenizer< boost::escaped_list_separator >(params.find("errorPropagationDelay")), &FaultLatencyBounds, nodeNum); - readCSVpairsIntoMap(boost::tokenizer< boost::escaped_list_separator >(params.find("errorCorrectionProbability")), &errorCorrectionProbability); - readCSVpairsIntoMap(boost::tokenizer< boost::escaped_list_separator >(params.find("errorMessageProbability")), &errorLogProbability); - readCSVpairsIntoMap(boost::tokenizer< boost::escaped_list_separator >(params.find("jobFailureProbability")), &jobKillProbability); + readCSVpairsIntoMap(Tokenizer< escaped_list_separator >(params.find("faultActivationRate")), &Faults); + readDelaysIntoMap(Tokenizer< escaped_list_separator >(params.find("errorPropagationDelay")), &FaultLatencyBounds, nodeNum); + readCSVpairsIntoMap(Tokenizer< escaped_list_separator >(params.find("errorCorrectionProbability")), &errorCorrectionProbability); + readCSVpairsIntoMap(Tokenizer< escaped_list_separator >(params.find("errorMessageProbability")), &errorLogProbability); + readCSVpairsIntoMap(Tokenizer< escaped_list_separator >(params.find("jobFailureProbability")), &jobKillProbability); yumyumFaultRand48State = (unsigned short *) malloc(3 * sizeof(short)); yumyumErrorLogRand48State = (unsigned short *) malloc(3 * sizeof(short)); diff --git a/src/sst/elements/scheduler/nodeComponent.h b/src/sst/elements/scheduler/nodeComponent.h index 7c5fe52c8e..66bd3372db 100644 --- a/src/sst/elements/scheduler/nodeComponent.h +++ b/src/sst/elements/scheduler/nodeComponent.h @@ -99,60 +99,6 @@ namespace SST { std::string ID; std::string nodeType; -// friend class boost::serialization::access; -// template -// void save(Archive & ar, const unsigned int version) const -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Component); -// ar & BOOST_SERIALIZATION_NVP(jobNum); -// ar & BOOST_SERIALIZATION_NVP(nodeNum); -// ar & BOOST_SERIALIZATION_NVP(Scheduler); -// ar & BOOST_SERIALIZATION_NVP(SelfLink); -// -// ar & BOOST_SERIALIZATION_NVP(ParentFaultLinks); -// ar & BOOST_SERIALIZATION_NVP(ChildFaultLinks); -// -// ar & BOOST_SERIALIZATION_NVP(Faults); -// ar & BOOST_SERIALIZATION_NVP(errorLogProbability); -// ar & BOOST_SERIALIZATION_NVP(faultLogFileName); -// ar & BOOST_SERIALIZATION_NVP(errorLogFileName); -// } -// -// template -// void load(Archive & ar, const unsigned int version) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Component); -// ar & BOOST_SERIALIZATION_NVP(jobNum); -// ar & BOOST_SERIALIZATION_NVP(nodeNum); -// ar & BOOST_SERIALIZATION_NVP(Scheduler); -// ar & BOOST_SERIALIZATION_NVP(SelfLink); -// -// ar & BOOST_SERIALIZATION_NVP(ParentFaultLinks); -// ar & BOOST_SERIALIZATION_NVP(ChildFaultLinks); -// -// ar & BOOST_SERIALIZATION_NVP(Faults); -// ar & BOOST_SERIALIZATION_NVP(errorLogProbability); -// ar & BOOST_SERIALIZATION_NVP(faultLogFileName); -// ar & BOOST_SERIALIZATION_NVP(errorLogFileName); -// -// //restore links -// Scheduler -> setFunctor(new SST::Event::Handler(this, -// &nodeComponent::handleEvent)); -// SelfLink -> setFunctor(new SST::Event::Handler(this, -// &nodeComponent::handleSelfEvent)); -// -// for (unsigned int counter = 0; counter < ParentFaultLinks.size(); counter++) { -// ParentFaultLinks.at( counter ) -> setFunctor(new SST::Event::Handler(this, -// &nodeComponent::handleEvent)); -// } -// -// -// for (unsigned int counter = 0; counter < ChildFaultLinks.size(); counter ++) { -// ChildFaultLinks.at(counter) -> setFunctor(new SST::Event::Handler(this, -// &nodeComponent::handleEvent)); -// } -// } -// BOOST_SERIALIZATION_SPLIT_MEMBER() }; } diff --git a/src/sst/elements/scheduler/schedComponent.cc b/src/sst/elements/scheduler/schedComponent.cc index 4ad9e1e77d..f5493c61f7 100644 --- a/src/sst/elements/scheduler/schedComponent.cc +++ b/src/sst/elements/scheduler/schedComponent.cc @@ -17,7 +17,8 @@ #include "sst/core/rng/mersenne.h" #include "schedComponent.h" -#include +#include +#include #include #include //debug @@ -319,7 +320,7 @@ void schedComponent::unregisterYourself() { if (useYumYumSimulationKill) { while( YumYumSimulationKillFlag != true && jobs.empty() ){ - boost::this_thread::sleep( boost::posix_time::milliseconds( YumYumPollWait ) ); + std::this_thread::sleep_for( std::chrono::milliseconds( YumYumPollWait ) ); if (jobParser -> checkJobFile()) { jobs = jobParser -> parseJobs(getCurrentSimTime()); if (!jobs.empty()) { diff --git a/src/sst/elements/scheduler/schedComponent.h b/src/sst/elements/scheduler/schedComponent.h index 63b6de2844..2ecabb1aef 100644 --- a/src/sst/elements/scheduler/schedComponent.h +++ b/src/sst/elements/scheduler/schedComponent.h @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -138,33 +137,6 @@ namespace SST { SST::RNG::SSTRandom* rng; //random number generator -// friend class boost::serialization::access; -// template -// void save(Archive & ar, const unsigned int version) const -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Component); -// ar & BOOST_SERIALIZATION_NVP(nodes); -// ar & BOOST_SERIALIZATION_NVP(selfLink); -// } -// -// template -// void load(Archive & ar, const unsigned int version) -// { -// ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Component); -// ar & BOOST_SERIALIZATION_NVP(nodes); -// ar & BOOST_SERIALIZATION_NVP(selfLink); -// //restore links -// for (unsigned int i = 0; i < nodes.size(); ++i) { -// nodes[i] -> setFunctor(new SST::Event::Handler(this, -// &schedComponent::handleCompletionEvent,i)); -// } -// -// selfLink -> setFunctor(new SST::Event::Handler(this, -// &schedComponent::handleJobArrivalEvent)); -// } -// -// BOOST_SERIALIZATION_SPLIT_MEMBER() - }; } diff --git a/src/sst/elements/scheduler/util.cc b/src/sst/elements/scheduler/util.cc new file mode 100644 index 0000000000..a65592a620 --- /dev/null +++ b/src/sst/elements/scheduler/util.cc @@ -0,0 +1,45 @@ +// Copyright 2009-2016 Sandia Corporation. Under the terms +// of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2016, Sandia Corporation +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#include "sst_config.h" + +#include +#include +#include +#include +#include + +namespace SST { +namespace Scheduler { +namespace Utils { + +bool file_exists(const std::string &path) { + struct stat sb; + return ( stat(path.c_str(), &sb) == 0 ); +} + + + +time_t file_time_last_written(const std::string &path) { + struct stat sb; + if ( stat(path.c_str(), &sb) == 0 ) { + return sb.st_mtime; + } + return (time_t)-1; +} + +} +} +} diff --git a/src/sst/elements/scheduler/util.h b/src/sst/elements/scheduler/util.h new file mode 100644 index 0000000000..01523c16e4 --- /dev/null +++ b/src/sst/elements/scheduler/util.h @@ -0,0 +1,32 @@ +// Copyright 2009-2016 Sandia Corporation. Under the terms +// of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. +// Government retains certain rights in this software. +// +// Copyright (c) 2009-2016, Sandia Corporation +// All rights reserved. +// +// Portions are copyright of other developers: +// See the file CONTRIBUTORS.TXT in the top level directory +// the distribution for more information. +// +// This file is part of the SST software package. For license +// information, see the LICENSE file in the top level directory of the +// distribution. + +#ifndef SST_SCHEDULER_UTIL_H__ +#define SST_SCHEDULER_UTIL_H__ + +#include +#include + +namespace SST { +namespace Scheduler { +namespace Utils { + +bool file_exists(const std::string &path); +time_t file_time_last_written(const std::string &path); + +} +} +} +#endif