结果实例: 一个cpu的parsec结果

发布时间:2023年12月19日

简介

限于篇幅限制,很多教程和论文只展示部分结果。我们这里展示非常细节的结果,包括输出的许多命令行结果。

运行命令行 的shell窗口

./build/X86/gem5.opt -d m5out/onlyoneCPUkvmCheckPointDifferRCS20231218restore \
 configs/deprecated/example/fs.py --script=configs/yz2023Nov/small_n2/yzfs_canneal.script \
  --kernel=/home/yz/.cache/gem5/x86-linux-kernel-4.19.83 \
  --disk=/home/yz/.cache/gem5/x86-parsec --checkpoint-dir=m5out/onlyoneCPUkvmCheckPointDifferRCS20231218    -r 1  \
  --restore-with-cpu=X86KvmCPU  --cpu-type=TimingSimpleCPU   --num-cpus=1 \
    --script=configs/yz2023Nov/yzfs_parsec.script

运行m5term 的shell窗口

#base) [ 11:31AM ]  [ yz@yz-office:~/myprojects/2024GEM5/parsec-tests/yzmodifiedgem5 ]
./util/term/m5term 3456

结果: 运行命令行 的shell窗口

gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 23.0.1.0
gem5 compiled Oct 22 2023 10:25:41
gem5 started Dec 18 2023 11:31:54
gem5 executing on yz-office, pid 39538
command line: ./build/X86/gem5.opt -d m5out/onlyoneCPUkvmCheckPointDifferRCS20231218restore configs/deprecated/example/fs.py --script=configs/yz2023Nov/small_n2/yzfs_canneal.script --kernel=/home/yz/.cache/gem5/x86-linux-kernel-4.19.83 --disk=/home/yz/.cache/gem5/x86-parsec --checkpoint-dir=m5out/onlyoneCPUkvmCheckPointDifferRCS20231218 -r 1 --restore-with-cpu=X86KvmCPU --cpu-type=TimingSimpleCPU --num-cpus=1 --script=configs/yz2023Nov/yzfs_parsec.script

warn: The `get_runtime_isa` function is deprecated. Please migrate away from using this function.
warn: The fs.py script is deprecated. It will be removed in future releases of  gem5.
warn: The `get_runtime_isa` function is deprecated. Please migrate away from using this function.
warn: The `get_runtime_isa` function is deprecated. Please migrate away from using this function.
yzzz print we are using  root = Root(full_system=True, system=test_sys) 

Global frequency set at 1000000000000 ticks per second
warn: system.workload.acpi_description_table_pointer.rsdt adopting orphan SimObject param 'entries'
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
src/mem/dram_interface.cc:690: warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
src/sim/kernel_workload.cc:46: info: kernel located at: /home/yz/.cache/gem5/x86-linux-kernel-4.19.83
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
      0: system.pc.south_bridge.cmos.rtc: Real-time clock set to Sun Jan  1 00:00:00 2012
system.pc.com_1.device: Listening for connections on port 3456
system.remote_gdb: Listening for connections on port 7000
src/mem/coherent_xbar.cc:140: warn: CoherentXBar system.membus has no snooping ports attached!
src/dev/intel_8254_timer.cc:128: warn: Reading current count from inactive timer.
Switch at curTick count:10000
src/cpu/kvm/base.cc:169: info: KVM: Coalesced MMIO disabled by config.
src/arch/x86/cpuid.cc:180: warn: x86 cpuid family 0x0000: unimplemented function 2
src/arch/x86/cpuid.cc:180: warn: x86 cpuid family 0x0000: unimplemented function 3
src/arch/x86/cpuid.cc:180: warn: x86 cpuid family 0x0000: unimplemented function 4
src/arch/x86/cpuid.cc:180: warn: x86 cpuid family 0x0000: unimplemented function 5
src/arch/x86/cpuid.cc:180: warn: x86 cpuid family 0x0000: unimplemented function 6
src/sim/simulate.cc:194: info: Entering event queue @ 11768729380500.  Starting simulation...
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x3a) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0xd90) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x48) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x309) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x30a) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x30b) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x38d) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x38e) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x38f) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x390) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0xc1) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0xc2) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0xc3) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0xc4) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x186) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x187) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x188) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x189) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x12) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x11) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x4b564d01) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x4b564d00) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000000) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000001) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000020) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000021) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000022) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000023) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000100) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000101) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000102) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000103) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000104) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000105) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000003) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000002) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000010) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000080) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x400000b0) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000073) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000106) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000107) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x40000108) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x400000ff) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x400000f1) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x400000f2) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x400000f3) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x400000f4) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x400000f5) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x4b564d02) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x4b564d03) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x4b564d04) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x4b564d06) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x4b564d07) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x3b) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x6e0) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x10a) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x345) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x1a0) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x4d0) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x9e) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x34) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0xce) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x140) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x1fc) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x8b) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x480) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x48d) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x48e) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x48f) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x490) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x485) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x486) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x488) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x48a) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x48b) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x48c) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x491) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0xc0010015) unsupported by gem5. Skipping.
src/arch/x86/kvm/x86_cpu.cc:1562: warn: kvm-x86: MSR (0x4b564d05) unsupported by gem5. Skipping.
Switched CPUS @ tick 11768729390500
switching cpus
src/sim/simulate.cc:194: info: Entering event queue @ 11768729390500.  Starting simulation...
src/sim/power_state.cc:105: warn: PowerState: Already in the requested power state, request ignored
**** REAL SIMULATION ****
src/sim/simulate.cc:194: info: Entering event queue @ 11769812739000.  Starting simulation...
src/dev/x86/pc.cc:117: warn: Don't know what interrupt to clear for console.
build/X86/arch/x86/generated/exec-ns.cc.inc:27: warn: instruction 'verw_Mw_or_Rv' unimplemented
build/X86/arch/x86/generated/exec-ns.cc.inc:27: warn: instruction 'verw_Mw_or_Rv' unimplemented
src/arch/generic/debugfaults.hh:145: warn: MOVNTDQ: Ignoring non-temporal hint, modeling as cacheable!
build/X86/arch/x86/generated/exec-ns.cc.inc:27: warn: instruction 'fwait' unimplemented
build/X86/arch/x86/generated/exec-ns.cc.inc:27: warn: instruction 'verw_Mw_or_Rv' unimplemented
11825043705000: system.pc.com_1.device: attach terminal 0
Exiting @ tick 143338763627000 because m5_exit instruction encountered

结果: 运行m5term的窗口

(base) [ 11:31AM ] [ yz@yz-office:~/myprojects/2024GEM5/parsec-tests/yzmodifiedgem5 ]
$ ./util/term/m5term 3456
==== m5 terminal: Terminal 0 ====
o it.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

yzzzz42Checkpointing simulation…
yzzzz44CheckpointingDone
yzzzzzz47oading old script…
#!/bin/sh

This is YZ’s modifed version of hack_back_ckpt.rcs originaly by Joel Hestness, hestness@cs.utexas.edu.

#I modified it to be able to run with new different script after restoring from a checkpoint.
#The key idea is to “m5read file” twice and “bash” rather than “exec” the script

Demo econd new script: cd /home/gem5/parsec-benchmark; source env.sh; parsecmgmt -a run -p blackscholes -c gcc-hooks -i simsmall -n 2; sleep 5; m5 exit;

You should observe via m5term 3456: First: old script, showing the content of this scipt. Second: new script, show the contents of cd /home/gem5/parsec-benchmark; source env.sh; parsecmgmt -a run -p blackscholes -c gcc-hooks -i simsmall -n 2; sleep 5; m5 exit;

#author: Yizhi Chen: yizhic@kth.se 2023-Dec-18th

Test if the RUNSCRIPT_VAR environment variable is already set

if [ “${RUNSCRIPT_VAR+set}” != set ]
then
# Signal our future self that it’s safe to continue
export RUNSCRIPT_VAR=1
else
# We’ve already executed once, so we should exit
echo “yzzzWe’ve already executed once, so we should exit”
sleep 2
/sbin/m5 exit
fi

Checkpoint the first execution

echo “yzzzz42Checkpointing simulation…”
/sbin/m5 checkpoint
echo “yzzzz44CheckpointingDone”

Test if we previously okayed ourselves to run this script

if [ “$RUNSCRIPT_VAR” -eq 1 ]
then

# Signal our future self not to recurse infinitely
export RUNSCRIPT_VAR=2

# Read the script for the checkpoint restored execution
echo "yzzzzzz47oading old script..."
/sbin/m5 readfile > /tmp/runscript
cat /tmp/runscript 
echo "yzzzzzz54oading second new script..."
/sbin/m5 readfile > /tmp/runscript
cat /tmp/runscript
echo "yzzzzz59runing second new script..."
chmod 755 /tmp/runscript

# Execute the new runscript
if [ -s /tmp/runscript ]
then
	echo "yzzzzzz54execute newscrpt..."
	#exec /tmp/runscript
	bash /tmp/runscript
else
	echo "yzzzzz56Script not specified. Dropping into shell..."
	/bin/bash
fi

fi
sleep 1;
echo “yzzzzzz62Fell through script. Exiting…”
sleep 3;
/sbin/m5 exit

yzzzzzz54oading second new script…
cd /home/gem5/parsec-benchmark; source env.sh; echo " YZZZ source done "; parsecmgmt -a run -p blackscholes -c gcc-hooks -i simsmall -n 1; sleep 5; m5 exit;
yzzzzz59runing second new script…
yzzzzzz54execute newscrpt…
YZZZ source done
[PARSEC] Benchmarks to run: parsec.blackscholes

[PARSEC] [========== Running benchmark parsec.blackscholes [1] ==========]
[PARSEC] Setting up run directory.
[PARSEC] Unpacking benchmark input ‘simsmall’.
in_4K.txt
[PARSEC] Running ‘time /home/gem5/parsec-benchmark/pkgs/apps/blackscholes/inst/amd64-linux.gcc-hooks/bin/blackscholes 1 in_4K.txt prices.txt’:
[PARSEC] [---------- Beginning of output ----------]
PARSEC Benchmark Suite Version 3.0-beta-20150206
[HOOKS] PARSEC Hooks Version 1.2
Num of Options: 4096
Num of Runs: 100
Size of data: 163840
[HOOKS] Entering ROI
[HOOKS] Leaving ROI
[HOOKS] Total time spent in ROI: 16.646s
[HOOKS] Terminating

real 0m22.939s
user 0m22.105s
sys 0m0.326s
[PARSEC] [---------- End of output ----------]
[PARSEC]
[PARSEC] BIBLIOGRAPHY
[PARSEC]
[PARSEC] [1] Bienia. Benchmarking Modern Multiprocessors. Ph.D. Thesis, 2011.
[PARSEC]
[PARSEC] Done.

分析:

概况

stats.txt里是4570s,也就是76分钟,用的cputype是timing simple。如果用kvm只需要几秒。
在这里插入图片描述

分析窗口 1

在命令行窗口 1 里 显示了“ Entering event queue @ 11769812739000. Starting simulation…”,这里意味着checkpoint (在这里是11769812739000 ticks)之前的仿真被跳过。
Exiting @ tick 143338763627000 because m5_exit instruction encountered 代表 143338763627000时收到了 m5 exit 命令,仿真结束。

分析窗口2

自带的开头

在这里插入图片描述

下面是我的脚本内容。我的脚本script会读取m5readfile 两次,下面是第一次的脚本内容

yzzzz42Checkpointing simulation...
yzzzz44CheckpointingDone
yzzzzzz47oading old script...
。。。。跳过一些
sleep 3; 
/sbin/m5 exit

下面是第二次的内容,第二次的内容是我–script指定的,与checkpoint时指定不同的脚本文件,内容如下/

yzzzzzz54oading second new script...
cd /home/gem5/parsec-benchmark; source env.sh;  echo " YZZZ source done ";  parsecmgmt -a run -p blackscholes  -c gcc-hooks -i simsmall  -n 1; sleep 5; m5 exit; 

我的脚本会cat这两个内容,还是执行(bash) 这个新的脚本文件的内容。
也就是说,我的脚本会让gem5运行一个bash,跳入 /home/gem5/parsec-benchmark路径,这个路径是disk自带的。然后source当前路径下的一个文件,env .sh,这也是disk自带的。 然后shell print一个我自定义的字符串,是为了检查这个脚本有在运行。然后是运行这个disk自带的benchmark,运行完后等待一会,退出。

下面可以看出,我的echo " YZZZ source done "有成功运行,接下来的漫长等待(1小时)就不担心了。
在这里插入图片描述
然后是 parsecmgmt -a run -p blackscholes -c gcc-hooks -i simsmall -n 1的结果。
这个很慢,地球时间需要一些时间。运行完成后的结果是:
在这里插入图片描述
至此,两个命令行窗口的全部结果都显示完了。

文章来源:https://blog.csdn.net/qq_34898487/article/details/135093618
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。