gem5运新spec2006(修改)
来源:互联网 发布:毕业证复印件制作软件 编辑:程序博客网 时间:2024/05/01 16:27
按照我之前的那篇博客(地址:http://blog.csdn.net/wyj7260/article/details/8280278)运行spec2006时,只有两个benchmark是可以运行的,其他的都出现了错误。
出现这些错误的原因是:
之前出现的那些错误是由于gem5做了更新,而相应的spec2006没有做更新,所以在运行spec2006时,会有一些函数什么的找不到。
现在我把.sy文件贴出来,供大家参考
文件1:cpu2006.py
#Mybench.pyimport m5from m5.objects import *m5.util.addToPath('../common')binary_dir = '/home/wyj/installspec2006/benchspec/CPU2006/'data_dir = '/home/wyj/installspec2006/benchspec/CPU2006/'#====================#400.perlbenchperlbench = LiveProcess()perlbench.executable = binary_dir+'400.perlbench/exe/perlbench_base.amd64-m64-gcc41-nn'data=data_dir+'400.perlbench/data/test/input/makerand.pl'perlbench.cmd = [perlbench.executable] + [data]perlbench.output = 'attrs.out'#401.bzip2bzip2 = LiveProcess()bzip2.executable = binary_dir+'401.bzip2/exe/bzip2_base.amd64-m64-gcc41-nn'data=data_dir+'401.bzip2/data/all/input/input.program'bzip2.cmd = [bzip2.executable] + [data, '1']bzip2.output = 'input.program.out'#====================#403.gccgcc = LiveProcess()gcc.executable = binary_dir+'403.gcc/exe/gcc_base.amd64-m64-gcc41-nn'data=data_dir+'403.gcc/data/test/input/cccp.i'output='/home/wyj/installspec2006/benchspec/CPU2006/403.gcc/data/test/output/cccp.s'gcc.cmd = [gcc.executable] + [data]+['-o',output]gcc.output = 'ccc.out'#410.bwavesbwaves = LiveProcess()bwaves.executable = binary_dir+'410.bwaves/exe/bwaves_base.amd64-m64-gcc41-nn'data=data_dir+'410.bwaves/data/test/input/bwaves.in'bwaves.cmd = [bwaves.executable]#====================#416.gamessgamess=LiveProcess()gamess.executable = binary_dir+'416.gamess/exe/gamess_base.amd64-m64-gcc41-nn'gamess.cmd = [gamess.executable]gamess.input='exam29.config'gamess.output='exam29.output'#429.mcfmcf = LiveProcess()mcf.executable = binary_dir+'429.mcf/exe/mcf_base.amd64-m64-gcc41-nn'data=data_dir+'429.mcf/data/test/input/inp.in'mcf.cmd = [mcf.executable] + [data]mcf.output = 'inp.out'#====================#433.milcmilc=LiveProcess()milc.executable = binary_dir+'433.milc/exe/milc_base.amd64-m64-gcc41-nn'stdin=data_dir+'433.milc/data/test/input/su3imp.in'milc.cmd = [milc.executable]milc.input=stdinmilc.output='su3imp.out'#====================#434.zeusmpzeusmp=LiveProcess()zeusmp.executable = binary_dir+'434.zeusmp/exe/zeusmp_base.amd64-m64-gcc41-nn'zeusmp.cmd = [zeusmp.executable]zeusmp.output = 'zeusmp.stdout'#====================#435.gromacsgromacs = LiveProcess()gromacs.executable = binary_dir+'435.gromacs/exe/gromacs_base.amd64-m64-gcc41-nn'data=data_dir+'435.gromacs/data/test/input/gromacs.tpr'gromacs.cmd = [gromacs.executable] + ['-silent','-deffnm',data,'-nice','0']#====================#436.cactusADMcactusADM = LiveProcess()cactusADM.executable = binary_dir+'436.cactusADM/exe/cactusADM_base.amd64-m64-gcc41-nn'data=data_dir+'436.cactusADM/data/test/input/benchADM.par'cactusADM.cmd = [cactusADM.executable] + [data]cactusADM.output = 'benchADM.out'#437.leslie3dleslie3d=LiveProcess()leslie3d.executable = binary_dir+'437.leslie3d/exe/leslie3d_base.amd64-m64-gcc41-nn'stdin=data_dir+'437.leslie3d/data/test/input/leslie3d.in'leslie3d.cmd = [leslie3d.executable]leslie3d.input=stdinleslie3d.output='leslie3d.stdout'#444.namdnamd = LiveProcess()namd.executable = binary_dir+'444.namd/exe/namd_base.amd64-m64-gcc41-nn'input=data_dir+'444.namd/data/all/input/namd.input'namd.cmd = [namd.executable] + ['--input',input,'--iterations','1','--output','namd.out']namd.output='namd.stdout'#445.gobmkgobmk=LiveProcess()gobmk.executable = binary_dir+'445.gobmk/exe/gobmk_base.amd64-m64-gcc41-nn'stdin=data_dir+'445.gobmk/data/test/input/capture.tst'gobmk.cmd = [gobmk.executable]+['--quiet','--mode','gtp']gobmk.input=stdingobmk.output='capture.out'#====================#447.dealIIdealII=LiveProcess()dealII.executable = binary_dir+'447.dealII/exe/dealII_base.amd64-m64-gcc41-nn'dealII.cmd = [gobmk.executable]+['8']dealII.output='log'#450.soplexsoplex=LiveProcess()soplex.executable = binary_dir+'450.soplex/exe/soplex_base.amd64-m64-gcc41-nn'data=data_dir+'450.soplex/data/test/input/test.mps'soplex.cmd = [soplex.executable]+['-m10000',data]soplex.output = 'test.out'#453.povraypovray=LiveProcess()povray.executable = binary_dir+'453.povray/exe/povray_base.amd64-m64-gcc41-nn'data=data_dir+'453.povray/data/test/input/SPEC-benchmark-test.ini'#povray.cmd = [povray.executable]+['SPEC-benchmark-test.ini']povray.cmd = [povray.executable]+[data]povray.output = 'SPEC-benchmark-test.stdout'#454.calculixcalculix=LiveProcess()calculix.executable = binary_dir+'454.calculix/exe/calculix_base.amd64-m64-gcc41-nn'data=data_dir+'454.calculix/data/test/input/beampic'calculix.cmd = [calculix.executable]+['-i',data]calculix.output = 'beampic.log'#456.hmmerhmmer=LiveProcess()hmmer.executable = binary_dir+'456.hmmer/exe/hmmer_base.amd64-m64-gcc41-nn'data=data_dir+'456.hmmer/data/test/input/bombesin.hmm'hmmer.cmd = [hmmer.executable]+['--fixed', '0', '--mean', '325', '--num', '5000', '--sd', '200', '--seed', '0', data]hmmer.output = 'bombesin.out'#458.sjengsjeng=LiveProcess()sjeng.executable = binary_dir+'458.sjeng/exe/sjeng_base.amd64-m64-gcc41-nn'data=data_dir+'458.sjeng/data/test/input/test.txt'sjeng.cmd = [sjeng.executable]+[data]sjeng.output = 'test.out'#459.GemsFDTDGemsFDTD=LiveProcess()GemsFDTD.executable = binary_dir+'459.GemsFDTD/exe/GemsFDTD_base.amd64-m64-gcc41-nn'GemsFDTD.cmd = [GemsFDTD.executable]GemsFDTD.output = 'test.log'#462.libquantumlibquantum=LiveProcess()libquantum.executable = binary_dir+'462.libquantum/exe/libquantum_base.amd64-m64-gcc41-nn'libquantum.cmd = [libquantum.executable],'33','5'libquantum.output = 'test.out'#464.h264refh264ref=LiveProcess()h264ref.executable = binary_dir+'464.h264ref/exe/h264ref_base.amd64-m64-gcc41-nn'data=data_dir+'464.h264ref/data/test/input/foreman_test_encoder_baseline.cfg'h264ref.cmd = [h264ref.executable]+['-d',data]h264ref.output = 'foreman_test_encoder_baseline.out'#470.lbmlbm=LiveProcess()lbm.executable = binary_dir+'470.lbm/exe/lbm_base.amd64-m64-gcc41-nn'data=data_dir+'470.lbm/data/test/input/100_100_130_cf_a.of'lbm.cmd = [lbm.executable]+['20', 'reference.dat', '0', '1' ,data]lbm.output = 'lbm.out'#471.omnetppomnetpp=LiveProcess()omnetpp.executable = binary_dir+'471.omnetpp/exe/omnetpp_base.amd64-m64-gcc41-nn'data=data_dir+'471.omnetpp/data/test/input/omnetpp.ini'omnetpp.cmd = [omnetpp.executable]+[data]omnetpp.output = 'omnetpp.log'#====================#473.astarastar=LiveProcess()astar.executable = binary_dir+'473.astar/exe/astar_base.amd64-m64-gcc41-nn'astar.cmd = [astar.executable]+['lake.cfg']astar.output = 'lake.out'#====================#481.wrfwrf=LiveProcess()wrf.executable = binary_dir+'481.wrf/exe/wrf_base.amd64-m64-gcc41-nn'wrf.cmd = [wrf.executable]+['namelist.input']wrf.output = 'rsl.out.0000'#482.sphinxsphinx3=LiveProcess()sphinx3.executable = binary_dir+'482.sphinx3/exe/sphinx_livepretend_base.amd64-m64-gcc41-nn'sphinx3.cmd = [sphinx3.executable]+['ctlfile', '.', 'args.an4']sphinx3.output = 'an4.out'#483.xalancbmkxalancbmk=LiveProcess()xalancbmk.executable = binary_dir+'483.xalancbmk/exe/Xalan_base.amd64-m64-gcc41-nn'xalancbmk.cmd = [xalancbmk.executable]+['-v','test.xml','xalanc.xsl']xalancbmk.output = 'test.out'#998.specrandspecrand_i=LiveProcess()specrand_i.executable = binary_dir+'998.specrand/exe/specrand_base.amd64-m64-gcc41-nn'specrand_i.cmd = [specrand_i.executable] + ['324342','24239']specrand_i.output = 'rand.24239.out'#999.specrandspecrand_f=LiveProcess()specrand_f.executable = binary_dir+'999.specrand/exe/specrand_base.amd64-m64-gcc41-nn'specrand_f.cmd = [specrand_i.executable] + ['324342','24239']specrand_f.output = 'rand.24239.out'
文件2:cmp.py.origin
文件内容:
#cmp.py# Simple configuration scriptimport os, optparse, sysimport m5from m5.defines import buildEnvfrom m5.objects import *from m5.util import addToPathaddToPath('../common')addToPath('../ruby')addToPath('../topologies')import Optionsimport Rubyimport Simulationfrom Caches import *import CacheConfigimport cpu2006# Get paths we might need. It's expected this file is in m5/configs/example.config_path = os.path.dirname(os.path.abspath(__file__))print config_path # 'configs/cpu2006'config_root = os.path.dirname(config_path)print config_rootm5_root = os.path.dirname(config_root)print m5_rootparser = optparse.OptionParser()Options.addCommonOptions(parser)Options.addSEOptions(parser)# Benchmark optionsparser.add_option("-b", "--benchmark", default="", help="The benchmark to be loaded.")parser.add_option("--chkpt", default="", help="The checkpoint to load.")execfile(os.path.join(config_root, "common", "Options.py"))if '--ruby' in sys.argv: Ruby.define_options(parser)(options, args) = parser.parse_args()if args: print "Error: script doesn't take any positional arguments" sys.exit(1)if options.benchmark == 'perlbench': process = cpu2006.perlbenchelif options.benchmark == 'bzip2': process = cpu2006.bzip2elif options.benchmark == 'gcc': process = cpu2006.gccelif options.benchmark == 'bwaves': process = cpu2006.bwaveselif options.benchmark == 'gamess': process = cpu2006.gamesselif options.benchmark == 'mcf': process = cpu2006.mcfelif options.benchmark == 'milc': process = cpu2006.milcelif options.benchmark == 'zeusmp': process = cpu2006.zeusmpelif options.benchmark == 'gromacs': process = cpu2006.gromacselif options.benchmark == 'cactusADM': process = cpu2006.cactusADMelif options.benchmark == 'leslie3d': process = cpu2006.leslie3delif options.benchmark == 'namd': process = cpu2006.namdelif options.benchmark == 'gobmk': process = cpu2006.gobmk;elif options.benchmark == 'dealII': process = cpu2006.dealIIelif options.benchmark == 'soplex': process = cpu2006.soplexelif options.benchmark == 'povray': process = cpu2006.povrayelif options.benchmark == 'calculix': process = cpu2006.calculixelif options.benchmark == 'hmmer': process = cpu2006.hmmerelif options.benchmark == 'sjeng': process = cpu2006.sjengelif options.benchmark == 'GemsFDTD': process = cpu2006.GemsFDTDelif options.benchmark == 'libquantum': process = cpu2006.libquantumelif options.benchmark == 'h264ref': process = cpu2006.h264refelif options.benchmark == 'tonto': process = cpu2006.tontoelif options.benchmark == 'lbm': process = cpu2006.lbmelif options.benchmark == 'omnetpp': process = cpu2006.omnetppelif options.benchmark == 'astar': process = cpu2006.astarelif options.benchmark == 'wrf': process = cpu2006.wrfelif options.benchmark == 'sphinx3': process = cpu2006.sphinx3elif options.benchmark == 'xalancbmk': process = cpu2006.xalancbmkelif options.benchmark == 'specrand_i': process = cpu2006.specrand_ielif options.benchmark == 'specrand_f': process = cpu2006.specrand_fif options.chkpt != "": process.chkpt = options.chkpt(CPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)CPUClass.clock = '1.0GHz'#np = options.num_cpus np = 1system = System(cpu = [CPUClass(cpu_id=i) for i in xrange(np)], physmem = SimpleMemory(range=AddrRange("1024MB")), membus = CoherentBus(), mem_mode = 'timing')if options.ruby: if not (options.cpu_type == "detailed" or options.cpu_type == "timing"): print >> sys.stderr, "Ruby requires TimingSimpleCPU or O3CPU!!" sys.exit(1) options.use_map = True Ruby.create_system(options, system) assert(options.num_cpus == len(system.ruby._cpu_ruby_ports)) for i in xrange(np): ruby_port = system.ruby._cpu_ruby_ports[i] # Create the interrupt controller and connect its ports to Ruby # Note that the interrupt controller is always present but only # in x86 does it have message ports that need to be connected system.cpu[i].createInterruptController() # Connect the cpu's cache ports to Ruby system.cpu[i].icache_port = ruby_port.slave system.cpu[i].dcache_port = ruby_port.slave if buildEnv['TARGET_ISA'] == 'x86': system.cpu[i].interrupts.pio = ruby_port.master system.cpu[i].interrupts.int_master = ruby_port.slave system.cpu[i].interrupts.int_slave = ruby_port.master system.cpu[i].itb.walker.port = ruby_port.slave system.cpu[i].dtb.walker.port = ruby_port.slaveelse: system.physmem.port = system.membus.master system.system_port = system.membus.slave CacheConfig.config_cache(options,system)for i in xrange(np): # if options.caches:# system.cpu[i].addPrivateSplitL1Caches(L1Cache(size = '64kB'),# L1Cache(size = '64kB'))# if options.l2cache:# system.l2 = L2Cache(size='2MB')# system.tol2bus = Bus()# system.l2.cpu_side = system.tol2bus.port# system.l2.mem_side = system.membus.port# system.cpu[i].connectMemPorts(system.tol2bus)# else:# system.cpu[i].connectMemPorts(system.membus) system.cpu[i].workload = process[i]root = Root(full_system = False,system = system)Simulation.run(options, root, system, FutureClass)
注意:cpu2006.py中的红色标注的代码(即
binary_dir='/home/wyj/installspec2006/benchspec/CPU2006/'
data_dir='/home/wyj/installspec2006/benchspec/CPU2006/'
)要与你存放的cpu2006.py和cmp.py.origin的路径对应。
运行spec2006命令:(当前目录是home/wyj/gem5-stable$,以mcf这个benchmark为例)
./build/X86/gem5.opt ./configs/example/cmp.py.origin--cpu-type=timing --caches --l2cache -b mcf
其中--caches 和 --l2cache 可以设置cache的大小,比如命令:
./build/X86/gem5.opt ./configs/example/cmp.py.origin --cpu-type=timing --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=256kB --l3_size=8192kB -b mcf
表示 分别设置l1指令cache,数据cache,l2cache,l3的大小
为了加快速度,可以多开启几个模拟器,比如如下命令
for i in 2kB 4kB 8kB 16kB 32 kB; do ./build/X86/gem5.opt -d ./m5out/998/test$i/ configs/cpu2006/cmp.py -n1 --l2cache --l1d_size $i --l2_size 2MB --l1i_size 32kB --l3_size 8M --l2_assoc 8 --l1d_assoc 8 --l1i_assoc 8 -b specrand_i; done
ld_size的大小为2kB,4kB,8kB,16kB,32kB,生成的存储stats.txt分别存储在m5out/998/test$i/目录下
- gem5运新spec2006(修改)
- gem5如何运行spec2006
- gem5中运行spec2006
- gem5: 可运行的spec2006 benchmark总结
- gem5中使用spec2006并创建simpoints
- A Note on GEM5 - 1 SPEC2006+ARM
- Gem5在X64架构下运行SPEC2006
- gem5运行spec2006出现的fatal的解决方案
- GEM5仿真器(概要)
- GEM5笔记(一)
- gem5
- Gem5的基础知识(1)
- Gem5的基础知识(2)
- runspec 的选项说明(spec2006官方文档的翻译)
- 新版本gem5的splash2 run.py修改版本
- 简单修改gem5的默认例子hello world
- gem5模拟器使用介绍(一)
- gem5模拟器使用介绍(二)
- 如何在linux下写makefile
- SAP问题记录
- linux scsi generic howto学习笔记
- nbu 2430 war of energy
- JAVA对内存的使用和垃圾回收
- gem5运新spec2006(修改)
- abstract class和interface的区别
- cdhtmldialog
- C#网页自动登录和提交POST信息的多种方法
- linux 启动流程
- php 获取 exec 的输出结果
- android NDK 交叉编译
- Linux内核代码风格
- CSS3快速入门教程:新特性