I have spent much time building nvmain-zsim (2nd times!), and here is what I did (common errors).
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…
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
download source code
git clone https://github.com/cyjseagull/SHMA
deal with depenencies
- 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”, try
apt install libboost-all-dev libbz2-dev
- libconfig 1.7.2
- hdf5 1.10.5
most of those tools are installed in
Now we should modify env.sh to assign where we install our dependencies. I recommend set a
BASEPATHand use that indirect path.
source env.shto export those parameters into environment
encounting “fatal error: src/memory_hierarchy.h: No such file or directory”
build/opt/tlb/common_func.h, change header into
encounting “fatal error: src/nvmain_mem_ctrl.h: No such file or directory”
build/opt/tlb/page_table_walker.hand change the header in the same way
encounting “fatal error: glog/logging.h: No such file or directory”
apt-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 mode
docker run -it --privileged CONTAINER_ID bash
echo 0 | tee /proc/sys/kernel/randomize_va_space
E:4.4 is not a supported linux release
build until you see
scons: done reading SConscript files.
A known problem
according to this issue: https://github.com/s5z/zsim/issues/154
zsim is not supported to run
If you have any question, feel free to comment here.