I have spent much time building nvmain-zsim (2nd times!), and here is what I did (common errors).
What is zsim-nvmain?
ZSim is an emulator made by stanford, which is originally used to evaluate the implementation of ZCache.
NVMain is a set of interfaces based on ZSim or Gem5, which provides support on emulating Non-Volatile Memory. Now we can easily add a 3d stacked DRAM or PCM Main Memory to the system…
ZSim github repo: https://github.com/s5z/zsim
NVMain github repo: https://github.com/AXLEproject/axle-zsim-nvmain
Before you read…
I finish my building mostly from this blog: https://blog.csdn.net/qqq_11101/article/details/78481377
I built zsim-nvmain into a docker, avoiding most meaningless dependencies problems. I have pushed my docker image to hub: leepoly/zsim-nvmain
How to build nvmain-zsim
download source code
git clone https://github.com/cyjseagull/SHMA
deal with depenencies
My environment:- ubuntu 18.04 (linux kernel 4.4.0)
gcc, g++ 4.8.5
How to deal with multiple gcc/g++ version?
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
, where 10 is a number indicating the priority
we should do the same to g++pin-2.13-61206-gcc.4.4.7-linux (which is embedded in SHMA project)
- boost 1.59
if you have encountered “fatal error: bzlib.h: No such file or directory”, tryapt install libboost-all-dev libbz2-dev
- libconfig 1.7.2
- hdf5 1.10.5
most of those tools are installed in/usr/local/
by default.
configure env.sh
Now we should modify env.sh to assign where we install our dependencies. I recommend set aBASEPATH
and use that indirect path.
Thensource env.sh
to export those parameters into environmentbuild nvmain-zsim
cd $BASEPATH
scons -j4
encounting “fatal error: src/memory_hierarchy.h: No such file or directory”
go tobuild/opt/tlb/common_func.h
, change header into"#include "memory_hierarchy.h"
encounting “fatal error: src/nvmain_mem_ctrl.h: No such file or directory”
go tobuild/opt/tlb/page_table_walker.h
and change the header in the same wayencounting “fatal error: glog/logging.h: No such file or directory”
tryapt-get install libgoogle-glog-dev
encounting “build/opt/version.h:1:4: error: stray ‘#’ in program”
change “echo -e” into “echo” in SConstruct(docker-only) [H] Panic on build/opt/zsim_harness.cpp:292: Could not change personality to disable address space randomization!
try rerun docker with privileged modedocker run -it --privileged CONTAINER_ID bash
echo 0 | tee /proc/sys/kernel/randomize_va_space
E:4.4 is not a supported linux release
insert atpin_cmd.cpp:52
1
2
3args.push_back("-injection");
args.push_back("child");
args.push_back("-ifeellucky");
build until you see scons: done reading SConscript files.
Check installation
./bin/zsim config/shma-static.cfg
congrats!A known problem
according to this issue: https://github.com/s5z/zsim/issues/154
zsim is not supported to runls
.
If you have any question, feel free to comment here.