CohereSim: A Bus-based Cache Simulator
v3.3
A tool for education in computing - learn about coherence protocols, replacement policies, and SMP vs DSM
|
libs
and tools
packages are not runnable. Probably since they are libraries or tools.netapps
work initially, but after a few seconds subsequent runs of netapps
inexplicably hang indefinitely. There are three benchmarks under that category, and each of them individually hang indefinitely. After a system restart they work again.wsl --install -d Ubuntu
(make sure the framework is WSL2)If you haven't already, download this repo with the following command: git clone --recurse-submodules https://github.com/voltavidTony/CohereSim.git
. If you already have this repo, but not the gem5 and parsec-benchmark sub-modules, then run this command: git submodule update --init
From within the gem5
directory:
png
and hdf5
libraries to work):sudo apt install build-essential scons python3-dev git pre-commit zlib1g zlib1g-dev libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev libboost-all-dev libhdf5-serial-dev python3-pydot python3-venv python3-tk mypy m4 libcapstone-dev libpng-dev libelf-dev pkg-config wget cmake doxygen
gem5/src/mem/abstract_mem.cc
. At the time of writing, the version of gem5 used is v24.0.0.1, but since the changes are based on the existing Memoryaccess
debug flag, they will likely work as-is for quite a while:AbstractMemory::access
method on line 380, insert the following code snippet: TRACE_PACKET
macro on line 455 (451 of the original file), insert the following: TRACE_PACKET
macro on line 478 (473 of the original file), insert the following: scons build/{ISA}/gem5.{variant} -j {cpus}
fast
is recommended to increase simulation speed, and opt
for debugging error messages during simulation. debug
is for debugging the simulator itself and shouldn't be needed). Note: The trace generation script uses the fast
variant-j
argument (strongly recommended for initial build, minor impact on incremental builds)From within the parsec-benchmark
directory:
sudo apt install gettext texinfo
sudo apt install libx11-dev libxext-dev libxt-dev libxmu-dev libxi-dev
./get-inputs
./bin/parsecmgmt -a build -p all {nthreads}
(not sure if the script uses the threadcount argument when building)lib{package}-dev
./bin/parsecmgmt -a run -p all
Note:: This script uses the fast
variant of gem5. It is located in the tools
directory, but can be run from anywhere.
Usage: ./gen_trace.sh [benchmark] {inputsize} {nthreads} {ncpus}
benchmark
: Specify the benchmark to run<package>.<benchmark>
or just <benchmark>
inputsize
: Determines the size of the inputtest
, simdev
, simsmall
, simmedium
, simlarge
, native
nthreads
: Determines the number of worker threads to spawnncpus
: Determines the number of CPUs in the gem5 simulation