I have problem in integrating Gem5 and Dramsim2
There was no problem in running Gem5 before I clone and build Dramsim2
Follow these steps to get DRAMSim2 as part of gem5
-
Download DRAMSim2
1.1 Go to ext/dramsim2 (this directory)
1.2 Clone DRAMSim2: git clone [email protected]:umd-memsys/DRAMSim2.git -
Compile gem5
2.1 Business as usual -
Run gem5 with DRAMSim2
3.1 Use –mem-type=dramsim2 and set the device and system ccd
configuration
I followed these steps to integrate Gem5 and Dramsim2.
for the step1, I followed the first step by cloning DRAMSim2.
After cloning, I built DRAMSim2 according to the instructions provided in the files.
Once the build was complete, I verified that DRAMSim2 was functioning correctly.
However, an error occurs in step2.
When I tried to rebuild gem5 by
scons build/X86/gem5.opt -j7
Error occurred as follows.
I’m beginner…
so please excuse me if that’s a stupid question!
Please help me to solve this error.
scons build/X86/gem5.opt -j7
scons: Reading SConscript files ...
Mkdir("/home/gyuwan/gem5/build/X86/gem5.build")
Checking for linker -Wl,--as-needed support... (cached) yes
Checking for compiler -gz support... (cached) yes
Checking for linker -gz support... (cached) yes
Info: Using Python config: python3-config
Checking for C header file Python.h... (cached) yes
Checking Python version... (cached) 3.10.12
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for C library tcmalloc_minimal... (cached) yes
Building in /home/gyuwan/gem5/build/X86
"build_tools/kconfig_base.py" "/home/gyuwan/gem5/build/X86/gem5.build/Kconfig" "/home/gyuwan/gem5/src/Kconfig"
Checking size of struct kvm_xsave ... (cached) yes
Checking for backtrace_symbols_fd((void *)1, 0, 0) in C library None... (cached) yes
Checking for C header file capstone/capstone.h... (cached) yes
Checking for C header file linux/kvm.h... (cached) yes
Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None... (cached) yes
Checking for member exclude_host in struct perf_event_attr...(cached) yes
Checking for shm_open("/test", 0, 0) in C library None... (cached) yes
Checking for C header file fenv.h... (cached) yes
Checking for C header file png.h... (cached) yes
Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... (cached) yes
Checking for C header file valgrind/valgrind.h... (cached) no
Checking for pkg-config package hdf5-serial... (cached) no
Checking for pkg-config package hdf5... (cached) no
Checking for H5Fcreate("", 0, 0, 0) in C library hdf5... (cached) no
Warning: Couldn't find HDF5 C++ libraries. Disabling HDF5 support.
Checking for pkg-config package protobuf... (cached) yes
Checking for C header file linux/if_tun.h... (cached) yes
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Checking for compiler -Wno-self-assign-overloaded support... (cached) yes
ext/dramsim2/DRAMSim2/BusPacket.cpp: In member function ‘void DRAMSim::BusPacket::print(uint64_t, bool)’:
ext/dramsim2/DRAMSim2/BusPacket.cpp:63:9: warning: ‘nonnull’ argument ‘this’ compared to NULL [-Wnonnull-compare]
63 | if (this == NULL)
| ^~
ext/dramsim2/DRAMSim2/BusPacket.cpp: In member function ‘void DRAMSim::BusPacket::print()’:
ext/dramsim2/DRAMSim2/BusPacket.cpp:104:9: warning: ‘nonnull’ argument ‘this’ compared to NULL [-Wnonnull-compare]
104 | if (this == NULL) //pointer use makes this a necessary precaution
| ^~
Checking for linker -Wno-free-nonheap-object support... yes
scons: done reading SConscript files.
scons: Building targets ...
[EMBED PY] src/mem/DRAMSim2.py -> X86/mem/DRAMSim2.py.cc
[VER TAGS] -> X86/sim/tags.cc
[ CXX] src/mem/dramsim2_wrapper.cc -> X86/mem/dramsim2_wrapper.o
[ CXX] X86/mem/DRAMSim2.py.cc -> .pyo
[ CXX] X86/mem/DRAMSim2.py.cc -> .o
[ LINK] -> X86/gem5py_m5
[SO Param] m5.objects.CPUTracers, IntelTrace -> X86/params/IntelTrace.hh
[SO Param] m5.objects.ThermalModel, ThermalReference -> X86/params/ThermalReference.hh
[SO Param] m5.objects.Prefetcher, IndirectMemoryPrefetcher -> X86/params/IndirectMemoryPrefetcher.hh
[SO Param] m5.objects.Sequencer, RubyHTMSequencer -> X86/params/RubyHTMSequencer.hh
[SO Param] m5.objects.Workload, KernelWorkload -> X86/python/_m5/param_KernelWorkload.cc
[SO Param] m5.objects.Device, BasicPioDevice -> X86/python/_m5/param_BasicPioDevice.cc
[SO Param] m5.objects.KvmVM, KvmVM -> X86/params/KvmVM.hh
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): ModuleNotFoundError: No module named 'citations'
At:
src/mem/DRAMSim2.py(36): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<string>(1): <module>
src/python/m5/objects/__init__.py(29): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen importlib._bootstrap>(992): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
/usr/lib/python3.10/importlib/__init__.py(126): import_module
build_tools/sim_object_param_struct_cc.py(70): <module>
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): ModuleNotFoundError: No module named 'citations'
At:
src/mem/DRAMSim2.py(36): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<string>(1): <module>
src/python/m5/objects/__init__.py(29): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen importlib._bootstrap>(992): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
/usr/lib/python3.10/importlib/__init__.py(126): import_module
build_tools/sim_object_param_struct_hh.py(57): <module>
Aborted
Aborted
scons: *** [build/X86/python/_m5/param_BasicPioDevice.cc] Error 134
scons: *** [build/X86/params/RubyHTMSequencer.hh] Error 134
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): ModuleNotFoundError: No module named 'citations'
At:
src/mem/DRAMSim2.py(36): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<string>(1): <module>
src/python/m5/objects/__init__.py(29): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen importlib._bootstrap>(992): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
/usr/lib/python3.10/importlib/__init__.py(126): import_module
build_tools/sim_object_param_struct_hh.py(57): <module>
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): ModuleNotFoundError: No module named 'citations'
At:
src/mem/DRAMSim2.py(36): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<string>(1): <module>
src/python/m5/objects/__init__.py(29): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen importlib._bootstrap>(992): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
/usr/lib/python3.10/importlib/__init__.py(126): import_module
build_tools/sim_object_param_struct_hh.py(57): <module>
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): ModuleNotFoundError: No module named 'citations'
At:
src/mem/DRAMSim2.py(36): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<string>(1): <module>
src/python/m5/objects/__init__.py(29): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen importlib._bootstrap>(992): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
/usr/lib/python3.10/importlib/__init__.py(126): import_module
build_tools/sim_object_param_struct_cc.py(70): <module>
Aborted
Aborted
Aborted
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): ModuleNotFoundError: No module named 'citations'
At:
src/mem/DRAMSim2.py(36): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<string>(1): <module>
src/python/m5/objects/__init__.py(29): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen importlib._bootstrap>(992): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
/usr/lib/python3.10/importlib/__init__.py(126): import_module
build_tools/sim_object_param_struct_hh.py(57): <module>
Aborted
terminate called after throwing an instance of 'pybind11::error_already_set'
what(): ModuleNotFoundError: No module named 'citations'
At:
src/mem/DRAMSim2.py(36): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<string>(1): <module>
src/python/m5/objects/__init__.py(29): <module>
<string>(40): exec_module
<frozen importlib._bootstrap>(703): _load_unlocked
<frozen importlib._bootstrap>(1006): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen importlib._bootstrap>(992): _find_and_load_unlocked
<frozen importlib._bootstrap>(1027): _find_and_load
<frozen importlib._bootstrap>(1050): _gcd_import
/usr/lib/python3.10/importlib/__init__.py(126): import_module
build_tools/sim_object_param_struct_hh.py(57): <module>
Aborted
scons: *** [build/X86/params/KvmVM.hh] Error 134
scons: *** [build/X86/params/ThermalReference.hh] Error 134
scons: *** [build/X86/python/_m5/param_KernelWorkload.cc] Error 134
scons: *** [build/X86/params/IndirectMemoryPrefetcher.hh] Error 134
scons: *** [build/X86/params/IntelTrace.hh] Error 134
scons: building terminated because of errors.
In article “Integration of Gem5 And Dramsim2 For DDR4 Simulation”, there is no mention about rebuilding gem5
after building Dramsim2.
This article told me to follow second phase.
If I enter the following command without rebuilding, I encounter the following error.
build/X86/gem5.opt configs/deprecated/example/se.py --mem-type=DRAMSim2
se.py: error: argument –mem-type: invalid choice: ‘DRAMSim2’
The second phase of methodology in this dissertation is to
integrate DRAMSim2 into GEM5 and to ensure the integration
is a success. The entire DRAMSim2 is copied in
/gem5/ext/dramsim folder. Command-line build/X86/gem5.opt configs/example/se.py --mem-type=DRAMSim2
is used to
integrate both the simulators. By executing this command, the
DRAMSim2 memory controller model replaces the redundant
functions in GEM5 memory controller files. Thus, leaving a
lightweight yet sophisticated and powerful memory controller
interface. Hence, requests from and to the GEM5 directory
memory controller forwarded to DRAMSim2. This creates an
organized simulation environment.
Deny is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.