Update sst-elements and dependency packages (#25041)

* sst-elements: add optional support for flashdimmsim, dramsim3 and
  add new packages for each
* sst-dumpi: add version 7.1.0
* sst-core: autotools dependencies are required for all versions
* new package: dtc
* add error message redirect for +dumpi, otf, and otf2: these are not
  currently supported
This commit is contained in:
sknigh 2021-07-29 11:48:41 -07:00 committed by GitHub
parent a904418270
commit 095f327f32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 190 additions and 38 deletions

View file

@ -0,0 +1,41 @@
# Copyright 2013-2021 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 *
# Uses Cmake but does not follow a sane convention
class Dramsim3(Package):
"""DRAMsim3 models the timing paramaters and memory controller behavior
for several DRAM protocols such as DDR3, DDR4, LPDDR3, LPDDR4, GDDR5,
GDDR6, HBM, HMC, STT-MRAM. It is implemented in C++ as an objected
oriented model that includes a parameterized DRAM bank model, DRAM
controllers, command queues and system-level interfaces to interact with
a CPU simulator (GEM5, ZSim) or trace workloads. It is designed to be
accurate, portable and parallel."""
homepage = "https://github.com/umd-memsys/DRAMsim3"
url = "https://github.com/umd-memsys/DRAMsim3/archive/refs/tags/1.0.0.tar.gz"
git = "https://github.com/umd-memsys/DRAMsim3.git"
version('master', branch='master')
version('1.0.0', sha256='064b732256f3bec9b553e00bcbc9a1d82172ec194f2b69c8797f585200b12566')
depends_on('cmake', type='build')
def install(self, spec, prefix):
cmake = which('cmake')
cmake('.')
make()
include_path = prefix + '/include'
mkdir(prefix.bin)
mkdir(prefix.lib)
mkdir(include_path)
install('dramsim3main', prefix.bin)
install('libdramsim3.so', prefix.lib)
install('src/*.h', include_path)

View file

@ -0,0 +1,32 @@
# Copyright 2013-2021 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 Dtc(MakefilePackage):
"""Device Tree Compiler (dtc) toolchain for working with device tree
source and binary files and also libfdt, a utility library for reading
and manipulating the binary format."""
homepage = "https://github.com/dgibson/dtc"
url = "https://github.com/dgibson/dtc/archive/refs/tags/v1.6.1.tar.gz"
version('1.6.1', sha256='6401c9a0f577a270df4632bf0f3e5454ccc7a5ca3caefa67a3e1c29c9c6b8c60')
depends_on('bison', type='build')
# Build error with flex 2.6.3
# (convert-dtsv0-lexer.lex.c:398: error: "yywrap" redefined)
depends_on('flex@2.6.4:', type='build')
depends_on('libyaml', type='build')
depends_on('pkg-config', type='build')
depends_on('python', type='build')
def edit(self, spec, prefix):
makefile = FileFilter('Makefile')
makefile.filter(
'PREFIX =.*',
'PREFIX = %s' % prefix
)

View file

@ -0,0 +1,30 @@
# Copyright 2013-2021 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 Flashdimmsim(Package):
"""FlashDIMMSim: a reasonably accurate flash DIMM simulator."""
homepage = "https://github.com/slunk/FlashDIMMSim"
git = "https://github.com/slunk/FlashDIMMSim.git"
version('master', branch='master')
build_directory = 'src'
def install(self, spec, prefix):
with working_dir(self.build_directory):
make() # build program
make('libfdsim.so') # build shared library
mkdir(prefix.bin)
mkdir(prefix.lib)
mkdir(prefix.include)
install_tree('ini', join_path(prefix, 'ini'))
install('FDSim', prefix.bin)
install('libfdsim.so', prefix.lib)
install('*.h', prefix.include)

View file

@ -16,7 +16,7 @@ class SstCore(AutotoolsPackage):
git = "https://github.com/sstsimulator/sst-core.git" git = "https://github.com/sstsimulator/sst-core.git"
url = "https://github.com/sstsimulator/sst-core/releases/download/v11.0.0_Final/sstcore-11.0.0.tar.gz" url = "https://github.com/sstsimulator/sst-core/releases/download/v11.0.0_Final/sstcore-11.0.0.tar.gz"
maintainers = ['jjwilke'] maintainers = ['sknigh']
version('11.0.0', sha256="25d17c35d1121330ad74375b6d27fe5c5592d1add3edf0bbb356aa3b5f59f401") version('11.0.0', sha256="25d17c35d1121330ad74375b6d27fe5c5592d1add3edf0bbb356aa3b5f59f401")
version('10.1.0', sha256="e464213a81c7b3ccec994fdba2b56992b52fb9a6db089ef7c3445b54306d4b87") version('10.1.0', sha256="e464213a81c7b3ccec994fdba2b56992b52fb9a6db089ef7c3445b54306d4b87")
@ -42,9 +42,9 @@ class SstCore(AutotoolsPackage):
depends_on("hdf5", when="+hdf5") depends_on("hdf5", when="+hdf5")
depends_on("zlib", when="+zlib") depends_on("zlib", when="+zlib")
depends_on('autoconf@1.68:', type='build', when='@master:') depends_on('autoconf@1.68:', type='build')
depends_on('automake@1.11.1:', type='build', when='@master:') depends_on('automake@1.11.1:', type='build')
depends_on('libtool@1.2.4:', type='build', when='@master:') depends_on('libtool@1.2.4:', type='build')
depends_on('m4', type='build', when='@master:') depends_on('m4', type='build', when='@master:')
depends_on('gettext') depends_on('gettext')

View file

@ -22,7 +22,10 @@ class SstDumpi(AutotoolsPackage):
url = "https://github.com/sstsimulator/sst-dumpi/archive/6.1.0.tar.gz" url = "https://github.com/sstsimulator/sst-dumpi/archive/6.1.0.tar.gz"
git = "https://github.com/sstsimulator/sst-dumpi.git" git = "https://github.com/sstsimulator/sst-dumpi.git"
maintainers = ['sknigh', 'jpkenny', 'calewis']
version('master', branch='master') version('master', branch='master')
version('7.1.0', sha256='628eb3f7c2d0975461d45065f91c723d3abac756fa36af93c09f4fed195794bf')
version('6.1.0', sha256='d4f6afcff5ba67fcc3a29f461afbb59855053840f5f320552a77b4e14c687bb6') version('6.1.0', sha256='d4f6afcff5ba67fcc3a29f461afbb59855053840f5f320552a77b4e14c687bb6')
depends_on('autoconf@1.68:', type='build') depends_on('autoconf@1.68:', type='build')

View file

@ -9,14 +9,14 @@
class SstElements(AutotoolsPackage): class SstElements(AutotoolsPackage):
"""SST Elements implements a range of components for performing """SST Elements implements a range of components for performing
architecture simulation from node-level to system-level using architecture simulation from node-level to system-level using
the SST discrete event core the SST discrete event core.
""" """
homepage = "https://github.com/sstsimulator" homepage = "https://github.com/sstsimulator"
git = "https://github.com/sstsimulator/sst-elements.git" git = "https://github.com/sstsimulator/sst-elements.git"
url = "https://github.com/sstsimulator/sst-elements/releases/download/v11.0.0_Final/sstelements-11.0.0.tar.gz" url = "https://github.com/sstsimulator/sst-elements/releases/download/v11.0.0_Final/sstelements-11.0.0.tar.gz"
maintainers = ['jjwilke'] maintainers = ['sknigh']
version('11.0.0', sha256="bf265cb25afc041b74422cc5cddc8e3ae1e7c3efa3e37e699dac4e3f7629be6e") version('11.0.0', sha256="bf265cb25afc041b74422cc5cddc8e3ae1e7c3efa3e37e699dac4e3f7629be6e")
version('10.1.0', sha256="a790561449795dac48a84c525b8e0b09f05d0b0bff1a0da1aa2e903279a03c4a") version('10.1.0', sha256="a790561449795dac48a84c525b8e0b09f05d0b0bff1a0da1aa2e903279a03c4a")
@ -26,20 +26,36 @@ class SstElements(AutotoolsPackage):
version('develop', branch='devel') version('develop', branch='devel')
version('master', branch='master') version('master', branch='master')
variant("pin", default=False, # Contact SST developers (http://github.com/sstsimulator)
# if your use case requires support for:
# - balar
# - OTF2
# - stake (riscv simulator)
variant("pin", default=False,
description="Enable the Ariel CPU model") description="Enable the Ariel CPU model")
variant("dramsim2", default=False, variant("dramsim2", default=False,
description="Build with DRAMSim2 support") description="Build with DRAMSim2 support")
variant("nvdimmsim", default=False, variant("dramsim3", default=False,
description="Build with DRAMSim3 support")
variant("dumpi", default=False,
description="Build with Dumpi support")
variant("flashdimmsim", default=False,
description="Build with FlashDIMMSim support")
variant("nvdimmsim", default=False,
description="Build with NVDimmSim support") description="Build with NVDimmSim support")
variant("hybridsim", default=False, variant("hybridsim", default=False,
description="Build with HybridSim support") description="Build with HybridSim support")
variant("goblin", default=False, variant("goblin", default=False,
description="Build with GoblinHMCSim support") description="Build with GoblinHMCSim support")
variant("hbm", default=False, variant("hbm", default=False,
description="Build with HBM DRAMSim2 support") description="Build with HBM DRAMSim2 support")
variant("ramulator", default=False, variant("ramulator", default=False,
description="Build with Ramulator support") description="Build with Ramulator support")
variant("otf", default=False,
description="Build with OTF")
variant("otf2", default=False,
description="Build with OTF2")
depends_on("python", type=('build', 'run')) depends_on("python", type=('build', 'run'))
depends_on("sst-core") depends_on("sst-core")
@ -48,18 +64,31 @@ class SstElements(AutotoolsPackage):
depends_on("intel-pin", when="+pin") depends_on("intel-pin", when="+pin")
depends_on("dramsim2@2:", when="+dramsim2") depends_on("dramsim2@2:", when="+dramsim2")
depends_on("dramsim3@master", when="+dramsim3")
depends_on("sst-dumpi@master", when="+dumpi")
depends_on("flashdimmsim", when="+flashdimmsim")
depends_on("hybridsim@2.0.1", when="+hybridsim") depends_on("hybridsim@2.0.1", when="+hybridsim")
depends_on("dramsim3@master", when="+hybridsim")
depends_on("nvdimmsim@2.0.0", when="+hybridsim")
depends_on("nvdimmsim@2.0.0", when="+nvdimmsim") depends_on("nvdimmsim@2.0.0", when="+nvdimmsim")
depends_on("goblin-hmc-sim", when="+goblin") depends_on("goblin-hmc-sim", when="+goblin")
depends_on("ramulator@sst", when="+ramulator") depends_on("ramulator@sst", when="+ramulator")
depends_on("hbm-dramsim2", when="+hbm") depends_on("hbm-dramsim2", when="+hbm")
depends_on("nvdimmsim@2.0.0", when="+hybridsim") depends_on("otf", when="+otf")
depends_on("otf2", when="+otf2")
depends_on("gettext") depends_on("gettext")
depends_on("zlib")
depends_on('autoconf@1.68:', type='build', when='@master:') depends_on('autoconf@1.68:', type='build')
depends_on('automake@1.11.1:', type='build', when='@master:') depends_on('automake@1.11.1:', type='build')
depends_on('libtool@1.2.4:', type='build', when='@master:') depends_on('libtool@1.2.4:', type='build')
depends_on('m4', type='build', when='@master:') depends_on('m4', type='build')
conflicts('+dumpi', msg='Dumpi not currently supported, contact SST Developers for help')
conflicts('+otf', msg='OTF not currently supported, contact SST Developers for help')
conflicts('+otf2', msg='OTF2 not currently supported, contact SST Developers for help')
conflicts('~dramsim2', when='+hybridsim', msg='hybridsim requires dramsim2, spec should include +dramsim2')
conflicts('~nvdimmsim', when='+hybridsim', msg='hybridsim requires nvdimmsim, spec should include +nvdimmsim')
# force out-of-source builds # force out-of-source builds
build_directory = 'spack-build' build_directory = 'spack-build'
@ -69,35 +98,52 @@ def autoreconf(self, spec, prefix):
bash('autogen.sh') bash('autogen.sh')
def configure_args(self): def configure_args(self):
spec = self.spec
args = [] 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: if '+pdes_mpi' in spec["sst-core"]:
args.append("--with-pin=%s" % self.spec["intel-pin"].prefix) env['CC'] = spec['mpi'].mpicc
env['CXX'] = spec['mpi'].mpicxx
env['F77'] = spec['mpi'].mpif77
env['FC'] = spec['mpi'].mpifc
if "+dramsim2" in self.spec or "+hybridsim" in self.spec: if "+pin" in spec:
args.append("--with-dramsim=%s" % self.spec["dramsim2"].prefix) args.append("--with-pin=%s" % spec["intel-pin"].prefix)
if "+nvdimmsim" in self.spec or "+hybridsim" in self.spec: if "+dramsim2" in spec or "+hybridsim" in spec:
args.append("--with-nvdimmsim=%s" % self.spec["nvdimmsim"].prefix) args.append("--with-dramsim=%s" % spec["dramsim2"].prefix)
if "+hybridsim" in self.spec: if "+dramsim3" in spec:
args.append("--with-hybridsim=%s" % self.spec["hybridsim"].prefix) args.append("--with-dramsim3=%s" % spec["dramsim3"].prefix)
if "+goblin" in self.spec: if "+dumpi" in spec:
args.append("--with-dumpi=%s" % spec["sst-dumpi"].prefix)
if "+flashdimmsim" in spec:
args.append("--with-fdsim=%s" % spec["flashdimmsim"].prefix)
if "+nvdimmsim" in spec or "+hybridsim" in spec:
args.append("--with-nvdimmsim=%s" % spec["nvdimmsim"].prefix)
if "+hybridsim" in spec:
args.append("--with-hybridsim=%s" % spec["hybridsim"].prefix)
if "+goblin" in spec:
args.append("--with-goblin-hmcsim=%s" % args.append("--with-goblin-hmcsim=%s" %
self.spec["goblin-hmc-sim"].prefix) spec["goblin-hmc-sim"].prefix)
if "+hbm" in self.spec: if "+hbm" in spec:
args.append("--with-hbmdramsim=%s" % args.append("--with-hbmdramsim=%s" %
self.spec["hbm-dramsim2"].prefix) spec["hbm-dramsim2"].prefix)
if "+ramulator" in self.spec: if "+ramulator" in spec:
args.append("--with-ramulator=%s" % self.spec["ramulator"].prefix) args.append("--with-ramulator=%s" % spec["ramulator"].prefix)
args.append("--with-sst-core=%s" % self.spec["sst-core"].prefix) if "+otf2" in spec:
args.append("--with-otf2=%s" % spec["otf2"].prefix)
if "+otf" in spec:
args.append("--with-otf=%s" % spec["otf"].prefix)
args.append("--with-sst-core=%s" % spec["sst-core"].prefix)
return args return args