harvard-acc / smaug

SMAUG: Simulating Machine Learning Applications Using Gem5-Aladdin
https://harvard-acc.github.io/smaug_docs
BSD 3-Clause "New" or "Revised" License
96 stars 27 forks source link

Errors when bulid gem5-aladdin with --debug-aladdin flag #113

Open Jian-PENG207 opened 9 months ago

Jian-PENG207 commented 9 months ago

Hi,

I would like to obtain the power trace of the gem5-aladdin. I checked the source code of aladdin and got the xxx_power_stats.txt in the stand-alone aladdin by --DDEBUG flag before aladdin building. But for gem5-aladdin building, I ran the command python2.7 `which scons` build/X86/gem5.opt PROTOCOL=MESI_Two_Level_aladdin --debug-aladdin -j8, but I got the error like this:

scons: Reading SConscript files ... Warning: Warning: Your compiler doesn't support incremental linking and lto at the same time, so lto is being disabled. To force lto on anyway, use the --force-lto option. That will disable partial linking. Info: Using Python config: /usr/bin/python2.7-config Checking for C header file Python.h... yes Checking for C library python2.7... yes Checking for C library pthread... yes Checking for C library dl... yes Checking for C library util... yes Checking for C library m... yes Checking for accept(0,0,0) in C++ library None... yes Checking for zlibVersion() in C++ library z... yes Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf... yes Checking for C header file valgrind/valgrind.h... no Checking for clock_nanosleep(0,0,NULL,NULL) in C library None... yes Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library None... no Checking for timer_create(CLOCK_MONOTONIC, NULL, NULL) in C library rt... yes Checking for C library tcmalloc... yes Checking for C library readline... yes Checking for char temp; backtrace_symbols_fd((void*)&temp, 0, 0) in C library None... yes Checking for C library sqlite3... yes Checking for C header file fenv.h... no Warning: Header file not found. This host has no IEEE FP rounding mode control. Checking for C header file png.h... no Warning: Header file not found. This host has no libpng library. Disabling support for PNG framebuffers. Checking for C header file linux/kvm.h... no Info: Compatible header file <linux/kvm.h> not found, disabling KVM support. Checking for C header file linux/if_tun.h... no Info: Compatible header file <linux/if_tun.h> not found. Checking size of struct kvm_xsave ... no Checking for member exclude_host in struct perf_event_attr...no Checking for hdf5-serial using pkg-config... pkg-config not found Checking for hdf5 using pkg-config... pkg-config not found Checking for H5Fcreate("", 0, 0, 0) in C library hdf5... no Warning: Couldn't find any HDF5 C++ libraries. Disabling HDF5 support. Checking whether i386 is declared... no Checking whether __x86_64__ is declared... no Warning: Unrecognized architecture for systemc. Building in /workspace/gem5-aladdin/build/X86 Using saved variables file /workspace/gem5-aladdin/build/variables/X86 Warning: No IEEE FP rounding mode control in X86. FP results may deviate slightly from other platforms. scons: done reading SConscript files. scons: Building targets ... [ CXX] X86/sim/main.cc -> .o

:0:6: error: ISO C++11 requires whitespace after the macro name [-Werror] [ CXX] X86/dev/io_device.cc -> .o [ CXX] X86/dev/isa_fake.cc -> .o [ CXX] X86/dev/dma_device.cc -> .o [ CXX] X86/dev/intpin.cc -> .o [ CXX] X86/dev/platform.cc -> .o [ CXX] X86/dev/baddev.cc -> .o :0:6: error: ISO C++11 requires whitespace after the macro name [-Werror] [ CXX] X86/dev/intel_8254_timer.cc -> .o :0:6: error: ISO C++11 requires whitespace after the macro name [-Werror] :0:6: error: ISO C++11 requires whitespace after the macro name [-Werror] In file included from build/X86/params/PioDevice.hh:6:0, from build/X86/params/BasicPioDevice.hh:10, from build/X86/dev/io_device.hh:48, from build/X86/dev/io_device.cc:44: build/X86/params/System.hh:20:10: fatal error: params/KvmVM.hh: No such file or directory #include "params/KvmVM.hh" ^~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors compilation terminated. scons: *** [build/X86/dev/io_device.o] Error 1 :0:6: error: ISO C++11 requires whitespace after the macro name [-Werror] :0:6: error: ISO C++11 requires whitespace after the macro name [-Werror] In file included from build/X86/params/PioDevice.hh:6:0, from build/X86/params/BasicPioDevice.hh:10, from build/X86/dev/io_device.hh:48, from build/X86/dev/isa_fake.hh:40, from build/X86/dev/isa_fake.cc:35: build/X86/params/System.hh:20:10: fatal error: params/KvmVM.hh: No such file or directory #include "params/KvmVM.hh" ^~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors compilation terminated. In file included from build/X86/params/PioDevice.hh:6:0, from build/X86/params/BasicPioDevice.hh:10, from build/X86/dev/io_device.hh:48, from build/X86/dev/dma_device.hh:53, from build/X86/dev/dma_device.cc:46: build/X86/params/System.hh:20:10: fatal error: params/KvmVM.hh: No such file or directory #include "params/KvmVM.hh" ^~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors compilation terminated. scons: *** [build/X86/dev/isa_fake.o] Error 1 scons: *** [build/X86/dev/dma_device.o] Error 1 :0:6: error: ISO C++11 requires whitespace after the macro name [-Werror] In file included from build/X86/params/IntrControl.hh:6:0, from build/X86/params/Platform.hh:6, from build/X86/dev/platform.hh:43, from build/X86/dev/platform.cc:32: build/X86/params/System.hh:20:10: fatal error: params/KvmVM.hh: No such file or directory #include "params/KvmVM.hh" ^~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors compilation terminated. scons: *** [build/X86/dev/platform.o] Error 1 :0:6: error: ISO C++11 requires whitespace after the macro name [-Werror] In file included from build/X86/params/PioDevice.hh:6:0, from build/X86/params/BasicPioDevice.hh:10, from build/X86/dev/io_device.hh:48, from build/X86/dev/baddev.hh:39, from build/X86/dev/baddev.cc:35: build/X86/params/System.hh:20:10: fatal error: params/KvmVM.hh: No such file or directory #include "params/KvmVM.hh" ^~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors compilation terminated. scons: *** [build/X86/dev/baddev.o] Error 1 cc1plus: all warnings being treated as errors scons: *** [build/X86/sim/main.o] Error 1 cc1plus: all warnings being treated as errors scons: *** [build/X86/dev/intpin.o] Error 1 cc1plus: all warnings being treated as errors scons: *** [build/X86/dev/intel_8254_timer.o] Error 1 scons: building terminated because of errors.

Here are my questions:

  1. Is it possible to obtain the activities-based power trace like aladdin in smaug framework?
  2. If so, could you give me any suggestions to solve these errors?