add SST packages and dependencies (#16618)
This commit is contained in:
parent
cfb6f21236
commit
bcd5dd6e3e
30
var/spack/repos/builtin/packages/dramsim2/package.py
Normal file
30
var/spack/repos/builtin/packages/dramsim2/package.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Dramsim2(MakefilePackage):
|
||||
"""
|
||||
DRAMsim is a hardware-validated, cycle-accurate
|
||||
C based simulator for DRAM devices such as DDR3
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/umd-memsys/DRAMSim2"
|
||||
git = "https://github.com/umd-memsys/DRAMSim2"
|
||||
url = "https://github.com/dramninjasUMD/DRAMSim2/archive/v2.2.2.tar.gz"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
version('2.2.2', sha256="96d0257eafb41e38ffa4f13e3ef3759567bdde7fa3329403f324abd0ddf8d015")
|
||||
|
||||
def build(self, spec, prefix):
|
||||
if spec.satisfies("platform=darwin"):
|
||||
make("libdramsim.dylib")
|
||||
else:
|
||||
make("libdramsim.so")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree(".", prefix)
|
28
var/spack/repos/builtin/packages/goblin-hmc-sim/package.py
Normal file
28
var/spack/repos/builtin/packages/goblin-hmc-sim/package.py
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class GoblinHmcSim(MakefilePackage):
|
||||
"""
|
||||
The Goblin HMC-Sim is a Hybrid Memory Cube
|
||||
Functional Simulation Environment
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/tactcomplabs/gc64-hmcsim"
|
||||
git = "https://github.com/tactcomplabs/gc64-hmcsim"
|
||||
# The version numbers track the SST they were released with
|
||||
url = "https://github.com/tactcomplabs/gc64-hmcsim/archive/sst-8.0.0-release.tar.gz"
|
||||
# This works with parallel builds outside Spack
|
||||
# For some reason .o files get thrashed inside Spack
|
||||
parallel = False
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
version('8.0.0', sha256="8a5e6b701865a581f15965d3ddd8c7d301b15f4b63543c444058e9c3688fd2c8")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree(".", prefix)
|
23
var/spack/repos/builtin/packages/hbm-dramsim2/package.py
Normal file
23
var/spack/repos/builtin/packages/hbm-dramsim2/package.py
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class HbmDramsim2(MakefilePackage):
|
||||
"""
|
||||
HBM Simulator based on DRAMSim2
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/tactcomplabs/HBM"
|
||||
git = "https://github.com/tactcomplabs/HBM"
|
||||
url = "https://github.com/tactcomplabs/HBM/archive/hbm-1.0.0-release.tar.gz"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
version('1.0.0', sha256="0efad11c58197edb47ad1359f8f93fb45d882c6bebcf9f2143e0df7a719689a0")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree(".", prefix)
|
20
var/spack/repos/builtin/packages/hybridsim/makefile.patch
Normal file
20
var/spack/repos/builtin/packages/hybridsim/makefile.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c43f1e2..8b3bd86 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -14,12 +14,11 @@ endif
|
||||
CXXFLAGS+=$(OPTFLAGS)
|
||||
|
||||
CUR_DIRECTORY=$(shell pwd)
|
||||
-DRAM_LIB=$(CUR_DIRECTORY)/../DRAMSim2
|
||||
-NV_LIB=$(CUR_DIRECTORY)/../NVDIMMSim/src
|
||||
-#NV_LIB=$(CUR_DIRECTORY)/../FNVSim
|
||||
+DRAM_LIB=$(CUR_DIRECTORY)/DRAMSim2
|
||||
+NV_LIB=$(CUR_DIRECTORY)/NVDIMMSim
|
||||
|
||||
INCLUDES=-I$(DRAM_LIB) -I$(NV_LIB)
|
||||
-LIBS=-L${DRAM_LIB} -L${NV_LIB} -ldramsim -lnvdsim -Wl,-rpath ${DRAM_LIB} -Wl,-rpath ${NV_LIB}
|
||||
+LIBS=-L${DRAM_LIB} -L${NV_LIB} -ldramsim -lnvdsim -Wl,-rpath -Wl,${DRAM_LIB} -Wl,-rpath -Wl,${NV_LIB}
|
||||
|
||||
EXE_NAME=HybridSim
|
||||
LIB_NAME=libhybridsim.so
|
37
var/spack/repos/builtin/packages/hybridsim/package.py
Normal file
37
var/spack/repos/builtin/packages/hybridsim/package.py
Normal file
@ -0,0 +1,37 @@
|
||||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Hybridsim(MakefilePackage):
|
||||
"""
|
||||
HybridSim provides cycle-accurate simulation of a non-volatile
|
||||
memory system augmented with a DRAM based cache. It uses DRAMSim2
|
||||
for the DRAM model and NVDIMMSim for the non-volatile memory model
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/jimstevens2001/HybridSim"
|
||||
git = "https://github.com/jimstevens2001/HybridSim"
|
||||
url = "https://github.com/jimstevens2001/HybridSim/archive/v2.0.1.tar.gz"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
version('2.0.1', sha256="57b82ac929acd36de84525e4d61358f1ab6532f5b635ca3f560e563479921937")
|
||||
|
||||
depends_on("dramsim2")
|
||||
depends_on("nvdimmsim")
|
||||
patch("makefile.patch", when="@2.0.1")
|
||||
|
||||
def build(self, spec, prefix):
|
||||
symlink(spec["dramsim2"].prefix, "DRAMSim2")
|
||||
symlink(spec["nvdimmsim"].prefix, "NVDIMMSim")
|
||||
if spec.satisfies("platform=darwin"):
|
||||
make("libhybridsim.dylib")
|
||||
else:
|
||||
make("libhybridsim.so")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree(".", prefix)
|
@ -19,6 +19,7 @@ class IntelPin(Package):
|
||||
version('3.11', sha256='aa5abca475a6e106a75e6ed4ba518fb75a57549a59f00681e6bd6e3f221bd23a', url='https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.11-97998-g7ecce2dac-gcc-linux.tar.gz')
|
||||
version('3.10', sha256='7c8f14c3a0654bab662b58aba460403138fa44517bd40052501e8e0075b2702a', url='https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.10-97971-gc5e41af74-gcc-linux.tar.gz')
|
||||
version('3.7', sha256='4730328795be61f1addb0e505a3792a4b4ca80b1b9405acf217beec6b5b90fb8', url='https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.7-97619-g0d0c92f4f-gcc-linux.tar.gz')
|
||||
version('2.14', sha256="1c29f589515772411a699a82fc4a3156cad95863a29741dfa6522865d4d281a1", url="https://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree('.', prefix)
|
||||
|
32
var/spack/repos/builtin/packages/nvdimmsim/package.py
Normal file
32
var/spack/repos/builtin/packages/nvdimmsim/package.py
Normal file
@ -0,0 +1,32 @@
|
||||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Nvdimmsim(MakefilePackage):
|
||||
"""
|
||||
NVDIMMSim is a cycle-accurate non-volatile memory simulator
|
||||
for devices such as NAND flash
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/slunk/NVDIMMSim"
|
||||
git = "https://github.com/slunk/NVDIMMSim"
|
||||
url = "https://github.com/jimstevens2001/NVDIMMSim/archive/v2.0.0.tar.gz"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
version('2.0.0', sha256="2a621ef10be5e52a1f543985d08354a2e6ee6532b5720e5f17ad6362cfd4adef")
|
||||
|
||||
def build(self, spec, prefix):
|
||||
with working_dir("src"):
|
||||
if spec.satisfies("platform=darwin"):
|
||||
make("libnvdsim.dylib")
|
||||
else:
|
||||
make("libnvdsim.so")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir("src"):
|
||||
install_tree(".", prefix)
|
35
var/spack/repos/builtin/packages/ramulator/package.py
Normal file
35
var/spack/repos/builtin/packages/ramulator/package.py
Normal file
@ -0,0 +1,35 @@
|
||||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Ramulator(MakefilePackage):
|
||||
"""
|
||||
Ramulator is a fast and cycle-accurate DRAM simulator that supports
|
||||
a wide array of commercial, as well as academic, DRAM standards.
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/CMU-SAFARI/ramulator"
|
||||
git = "https://github.com/CMU-SAFARI/ramulator"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
version('sst', commit="7d2e72306c6079768e11a1867eb67b60cee34a1c")
|
||||
|
||||
patch('ramulator_sha_7d2e723_gcc48Patch.patch', when="@sst")
|
||||
patch('ramulator_sha_7d2e723_libPatch.patch', when="@sst")
|
||||
|
||||
def patch(self):
|
||||
filter_file('-fpic', self.compiler.cxx_pic_flag, "Makefile")
|
||||
|
||||
def build(self, spec, prefix):
|
||||
if spec.satisfies("platform=darwin"):
|
||||
make("libramulator.a")
|
||||
else:
|
||||
make("libramulator.so")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
install_tree(".", prefix)
|
@ -0,0 +1,250 @@
|
||||
diff --git a/src/Scheduler.h b/src/Scheduler.h
|
||||
index c8561c1..38f924d 100644
|
||||
--- a/src/Scheduler.h
|
||||
+++ b/src/Scheduler.h
|
||||
@@ -9,8 +9,10 @@
|
||||
#include <list>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
+#include <utility>
|
||||
|
||||
using namespace std;
|
||||
+using namespace std::placeholders;
|
||||
|
||||
namespace ramulator
|
||||
{
|
||||
@@ -22,18 +24,66 @@ template <typename T>
|
||||
class Scheduler
|
||||
{
|
||||
public:
|
||||
- Controller<T>* ctrl;
|
||||
-
|
||||
- enum class Type {
|
||||
- FCFS, FRFCFS, FRFCFS_Cap, FRFCFS_PriorHit, MAX
|
||||
- } type = Type::FRFCFS_Cap;
|
||||
- //} type = Type::FCFS;
|
||||
-
|
||||
- long cap = 16;
|
||||
+ Controller<T>* ctrl;
|
||||
+
|
||||
+ enum class Type {
|
||||
+ FCFS, FRFCFS, FRFCFS_Cap, FRFCFS_PriorHit, MAX
|
||||
+ } type = Type::FRFCFS_Cap;
|
||||
+ //} type = Type::FCFS;
|
||||
+
|
||||
+ long cap = 16;
|
||||
+
|
||||
+ Scheduler(Controller<T>* _ctrl) : ctrl(_ctrl) {
|
||||
|
||||
- Scheduler(Controller<T>* ctrl) : ctrl(ctrl) {}
|
||||
-
|
||||
- list<Request>::iterator get_head(list<Request>& q)
|
||||
+ // FCFS
|
||||
+ compare[0] = std::bind([] (ReqIter req1, ReqIter req2, Scheduler *obj) -> ReqIter {
|
||||
+ if (req1->arrive <= req2->arrive) return req1;
|
||||
+ return req2;}, _1, _2, std::move(this));
|
||||
+
|
||||
+ // FRFCFS
|
||||
+ compare[1] = std::bind([] (ReqIter req1, ReqIter req2, Scheduler *obj) -> ReqIter {
|
||||
+ bool ready1 = obj->ctrl->is_ready(req1);
|
||||
+ bool ready2 = obj->ctrl->is_ready(req2);
|
||||
+
|
||||
+ if (ready1 ^ ready2) {
|
||||
+ if (ready1) return req1;
|
||||
+ return req2;
|
||||
+ }
|
||||
+
|
||||
+ if (req1->arrive <= req2->arrive) return req1;
|
||||
+ return req2;}, _1, _2, std::move(this));
|
||||
+
|
||||
+ // FRFCFS_CAP
|
||||
+ compare[2] = std::bind([] (ReqIter req1, ReqIter req2, Scheduler *obj) -> ReqIter {
|
||||
+ bool ready1 = obj->ctrl->is_ready(req1);
|
||||
+ bool ready2 = obj->ctrl->is_ready(req2);
|
||||
+
|
||||
+ ready1 = ready1 && (obj->ctrl->rowtable->get_hits(req1->addr_vec) <= obj->cap);
|
||||
+ ready2 = ready2 && (obj->ctrl->rowtable->get_hits(req2->addr_vec) <= obj->cap);
|
||||
+
|
||||
+ if (ready1 ^ ready2) {
|
||||
+ if (ready1) return req1;
|
||||
+ return req2;
|
||||
+ }
|
||||
+
|
||||
+ if (req1->arrive <= req2->arrive) return req1;
|
||||
+ return req2;}, _1, _2, this);
|
||||
+
|
||||
+ // FRFCFS_PriorHit
|
||||
+ compare[3] = std::bind([] (ReqIter req1, ReqIter req2, Scheduler *obj) -> ReqIter {
|
||||
+ bool ready1 = obj->ctrl->is_ready(req1) && obj->ctrl->is_row_hit(req1);
|
||||
+ bool ready2 = obj->ctrl->is_ready(req2) && obj->ctrl->is_row_hit(req2);
|
||||
+
|
||||
+ if (ready1 ^ ready2) {
|
||||
+ if (ready1) return req1;
|
||||
+ return req2;
|
||||
+ }
|
||||
+
|
||||
+ if (req1->arrive <= req2->arrive) return req1;
|
||||
+ return req2;}, _1, _2, this);
|
||||
+ }
|
||||
+
|
||||
+ list<Request>::iterator get_head(list<Request>& q)
|
||||
{
|
||||
// TODO make the decision at compile time
|
||||
if (type != Type::FRFCFS_PriorHit) {
|
||||
@@ -106,55 +156,8 @@ public:
|
||||
|
||||
private:
|
||||
typedef list<Request>::iterator ReqIter;
|
||||
- function<ReqIter(ReqIter, ReqIter)> compare[int(Type::MAX)] = {
|
||||
- // FCFS
|
||||
- [this] (ReqIter req1, ReqIter req2) {
|
||||
- if (req1->arrive <= req2->arrive) return req1;
|
||||
- return req2;},
|
||||
-
|
||||
- // FRFCFS
|
||||
- [this] (ReqIter req1, ReqIter req2) {
|
||||
- bool ready1 = this->ctrl->is_ready(req1);
|
||||
- bool ready2 = this->ctrl->is_ready(req2);
|
||||
-
|
||||
- if (ready1 ^ ready2) {
|
||||
- if (ready1) return req1;
|
||||
- return req2;
|
||||
- }
|
||||
-
|
||||
- if (req1->arrive <= req2->arrive) return req1;
|
||||
- return req2;},
|
||||
-
|
||||
- // FRFCFS_CAP
|
||||
- [this] (ReqIter req1, ReqIter req2) {
|
||||
- bool ready1 = this->ctrl->is_ready(req1);
|
||||
- bool ready2 = this->ctrl->is_ready(req2);
|
||||
-
|
||||
- ready1 = ready1 && (this->ctrl->rowtable->get_hits(req1->addr_vec) <= this->cap);
|
||||
- ready2 = ready2 && (this->ctrl->rowtable->get_hits(req2->addr_vec) <= this->cap);
|
||||
-
|
||||
- if (ready1 ^ ready2) {
|
||||
- if (ready1) return req1;
|
||||
- return req2;
|
||||
- }
|
||||
-
|
||||
- if (req1->arrive <= req2->arrive) return req1;
|
||||
- return req2;},
|
||||
- // FRFCFS_PriorHit
|
||||
- [this] (ReqIter req1, ReqIter req2) {
|
||||
- bool ready1 = this->ctrl->is_ready(req1) && this->ctrl->is_row_hit(req1);
|
||||
- bool ready2 = this->ctrl->is_ready(req2) && this->ctrl->is_row_hit(req2);
|
||||
-
|
||||
- if (ready1 ^ ready2) {
|
||||
- if (ready1) return req1;
|
||||
- return req2;
|
||||
- }
|
||||
-
|
||||
- if (req1->arrive <= req2->arrive) return req1;
|
||||
- return req2;}
|
||||
- };
|
||||
-};
|
||||
-
|
||||
+ function<ReqIter(ReqIter, ReqIter)> compare[int(Type::MAX)];
|
||||
+ };
|
||||
|
||||
template <typename T>
|
||||
class RowPolicy
|
||||
@@ -168,50 +171,52 @@ public:
|
||||
|
||||
int timeout = 50;
|
||||
|
||||
- RowPolicy(Controller<T>* ctrl) : ctrl(ctrl) {}
|
||||
-
|
||||
- vector<int> get_victim(typename T::Command cmd)
|
||||
- {
|
||||
- return policy[int(type)](cmd);
|
||||
- }
|
||||
-
|
||||
-private:
|
||||
- function<vector<int>(typename T::Command)> policy[int(Type::MAX)] = {
|
||||
- // Closed
|
||||
- [this] (typename T::Command cmd) -> vector<int> {
|
||||
- for (auto& kv : this->ctrl->rowtable->table) {
|
||||
- if (!this->ctrl->is_ready(cmd, kv.first))
|
||||
+ RowPolicy(Controller<T>* _ctrl) : ctrl(_ctrl) {
|
||||
+ // Closed
|
||||
+ policy[0] = std::bind([] (typename T::Command cmd, RowPolicy *obj) -> vector<int> {
|
||||
+ for (auto& kv : obj->ctrl->rowtable->table) {
|
||||
+ if (!obj->ctrl->is_ready(cmd, kv.first))
|
||||
continue;
|
||||
return kv.first;
|
||||
}
|
||||
- return vector<int>();},
|
||||
+ return vector<int>();}, _1, this);
|
||||
|
||||
// ClosedAP
|
||||
- [this] (typename T::Command cmd) -> vector<int> {
|
||||
- for (auto& kv : this->ctrl->rowtable->table) {
|
||||
- if (!this->ctrl->is_ready(cmd, kv.first))
|
||||
- continue;
|
||||
- return kv.first;
|
||||
- }
|
||||
- return vector<int>();},
|
||||
+ policy[1] = std::bind([] (typename T::Command cmd, RowPolicy *obj) -> vector<int> {
|
||||
+ for (auto& kv : obj->ctrl->rowtable->table) {
|
||||
+ if (!obj->ctrl->is_ready(cmd, kv.first))
|
||||
+ continue;
|
||||
+ return kv.first;
|
||||
+ }
|
||||
+ return vector<int>();}, _1, this);
|
||||
|
||||
// Opened
|
||||
- [this] (typename T::Command cmd) {
|
||||
- return vector<int>();},
|
||||
-
|
||||
- // Timeout
|
||||
- [this] (typename T::Command cmd) -> vector<int> {
|
||||
- for (auto& kv : this->ctrl->rowtable->table) {
|
||||
- auto& entry = kv.second;
|
||||
- if (this->ctrl->clk - entry.timestamp < timeout)
|
||||
- continue;
|
||||
- if (!this->ctrl->is_ready(cmd, kv.first))
|
||||
- continue;
|
||||
- return kv.first;
|
||||
- }
|
||||
- return vector<int>();}
|
||||
- };
|
||||
+ policy[2] = std::bind([] (typename T::Command cmd, RowPolicy *obj) -> vector<int> {
|
||||
+ return vector<int>();}, _1, this);
|
||||
+
|
||||
+ // Timeout
|
||||
+ policy[3] = std::bind([] (typename T::Command cmd, RowPolicy *obj) -> vector<int> {
|
||||
+ for (auto& kv : obj->ctrl->rowtable->table) {
|
||||
+ auto& entry = kv.second;
|
||||
+ if (obj->ctrl->clk - entry.timestamp < obj->timeout)
|
||||
+ continue;
|
||||
+ if (!obj->ctrl->is_ready(cmd, kv.first))
|
||||
+ continue;
|
||||
+ return kv.first;
|
||||
+ }
|
||||
+ return vector<int>();}, _1, this);
|
||||
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ vector<int> get_victim(typename T::Command cmd)
|
||||
+ {
|
||||
+ return policy[int(type)](cmd);
|
||||
+ }
|
||||
+
|
||||
+private:
|
||||
+ function<vector<int>(typename T::Command)> policy[int(Type::MAX)];
|
||||
};
|
||||
|
||||
|
||||
@@ -304,7 +309,8 @@ public:
|
||||
|
||||
return itr->second.row;
|
||||
}
|
||||
-};
|
||||
+ };
|
||||
+
|
||||
|
||||
} /*namespace ramulator*/
|
||||
|
@ -0,0 +1,23 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index ea340c8..314113d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -9,7 +9,7 @@ OBJS := $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SRCS))
|
||||
# g++ 4.x due to an internal compiler error when processing lambda functions.
|
||||
CXX := clang++
|
||||
# CXX := g++-5
|
||||
-CXXFLAGS := -O3 -std=c++11 -g -Wall
|
||||
+CXXFLAGS := -O3 -std=c++11 -g -Wall -fpic
|
||||
|
||||
.PHONY: all clean depend
|
||||
|
||||
@@ -38,6 +38,9 @@ ramulator: $(MAIN) $(OBJS) $(SRCDIR)/*.h | depend
|
||||
libramulator.a: $(OBJS) $(OBJDIR)/Gem5Wrapper.o
|
||||
libtool -static -o $@ $(OBJS) $(OBJDIR)/Gem5Wrapper.o
|
||||
|
||||
+libramulator.so: $(OBJS) $(OBJDIR)/Gem5Wrapper.o
|
||||
+ $(CXX) -shared -o $@ $(OBJS) $(OBJDIR)/Gem5Wrapper.o
|
||||
+
|
||||
$(OBJS): | $(OBJDIR)
|
||||
|
||||
$(OBJDIR):
|
@ -7,38 +7,71 @@
|
||||
|
||||
|
||||
class SstCore(AutotoolsPackage):
|
||||
"""The Structural Simulation Toolkit (SST) was developed to explore
|
||||
innovations in highly concurrent systems where the ISA, microarchitecture,
|
||||
and memory interact with the programming model and communications system"""
|
||||
"""The Structural Simulation Toolkit (SST) core
|
||||
provides a parallel discrete event simulation (PDES)
|
||||
framework for performing architecture simulations
|
||||
of existing and proposed HPC systems"""
|
||||
|
||||
homepage = "http://sst-simulator.org/"
|
||||
url = "https://github.com/sstsimulator/sst-core/releases/download/v8.0.0_Final/sstcore-8.0.0.tar.gz"
|
||||
git = "https://github.com/sstsimulator/sst-core.git"
|
||||
homepage = "https://github.com/sstsimulator"
|
||||
git = "https://github.com/sstsimulator/sst-core.git"
|
||||
url = "https://github.com/sstsimulator/sst-core/releases/download/v10.0.0_Final/sstcore-10.0.0.tar.gz"
|
||||
|
||||
version('develop', branch='devel')
|
||||
version('8.0.0', sha256='34a62425c3209cf80b6bca99cb0dcc328b67fb84ed92d5e6d6c975ad9319ba8a')
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
variant('mpi', default=True, description='Support multi-node simulations using MPI')
|
||||
variant('boost', default=False, description='Use boost')
|
||||
version('10.0.0', sha256="64cf93a46dfab011fba49244bf0e0efe25ef928c6fbde1d49003220d0eb7735a")
|
||||
version('9.1.0', sha256="cfeda39bb2ce9f32032480427517df62e852c0b3713797255e3b838075f3614d")
|
||||
version('develop', branch='devel')
|
||||
version('master', branch='master')
|
||||
|
||||
depends_on('autoconf@1.68:', type='build', when='@develop')
|
||||
depends_on('automake@1.11.1:', type='build', when='@develop')
|
||||
depends_on('libtool@1.2.4:', type='build', when='@develop')
|
||||
depends_on('m4', type='build', when='@develop')
|
||||
variant("pdes_mpi", default=True,
|
||||
description="Build support for parallel discrete event simulation")
|
||||
variant("zoltan", default=False,
|
||||
description="Use Zoltan for partitioning parallel runs")
|
||||
variant("hdf5", default=False,
|
||||
description="Build support for HDF5 statistic output")
|
||||
variant("zlib", default=False,
|
||||
description="Build support for ZLIB compression")
|
||||
variant("preview", default=False,
|
||||
description="Preview build with deprecated features removed")
|
||||
|
||||
depends_on('python@:2')
|
||||
depends_on('zlib', type='build')
|
||||
depends_on('mpi', when='+mpi')
|
||||
depends_on('boost@1.56.0:', type='build', when='+boost')
|
||||
depends_on("python", type=('build', 'run'))
|
||||
depends_on("mpi", when="+pdes_mpi")
|
||||
depends_on("zoltan", when="+zoltan")
|
||||
depends_on("hdf5", when="+hdf5")
|
||||
depends_on("zlib", when="+zlib")
|
||||
|
||||
depends_on('autoconf@1.68:', type='build', when='@master:')
|
||||
depends_on('automake@1.11.1:', type='build', when='@master:')
|
||||
depends_on('libtool@1.2.4:', type='build', when='@master:')
|
||||
depends_on('m4', type='build', when='@master:')
|
||||
|
||||
# force out-of-source builds
|
||||
build_directory = 'spack-build'
|
||||
|
||||
def autoreconf(self, spec, prefix):
|
||||
bash = which('bash')
|
||||
bash('autogen.sh')
|
||||
|
||||
def configure_args(self):
|
||||
args = []
|
||||
spec = self.spec
|
||||
if "+zoltan" in self.spec:
|
||||
args.append("--with-zoltan=%s" % self.spec["zoltan"].prefix)
|
||||
if "+hdf5" in self.spec:
|
||||
args.append("--with-hdf5=%s" % self.spec["hdf5"].prefix)
|
||||
if "+zlib" in self.spec:
|
||||
args.append("--with-zlib=%s" % self.spec["zlib"].prefix)
|
||||
|
||||
if '~mpi' in spec:
|
||||
args.append('--disable-mpi')
|
||||
if "+pdes_mpi" in self.spec:
|
||||
args.append("--enable-mpi")
|
||||
env['CC'] = self.spec['mpi'].mpicc
|
||||
env['CXX'] = self.spec['mpi'].mpicxx
|
||||
env['F77'] = self.spec['mpi'].mpif77
|
||||
env['FC'] = self.spec['mpi'].mpifc
|
||||
else:
|
||||
args.append("--disable-mpi")
|
||||
|
||||
if '+boost' in spec:
|
||||
args.append('--with-boost=%s' % spec['boost'].prefix)
|
||||
if "+preview" in self.spec:
|
||||
args.append("--enable-preview-build")
|
||||
|
||||
args.append("--with-python=%s" % self.spec["python"].prefix)
|
||||
return args
|
||||
|
101
var/spack/repos/builtin/packages/sst-elements/package.py
Normal file
101
var/spack/repos/builtin/packages/sst-elements/package.py
Normal file
@ -0,0 +1,101 @@
|
||||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class SstElements(AutotoolsPackage):
|
||||
"""SST Elements implements a range of components for performing
|
||||
architecture simulation from node-level to system-level using
|
||||
the SST discrete event core
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/sstsimulator"
|
||||
git = "https://github.com/sstsimulator/sst-elements.git"
|
||||
url = "https://github.com/sstsimulator/sst-elements/releases/download/v10.0.0_Final/sstelements-10.0.0.tar.gz"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
version('10.0.0', sha256="ecf28ef97b27ea75be7e64cb0acb99d36773a888c1b32ba16034c62174b02693")
|
||||
version('9.1.0', sha256="e19b05aa6e59728995fc059840c79e476ba866b67887ccde7eaf52a18a1f52ca")
|
||||
|
||||
version('develop', branch='devel')
|
||||
version('master', branch='master')
|
||||
|
||||
variant("pin", default=False,
|
||||
description="Enable the Ariel CPU model")
|
||||
variant("dramsim2", default=False,
|
||||
description="Build with DRAMSim2 support")
|
||||
variant("nvdimmsim", default=False,
|
||||
description="Build with NVDimmSim support")
|
||||
variant("hybridsim", default=False,
|
||||
description="Build with HybridSim support")
|
||||
variant("goblin", default=False,
|
||||
description="Build with GoblinHMCSim support")
|
||||
variant("hbm", default=False,
|
||||
description="Build with HBM DRAMSim2 support")
|
||||
variant("ramulator", default=False,
|
||||
description="Build with Ramulator support")
|
||||
|
||||
depends_on("python", type=('build', 'run'))
|
||||
depends_on("sst-core")
|
||||
depends_on("sst-core@develop", when="@develop")
|
||||
depends_on("sst-core@master", when="@master")
|
||||
|
||||
depends_on("intel-pin@2.14", when="+pin")
|
||||
depends_on("dramsim2@2.2", when="+dramsim2")
|
||||
depends_on("hybridsim@2.0.1", when="+hybridsim")
|
||||
depends_on("nvdimmsim@2.0.0", when="+nvdimmsim")
|
||||
depends_on("goblin-hmc-sim", when="+goblin")
|
||||
depends_on("ramulator@sst", when="+ramulator")
|
||||
depends_on("hbm-dramsim2", when="+hbm")
|
||||
depends_on("dramsim2@2.2.2", when="+hybridsim")
|
||||
depends_on("nvdimmsim@2.0.0", when="+hybridsim")
|
||||
|
||||
depends_on('autoconf@1.68:', type='build', when='@master:')
|
||||
depends_on('automake@1.11.1:', type='build', when='@master:')
|
||||
depends_on('libtool@1.2.4:', type='build', when='@master:')
|
||||
depends_on('m4', type='build', when='@master:')
|
||||
|
||||
# force out-of-source builds
|
||||
build_directory = 'spack-build'
|
||||
|
||||
def autoreconf(self, spec, prefix):
|
||||
bash = which('bash')
|
||||
bash('autogen.sh')
|
||||
|
||||
def configure_args(self):
|
||||
args = []
|
||||
if '+pdes_mpi' in self.spec["sst-core"]:
|
||||
env['CC'] = self.spec['mpi'].mpicc
|
||||
env['CXX'] = self.spec['mpi'].mpicxx
|
||||
env['F77'] = self.spec['mpi'].mpif77
|
||||
env['FC'] = self.spec['mpi'].mpifc
|
||||
|
||||
if "+pin" in self.spec:
|
||||
args.append("--with-pin=%s" % self.spec["intel-pin"].prefix)
|
||||
|
||||
if "+dramsim2" in self.spec or "+hybridsim" in self.spec:
|
||||
args.append("--with-dramsim=%s" % self.spec["dramsim2"].prefix)
|
||||
|
||||
if "+nvdimmsim" in self.spec or "+hybridsim" in self.spec:
|
||||
args.append("--with-nvdimmsim=%s" % self.spec["nvdimmsim"].prefix)
|
||||
|
||||
if "+hybridsim" in self.spec:
|
||||
args.append("--with-hybridsim=%s" % self.spec["hybridsim"].prefix)
|
||||
|
||||
if "+goblin" in self.spec:
|
||||
args.append("--with-goblin-hmcsim=%s" %
|
||||
self.spec["goblin-hmc-sim"].prefix)
|
||||
|
||||
if "+hbm" in self.spec:
|
||||
args.append("--with-hbmdramsim=%s" %
|
||||
self.spec["hbm-dramsim2"].prefix)
|
||||
|
||||
if "+ramulator" in self.spec:
|
||||
args.append("--with-ramulator=%s" % self.spec["ramulator"].prefix)
|
||||
|
||||
args.append("--with-sst-core=%s" % self.spec["sst-core"].prefix)
|
||||
return args
|
@ -16,48 +16,56 @@ class SstMacro(AutotoolsPackage):
|
||||
"""
|
||||
|
||||
homepage = "http://sst.sandia.gov/about_sstmacro.html"
|
||||
url = "https://github.com/sstsimulator/sst-macro/releases/download/v6.1.0_Final/sstmacro-6.1.0.tar.gz"
|
||||
git = "https://github.com/sstsimulator/sst-macro.git"
|
||||
git = "https://github.com/sstsimulator/sst-macro.git"
|
||||
url = "https://github.com/sstsimulator/sst-macro/releases/download/v10.0.0_Final/sstmacro-10.0.0.tar.gz"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
version('10.0.0', sha256='064b732256f3bec9b553e00bcbc9a1d82172ec194f2b69c8797f585200b12566')
|
||||
version('master', branch='master')
|
||||
version('develop', branch='devel')
|
||||
version('8.0.0', sha256='8618a259e98ede9a1a2ce854edd4930628c7c5a770c3915858fa840556c1861f')
|
||||
version('6.1.0', sha256='930b67313b594148d6356e550ca370214a9283858235321d3ef974191eb028d6')
|
||||
|
||||
depends_on('boost@1.59:', when='@:6.1.0')
|
||||
|
||||
depends_on('autoconf@1.68:', type='build', when='@develop')
|
||||
depends_on('automake@1.11.1:', type='build', when='@develop')
|
||||
depends_on('libtool@1.2.4:', type='build', when='@develop')
|
||||
depends_on('m4', type='build', when='@develop')
|
||||
depends_on('autoconf@1.68:', type='build', when='@master:')
|
||||
depends_on('automake@1.11.1:', type='build', when='@master:')
|
||||
depends_on('libtool@1.2.4:', type='build', when='@master:')
|
||||
depends_on('m4', type='build', when='@master:')
|
||||
|
||||
depends_on('binutils', type='build')
|
||||
depends_on('zlib', type=('build', 'link'))
|
||||
depends_on('otf2', when='+otf2')
|
||||
depends_on('llvm+clang@:5.99.99', when='+skeletonizer')
|
||||
depends_on('mpi', when='+mpi')
|
||||
depends_on('sst-core@8.0.0', when='@8.0.0 +core')
|
||||
depends_on('sst-core@develop', when='@develop +core')
|
||||
depends_on('llvm+clang@5:9', when='+skeletonizer')
|
||||
depends_on('mpi', when='+pdes_mpi')
|
||||
depends_on('sst-core@develop', when='@develop+core')
|
||||
depends_on('sst-core@master', when='@master+core')
|
||||
|
||||
variant('pdes_threads', default=True,
|
||||
description='Enable thread-parallel PDES simulation')
|
||||
variant('pdes_mpi', default=False,
|
||||
description='Enable distributed PDES simulation')
|
||||
variant('core', default=False, description='Use SST Core for PDES')
|
||||
variant('otf2', default=False,
|
||||
description='Enable OTF2 trace emission and replay support')
|
||||
variant('skeletonizer', default=False,
|
||||
description='Enable Clang source-to-source autoskeletonization')
|
||||
|
||||
variant('core', default=False, description='Use SST Core for PDES')
|
||||
variant('mpi', default=True, description='Enable distributed PDES simulation')
|
||||
variant('otf2', default=False, description='Enable OTF2 trace emission and replay support')
|
||||
variant('shared', default=True, description='Build shared libraries')
|
||||
variant('skeletonizer', default=False, description='Enable Clang source-to-source autoskeletonization')
|
||||
variant('static', default=True, description='Build static libraries')
|
||||
variant('threaded', default=False, description='Enable thread-parallel PDES simulation')
|
||||
variant('shared', default=True, description='Build shared libraries')
|
||||
|
||||
@run_before('autoreconf')
|
||||
def bootstrap(self):
|
||||
if '@develop' in self.spec:
|
||||
Executable('./bootstrap.sh')()
|
||||
variant('werror', default=False,
|
||||
description='Build with all warnings as errors')
|
||||
variant('warnings', default=False,
|
||||
description='Build with all possible warnings')
|
||||
|
||||
# force out-of-source builds
|
||||
build_directory = 'spack-build'
|
||||
|
||||
def autoreconf(self, spec, prefix):
|
||||
bash = which('bash')
|
||||
bash('./bootstrap.sh')
|
||||
|
||||
def configure_args(self):
|
||||
args = ['--disable-regex']
|
||||
|
||||
# Set CFLAGS and CXXFLAGS so they won't automatically insert '-g'
|
||||
env['CFLAGS'] = '-O2'
|
||||
env['CXXFLAGS'] = '-O2'
|
||||
|
||||
spec = self.spec
|
||||
args.append(
|
||||
'--enable-static=%s' % ('yes' if '+static' in spec else 'no'))
|
||||
@ -66,19 +74,30 @@ def configure_args(self):
|
||||
|
||||
if spec.satisfies("@8.0.0:"):
|
||||
args.extend([
|
||||
'--%sable-otf2' % ('en' if '+otf2' in spec else 'dis'),
|
||||
'--%sable-multithread' % (
|
||||
'en' if '+threaded' in spec else 'dis')
|
||||
'--%sable-otf2' %
|
||||
('en' if '+otf2' in spec else 'dis'),
|
||||
'--%sable-multithread' %
|
||||
('en' if '+pdes_threads' in spec else 'dis')
|
||||
])
|
||||
|
||||
if '+skeletonizer' in spec:
|
||||
args.append('--with-clang=' + spec['llvm'].prefix)
|
||||
|
||||
if spec.satisfies("@10:"):
|
||||
if "+warnings" in spec:
|
||||
args.append("--with-warnings")
|
||||
if "+werror" in spec:
|
||||
args.append("--with-werror")
|
||||
|
||||
if '+core' in spec:
|
||||
args.append('--with-sst-core=%s' % spec['sst-core'].prefix)
|
||||
|
||||
# Optional MPI support
|
||||
if '+mpi' in spec:
|
||||
need_core_mpi = False
|
||||
if "+core" in spec:
|
||||
if "+pdes_mpi" in spec["sst-core"]:
|
||||
need_core_mpi = True
|
||||
if '+pdes_mpi' in spec or need_core_mpi:
|
||||
env['CC'] = spec['mpi'].mpicc
|
||||
env['CXX'] = spec['mpi'].mpicxx
|
||||
env['F77'] = spec['mpi'].mpif77
|
||||
|
25
var/spack/repos/builtin/packages/sst-transports/package.py
Normal file
25
var/spack/repos/builtin/packages/sst-transports/package.py
Normal file
@ -0,0 +1,25 @@
|
||||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class SstTransports(CMakePackage):
|
||||
"""Provides transports like uGNI and verbs
|
||||
that run in the simulator"""
|
||||
|
||||
homepage = "https://github.com/sstsimulator"
|
||||
git = "https://github.com/jjwilke/sst-transports.git"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
|
||||
version('master', branch='master')
|
||||
|
||||
depends_on("sst-macro")
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
args.append("-DSSTMacro_ROOT=%s" % self.spec["sst-macro"].prefix)
|
||||
return args
|
Loading…
Reference in New Issue
Block a user