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:
parent
a904418270
commit
095f327f32
6 changed files with 190 additions and 38 deletions
41
var/spack/repos/builtin/packages/dramsim3/package.py
Normal file
41
var/spack/repos/builtin/packages/dramsim3/package.py
Normal 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)
|
32
var/spack/repos/builtin/packages/dtc/package.py
Normal file
32
var/spack/repos/builtin/packages/dtc/package.py
Normal 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
|
||||
)
|
30
var/spack/repos/builtin/packages/flashdimmsim/package.py
Normal file
30
var/spack/repos/builtin/packages/flashdimmsim/package.py
Normal 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)
|
|
@ -16,7 +16,7 @@ class SstCore(AutotoolsPackage):
|
|||
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"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
maintainers = ['sknigh']
|
||||
|
||||
version('11.0.0', sha256="25d17c35d1121330ad74375b6d27fe5c5592d1add3edf0bbb356aa3b5f59f401")
|
||||
version('10.1.0', sha256="e464213a81c7b3ccec994fdba2b56992b52fb9a6db089ef7c3445b54306d4b87")
|
||||
|
@ -42,9 +42,9 @@ class SstCore(AutotoolsPackage):
|
|||
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('autoconf@1.68:', type='build')
|
||||
depends_on('automake@1.11.1:', type='build')
|
||||
depends_on('libtool@1.2.4:', type='build')
|
||||
depends_on('m4', type='build', when='@master:')
|
||||
depends_on('gettext')
|
||||
|
||||
|
|
|
@ -22,7 +22,10 @@ class SstDumpi(AutotoolsPackage):
|
|||
url = "https://github.com/sstsimulator/sst-dumpi/archive/6.1.0.tar.gz"
|
||||
git = "https://github.com/sstsimulator/sst-dumpi.git"
|
||||
|
||||
maintainers = ['sknigh', 'jpkenny', 'calewis']
|
||||
|
||||
version('master', branch='master')
|
||||
version('7.1.0', sha256='628eb3f7c2d0975461d45065f91c723d3abac756fa36af93c09f4fed195794bf')
|
||||
version('6.1.0', sha256='d4f6afcff5ba67fcc3a29f461afbb59855053840f5f320552a77b4e14c687bb6')
|
||||
|
||||
depends_on('autoconf@1.68:', type='build')
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
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
|
||||
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/v11.0.0_Final/sstelements-11.0.0.tar.gz"
|
||||
|
||||
maintainers = ['jjwilke']
|
||||
maintainers = ['sknigh']
|
||||
|
||||
version('11.0.0', sha256="bf265cb25afc041b74422cc5cddc8e3ae1e7c3efa3e37e699dac4e3f7629be6e")
|
||||
version('10.1.0', sha256="a790561449795dac48a84c525b8e0b09f05d0b0bff1a0da1aa2e903279a03c4a")
|
||||
|
@ -26,10 +26,22 @@ class SstElements(AutotoolsPackage):
|
|||
version('develop', branch='devel')
|
||||
version('master', branch='master')
|
||||
|
||||
# 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")
|
||||
variant("dramsim2", default=False,
|
||||
description="Build with DRAMSim2 support")
|
||||
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")
|
||||
variant("hybridsim", default=False,
|
||||
|
@ -40,6 +52,10 @@ class SstElements(AutotoolsPackage):
|
|||
description="Build with HBM DRAMSim2 support")
|
||||
variant("ramulator", default=False,
|
||||
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("sst-core")
|
||||
|
@ -48,18 +64,31 @@ class SstElements(AutotoolsPackage):
|
|||
|
||||
depends_on("intel-pin", when="+pin")
|
||||
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("dramsim3@master", when="+hybridsim")
|
||||
depends_on("nvdimmsim@2.0.0", 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("nvdimmsim@2.0.0", when="+hybridsim")
|
||||
depends_on("otf", when="+otf")
|
||||
depends_on("otf2", when="+otf2")
|
||||
depends_on("gettext")
|
||||
depends_on("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:')
|
||||
depends_on('autoconf@1.68:', type='build')
|
||||
depends_on('automake@1.11.1:', type='build')
|
||||
depends_on('libtool@1.2.4:', type='build')
|
||||
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
|
||||
build_directory = 'spack-build'
|
||||
|
@ -69,35 +98,52 @@ def autoreconf(self, spec, prefix):
|
|||
bash('autogen.sh')
|
||||
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
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 '+pdes_mpi' in spec["sst-core"]:
|
||||
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:
|
||||
args.append("--with-dramsim=%s" % self.spec["dramsim2"].prefix)
|
||||
if "+pin" in spec:
|
||||
args.append("--with-pin=%s" % spec["intel-pin"].prefix)
|
||||
|
||||
if "+nvdimmsim" in self.spec or "+hybridsim" in self.spec:
|
||||
args.append("--with-nvdimmsim=%s" % self.spec["nvdimmsim"].prefix)
|
||||
if "+dramsim2" in spec or "+hybridsim" in spec:
|
||||
args.append("--with-dramsim=%s" % spec["dramsim2"].prefix)
|
||||
|
||||
if "+hybridsim" in self.spec:
|
||||
args.append("--with-hybridsim=%s" % self.spec["hybridsim"].prefix)
|
||||
if "+dramsim3" in spec:
|
||||
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" %
|
||||
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" %
|
||||
self.spec["hbm-dramsim2"].prefix)
|
||||
spec["hbm-dramsim2"].prefix)
|
||||
|
||||
if "+ramulator" in self.spec:
|
||||
args.append("--with-ramulator=%s" % self.spec["ramulator"].prefix)
|
||||
if "+ramulator" in spec:
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue