Ejemplo n.º 1
0
def generate_process(process_id, benchmark):

    # you need to change these variables.
    binary_dir = '/home/kyuyeonpooh/SPEC2006/SPECCPU2006_binary/'
    data_dir = '/home/kyuyeonpooh/SPEC2006/SPECCPU2006_input/benchspec/CPU2006/'

    process = Process(pid=process_id)

    if benchmark == 'bzip2':
        process.executable = binary_dir + 'bzip2/bzip2'
        data = binary_dir + 'bzip2/input.program'
        process.cmd = [process.executable] + [data, '1']
        process.output = 'input.program.out'

    elif benchmark == 'mcf':
        process.executable = binary_dir + 'mcf/mcf'
        data = data_dir + '429.mcf/data/test/input/inp.in'
        process.cmd = [process.executable] + [data]
        process.output = 'inp.out'
    elif benchmark == 'soplex':
        process.executable = binary_dir + 'soplex/soplex'
        data = data_dir + '450.soplex/data/test/input/test.mps'
        process.cmd = [process.executable] + ['-m10000', data]
        process.output = 'test.out'

    elif benchmark == 'hmmer':
        process.executable = binary_dir + 'hmmer/hmmer'
        data = data_dir + '456.hmmer/data/test/input/bombesin.hmm'
        process.cmd = [process.executable] + [
            '--fixed', '0', '--mean', '325', '--num', '5000', '--sd', '200',
            '--seed', '0', data
        ]
        process.output = 'bombesin.out'
    elif benchmark == 'sjeng':
        process.executable = binary_dir + 'sjeng/sjeng'
        data = data_dir + '458.sjeng/data/test/input/test.txt'
        process.cmd = [process.executable] + [data]
        process.output = 'test.out'

    elif benchmark == 'libquantum':
        process.executable = binary_dir + 'libquantum/libquantum'
        process.cmd = [process.executable], '33', '5'
        process.output = 'test.out'

    elif benchmark == 'lbm':
        process.executable = binary_dir + 'lbm/lbm'
        data = data_dir + '470.lbm/data/test/input/100_100_130_cf_a.of'
        process.cmd = [process.executable
                       ] + ['20', 'reference.dat', '0', '1', data]
        process.output = 'lbm.out'
    else:
        fatal('Wrong workload name')
    return process
Ejemplo n.º 2
0
def get_processes(options):
    """Interprets provided options and returns a list of processes"""

    multiprocesses = []
    inputs = []
    outputs = []
    errouts = []
    pargs = []

    workloads = options.cmd.split(';')
    if options.input != "":
        inputs = options.input.split(';')
    if options.output != "":
        outputs = options.output.split(';')
    if options.errout != "":
        errouts = options.errout.split(';')
    if options.options != "":
        pargs = options.options.split(';')

    idx = 0
    for wrkld in workloads:
        process = Process(pid=100 + idx)
        process.executable = wrkld
        process.cwd = os.getcwd()

        if options.env:
            with open(options.env, 'r') as f:
                process.env = [line.rstrip() for line in f]

        if len(pargs) > idx:
            process.cmd = [wrkld] + pargs[idx].split()
        else:
            process.cmd = [wrkld]

        if len(inputs) > idx:
            process.input = inputs[idx]
        if len(outputs) > idx:
            process.output = outputs[idx]
        if len(errouts) > idx:
            process.errout = errouts[idx]

        multiprocesses.append(process)
        idx += 1

    if options.smt:
        assert (options.cpu_type == "DerivO3CPU")
        return multiprocesses, idx
    else:
        return multiprocesses, 1
Ejemplo n.º 3
0
import m5
from m5.objects import Process

m5.util.addToPath('../common')

binary_dir = '/home/cc/gem5_benchmark/cpu_2006/benchspec/CPU2006/'
data_dir = '/home/cc/gem5_benchmark/cpu_2006/benchspec/CPU2006/'

#====================
#400.perlbench
perlbench = Process()
perlbench.executable = binary_dir + '400.perlbench/exe/perlbench_base.amd64-m64-gcc43-nn'
#data=data_dir+'400.perlbench/data/ref/input/checkspam.pl'
#input='-I./lib'
perlbench.cmd = [perlbench.executable] + ['-I./lib', 'attrs.pl']
perlbench.output = 'attrs.out'

#401.bzip2
bzip2 = Process()
bzip2.executable = binary_dir + '401.bzip2/exe/bzip2_base.amd64-m64-gcc43-nn'
data = data_dir + '401.bzip2/data/ref/input/liberty.jpg'
bzip2.cmd = [bzip2.executable] + [data, '30']
bzip2.output = 'liberty.out'

#====================
#403.gcc
gcc = Process()
gcc.executable = binary_dir + '403.gcc/exe/gcc_base.amd64-m64-gcc43-nn'
data = data_dir + '403.gcc/data/ref/input/166.i'
output = '166.s'
gcc.cmd = [gcc.executable] + [data] + ['-o', output]