Hi,

Could you provide more information on your problem?  I am using SPEC CPU2017 right now, I followed this tutorial for SPECCPU2006 and have basically modified the scripts to fit my needs.  I am currently running them in FS and not SE mode for ARM aarch64.  One thing to keep in mind is that you need to have the same compilers on the boot image, as the ones used to build the benchmarks on the native machine.  I am sharing with you the scripts I used to run them.  gen_bench_script.sy is the on you need to run, this one will generate .rcs scripts, the ones you need to provide to gem5 fs.py script to run the benchmarks.

A quick description of the process is the following:

Build SPEC as you would normally on your native machine

Run them natively to create the directory structures and unpack input files

Run gen_bench_script.sy -b <benchmark name> -w <workload, e.g. ref>  -o run_<benchmark>.rcs

I have not added the test workloads, so this will only work for ref workloads.  Also you need to modify the directories (e.g. root_dir variable) in the script to match your setup on the gem5 boot image.  Another thing you will need is probably a newer boot image (this depends on how you built your benchmarks but you will need as I said the same compilers, I have used an opensuse tumbleweed image to match my native setup.)

I am currently generating simpoints for these benchmarks so I am not sure everything will run smoothly, as this is the first time I try running the SPEC CPU2017, but a few have already completed without any issues.

Let me know if I can help any further,

Dimitrios Chasapis

On 3/21/19 7:28 PM, S M Farabi Mahmud wrote:
Can anyone provide any link or webpage for running SPECCPU2017 benchmarks in Gem5 simulator? I am trying to follow this link which contains a tutorial for SPECCPU2006 but it is not working properly.

SPECCPU2006 on gem5:
https://markgottscho.wordpress.com/2014/09/20/tutorial-easily-running-spec-cpu2006-benchmarks-in-the-gem5-simulator/

--
S.M.Farabi Mahmud
Graduate Student
Department of Computer Science & Engineering
Texas A&M University

_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users


http://bsc.es/disclaimer
'''
    File name: benchmarks.py
    Description: Called by gen_bench_script.py to setup paths and 
                 pass arguments to the CPU SPEC17 benchmarks.
    Author: Dimitrios Chasapis
    Email: dimitrios.chasa...@bsc.es
    Python Version: 2.7
'''

import sys

root_dir = '/your_home_dir/SPEC_CPU_2017/benchspec/CPU'
run_dir = ''
sys_suffix = '_base.aarch64-64'

class Process:
	def __init__(self):
		self.executable = None
		self.cmd = None
		self.input = None
		self.workload = None

class perlbench(Process):
	def __init__(self, workload):
		#600.perlbench
		self.root_dir = root_dir + '/600.perlbench_s'
		self.executable =  self.root_dir + '/exe/perlbench_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			print "No test workload available!"
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['-I./lib', 'checkspam.pl', '2500', '5', '25', '11', '150', '1', '1', '1', '1']
		elif workload == 'ref2':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['-I./lib', 'diffmail.pl', '4', '800', '10', '17',
'19', '300']
		elif workload == 'ref3':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['-I./lib', 'splitmail.pl', '6400', '12', '26', '16',
'100', '0']
		else:
			print "Not a valid workload available!"
			sys.exit()

class gcc(Process):
	def __init__(self, workload):
		#602.gcc
a
		self.root_dir = root_dir + '/602.gcc_s'
		self.executable = self.root_dir + '/exe/sgcc' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['cccp.in', '-o', 'cccp.s']
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['gcc-pp.c', '-O5', '-fipa-pta', '-o',
'gcc-pp.opts-o5_-fipa-pta.s']
		elif workload == 'ref2':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['gcc-pp.c', '-O5', '-finline-limit=1000',
'-fselective-scheduling', '-fselective-scheduling2', '-o', 'gcc-pp.opts-o5_-finline-limit=1000.s']
		elif workload == 'ref3':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['gcc-pp.c', '-O5', '-finline-limit=24000', 'fgcse',
'-fgcse-las', '-fgcse-lm', '-fgcse-sm', '-o', 'gcc-pp.opts-o5_-finline-limit=24000.s']

		else:
			print 'Not a valid workload'
			sys.exit(1)

class bwaves(Process):
	def __init__(self, workload):
		#604.bwaves
		self.root_dir = root_dir + '/603.bwaves_s'
		self.executable = self.root_dir + '/exe/speed_bwaves' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['bwaves_1']
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['bwaves_1']
		elif workload == 'ref2':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['bwaves_2']
		elif workload == 'ref3':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.input = None
			self.cmd = [self.executable] + ['bwaves_3']
		else:
			print 'Not a valid workload'
			sys.exit(1)
		#bwaves.output = out_dir + 'bwaves.out'

class mcf(Process):
	def __init__(self, workload):
		#429.mcf
		self.root_dir = root_dir + '/605.mcf_s'
		self.executable =  self.root_dir + '/exe/mcf_s' + sys_suffix
		if workload == 'test':
		# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable] + ['inp.in']
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['inp.in']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)


class cactuBSSN(Process):
	def __init__(self, workload):
		#607.cactusADM
		self.root_dir = root_dir + '/607.cactuBSSN_s'
		self.executable = self.root_dir + '/exe/cactuBSSN_s' + sys_suffix 
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable] + ['benchADM.par']
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['spec_ref.par']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)
	

class lbm(Process):
	def __init__(self, workload):
		#470.lbm
		self.root_dir = root_dir + '/619.lbm_s'
		self.executable = self.root_dir + '/exe/lbm_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable] + ['20', 'reference.dat', '0', '1', '100_100_130_cf_a.of']
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['2000', 'reference.dat', '0', '0', '200_200_260_ldc.of']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)
	

class omnetpp(Process):
	def __init__(self, workload):
		#620.omnetpp
		self.root_dir = root_dir + '/620.omnetpp_s'
		self.executable = self.root_dir + '/exe/omnetpp_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable] + ['omnetpp.ini']
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['-c', 'General', '-r', '0']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)
	
class wrf(Process):
	def __init__(self, workload):
		#621.wrf
		self.root_dir = root_dir + '/621.wrf_s'
		self.executable = self.root_dir + '/exe/wrf_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] 
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)
	

class xalancbmk(Process):
	def __init__(self, workload):
		#623.xalancbmk
		self.root_dir = root_dir + '/623.xalancbmk_s'
		self.executable = self.root_dir + '/exe/xalancbmk_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable] + ['-v','test.xml','xalanc.xsl']
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['-v','t5.xml','xalanc.xsl']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)

class x264(Process):
	def __init__(self, workload):
		#625.x264
		self.root_dir = root_dir + '/625.x264_s'
		self.executable = self.root_dir + '/exe/x264_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['--pass', '1', '--stats', 'x264_stats.log',
																			'--bitrate', '1000', '--frames', '1000', 
																			'-o', 'BuckBunny_New.264', 'BuckBunny.yuv', '1280x720']
			self.input = None
		elif workload == 'ref2':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['--pass', '2', '--stats', 'x264_stats.log',
																			'--bitrate', '1000', '--dumpyuv', '200', '--frames',
																			'1000', '-o', 'BuckBunny_New.264', 'BuckBunny.yuv',
																			'1280x720']
			self.input = None
		elif workload == 'ref3':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['--seek', '500', '--dumpyuv', '200', '--frames',
																			'1250', '-o', 'BuckBunny_New.264', 'BuckBunny.yuv',
																			'1280x720']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)

class cam4(Process):
	def __init__(self, workload):
		#627.cam4
		self.root_dir = root_dir + '/627.cam4_s'
		self.executable = self.root_dir + '/exe/cam4_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] 
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)


class pop2(Process):
	def __init__(self, workload):
		#628.pop2
		self.root_dir = root_dir + '/628.pop2_s'
		self.executable = self.root_dir + '/exe/speed_pop2' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] 
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)


class deepsjeng(Process):
	def __init__(self, workload):
		#631.deepsjeng
		self.root_dir = root_dir + '/631.deepsjeng_s'
		self.executable = self.root_dir + '/exe/deepsjeng_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['ref.txt'] 
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)

class imagick(Process):
	def __init__(self, workload):
		#638.imagick
		self.root_dir = root_dir + '/638.imagick_s'
		self.executable = self.root_dir + '/exe/imagick_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['-limit', 'disk', '0', 'refspeed_input.tga',
'-resize', '817%', '-rotate', '-2.76', '-shave', '540x375', 
'-alpha', 'remove', '-auto-level', '-contrast-stretch', '1x1%', '-colorspace', 'Lab',
'-channel', 'R', '-equalize', '+channel', '-colorspace', 'sRGB', '-define', 
'histogram:unique-colors=false', '-adaptive-blur', '0x5', '-despeckle', '-auto-gamma', '-adaptive-sharpen', '55', '-enhance', '-brightness-contrast', '10x10', '-resize', '30%']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)

class leela(Process):
	def __init__(self, workload):
		#641.leela
		self.root_dir = root_dir + '/641.leela_s'
		self.executable = self.root_dir + '/exe/leela_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['ref.sgf']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)


class nab(Process):
	def __init__(self, workload):
		#644.nab
		self.root_dir = root_dir + '/644.nab_s'
		self.executable = self.root_dir + '/exe/nab_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['3j1n', '20140', '317', '220']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)


class exchange2(Process):
	def __init__(self, workload):
		#648.exchange2
		self.root_dir = root_dir + '/648.exchange2_s'
		self.executable = self.root_dir + '/exe/exchange2_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['6']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)


class fotonik3d(Process):
	def __init__(self, workload):
		#649.fotonik3d
		self.root_dir = root_dir + '/649.fotonik3d_s'
		self.executable = self.root_dir + '/exe/fotonik3d_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)


class roms(Process):
	def __init__(self, workload):
		#654.roms
		self.root_dir = root_dir + '/654.roms_s'
		self.executable = self.root_dir + '/exe/sroms' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['6']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)


class xz(Process):
	def __init__(self, workload):
		#657.xz
		self.root_dir = root_dir + '/657.xz_s'
		self.executable = self.root_dir + '/exe/xz_s' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable]
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['cld.tar.xz', '1400', 
'19cf30ae51eddcbefda78dd06014b4b96281456e078ca7c13e1c0c9e6aaea8dff3efb4ad6b0456697718cede6bd5454852652806a657bb56e07d61128434b474', '536995164', '539938872', '8']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)


class specrand_i(Process):
	def __init__(self, workload):
		#998.specrand
		self.root_dir = root_dir + '/998.specrand_is'
		self.executable = self.root_dir + '/exe/specrand_is' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable] + ['324342', '24239']
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['1255432124', '234923']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)

class specrand_f(Process):
	def __init__(self, workload):
		#996.specrand_f
		self.root_dir = root_dir + '/996.specrand_fs'
		self.executable = self.root_dir + '/exe/specrand_fs' + sys_suffix
		if workload == 'test':
			# TEST CMDS
			self.run_dir = self.root_dir + '/run/run_base_test_aarch64-64.0000'
			self.cmd = [self.executable] + ['324342', '24239']
			self.input = None
		elif workload == 'ref':
			# REF CMDS
			self.run_dir = self.root_dir + '/run/run_base_refspeed_aarch64-64.0000'
			self.cmd = [self.executable] + ['1255432124', '234923']
			self.input = None
		else:
			print 'Not a valid workload'
			sys.exit(1)

'''
    File name: run_bench.py
    Description: Creates a .rcs script to be executed by fs.py
    Author: Dimitrios Chasapis
    Email: dimitrios.chasa...@bsc.es
    Python Version: 2.7
'''

import sys
import os
import benchmarks
from subprocess import call
import optparse

parser = optparse.OptionParser()

parser.add_option("-b", "--benchmark", type="string", default="", help="The SPEC benchmark to be loaded.")
parser.add_option("-w", "--workload", type="string", default="", help="Workload Class.")
parser.add_option("-o", "--output_file", type="string", default="bench.rcs", help="The gem5 rcs script name.")
#parser.add_option("--benchmark_stdout", type="string", default="", help="Absolute path for stdout redirection for the benchmark.")
#parser.add_option("--benchmark_stderr", type="string", default="", help="Absolute path for stderr redirection for the benchmark.")

(options, args) = parser.parse_args()

if args:
    print("Error: script doesn't take any positional arguments")
    sys.exit(1)

if options.benchmark:
    print('Selected SPEC_CPU2017 benchmark')
    if options.benchmark == 'perlbench':
        print('--> perlbench')
        process = benchmarks.perlbench(options.workload)
    elif options.benchmark == 'gcc':
        print('--> gcc')
        process = benchmarks.gcc(options.workload)
    elif options.benchmark == 'bwaves':
        print('--> bwaves')
        process = benchmarks.bwaves(options.workload)
    elif options.benchmark == 'mcf':
        print('--> mcf')
        process = benchmarks.mcf(options.workload)
    elif options.benchmark == 'cactuBSSN':
        print('--> cactusADM')
        process = benchmarks.cactuBSSN(options.workload)
    elif options.benchmark == 'lbm':
        print('--> lbm')
        process = benchmarks.lbm(options.workload)
    elif options.benchmark == 'omnetpp':
        print('--> omnetpp')
        process = benchmarks.omnetpp(options.workload)
    elif options.benchmark == 'wrf':
        print('--> wrf')
        process = benchmarks.wrf(options.workload)
    elif options.benchmark == 'xalancbmk':
        print('--> xalancbmk')
        process = benchmarks.xalancbmk(options.workload)
    elif options.benchmark == 'x264':
        print('--> x264')
        process = benchmarks.x264(options.workload)
    elif options.benchmark == 'cam4':
        print('--> cam4')
        process = benchmarks.cam4(options.workload)
    elif options.benchmark == 'pop2':
        print('--> pop2')
        process = benchmarks.pop2(options.workload)
    elif options.benchmark == 'deepsjeng':
        print('--> deepsjeng')
        process = benchmarks.deepsjeng(options.workload)
    elif options.benchmark == 'imagick':
        print('--> imagick')
        process = benchmarks.imagick(options.workload)
    elif options.benchmark == 'leela':
        print('--> leela')
        process = benchmarks.leela(options.workload)
    elif options.benchmark == 'nab':
        print('--> nab')
        process = benchmarks.nab(options.workload)
    elif options.benchmark == 'exchange2':
        print('--> exchange2')
        process = benchmarks.exchange2(options.workload)
    elif options.benchmark == 'fotonik3d':
        print('--> fotonik3d')
        process = benchmarks.fotonik3d(options.workload)
    elif options.benchmark == 'roms':
        print('--> roms')
        process = benchmarks.roms(options.workload)
    elif options.benchmark == 'xz':
        print('--> xz')
        process = benchmarks.xz(options.workload)
    elif options.benchmark == 'specrand_i':
        print('--> specrand_i')
        process = benchmarks.specrand_i(options.workload)
    elif options.benchmark == 'specrand_f':
        print('--> specrand_f')
        process = benchmarks.specrand_f(options.workload)
    else:
        print("Not an available SPEC CPU2017 benchmark requested! Exiting.")
        sys.exit(1)
else:
    print >> sys.stderr, "Need --benchmark switch to specify a SPEC CPU2017 workload. Exiting!\n"
    sys.exit(1)

f = open(options.output_file, 'w')
f.write('#/bin/bash\n')
f.write('cd ' + process.run_dir + '\n')
f.write('/sbin/m5 dumpresetstats\n')
f.write(' '.join(process.cmd) + '\n')
f.write('/sbin/m5 exit\n')
#os.chdir(process.run_dir)
#if process.input == None:
#	call(["valgrind", "--tool=exp-bbv", "--bb-out-file=test.bb", "--interval-size=1000000000"] + process.cmd)
#else:
#if process.input == None:
#	input_stream = sys.stdin
#else:
#	input_stream = open(process.input, 'r')
#print(process.cmd)
#call(process.cmd, stdin=input_stream)
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to