28 (
"mult",
"-mult_rdt",
"mult.rdt",
"MultAdd: matrix->MultAdd(...). Multiply matrix by another matrix.")
31 def short_description() :
return "skyline tests (MultAdd) -- cube1.txt -- polinomial order 2" 33 def long_description():
34 desc =
"Executes the skyline tool collecting statistics for the following steps:" 35 for rdtarg
in rdtfiles_l :
36 desc = desc +
'\n\t' + rdtarg[0] +
' (' + rdtarg[1] +
' ' + rdtarg [2] +
') : ' + rdtarg[3]
42 import shlex, subprocess
49 builddir=
"@PERFTEST_BASE_DIR@" 50 datadir=
"@PERFTEST_SMALL_DATA_DIR@" 53 sys.stderr.write(
'ERROR (test.py): '+message+
'\n')
59 if not os.path.isdir(builddir) :
60 error(builddir+
' is an invalid build directory.', 5)
62 rundir = os.path.join(builddir,
'scripts',
'skyline_tst07')
63 if not os.path.isdir(rundir) :
64 error(rundir+
' is an invalid run directory.', 1)
65 if not os.path.isdir(builddir) :
66 error(builddir+
' is an invalid build directory.', 1)
68 executable=os.path.join(builddir,
"progs",
"skyline",
"skyline-perf")
69 if not os.path.isfile(executable) :
70 error(executable+
' is an invalid executable file name.', 1)
73 inputfn = os.path.join(datadir,
"substruct",
"inputs",
"cube1.txt")
74 if not os.path.isfile(inputfn) :
75 error(inputfn+
' is an invalid input file name.', 1)
77 arguments =
' -if ' + inputfn
78 arguments = arguments +
' -porder 2' 79 for rdtarg
in rdtfiles_l :
80 arguments = arguments +
' ' + rdtarg[1] +
' ' + rdtarg[2]
82 return rundir, executable+arguments
86 limits = {
"cpu" : (resource.RLIMIT_CPU, 1000,
"Max CPU user time in seconds (not wall clock time)"),
97 print "Setting resource limit in child" 98 for k, v
in limits.iteritems() :
99 resource.setrlimit(v[0], (v[1],v[1]))
105 for f
in rdtfiles_l :
107 rdt_fn = os.path.join(rundir,f[2])
109 results[rdt_id] = (rdt_fn, rdt_dsc)
117 args = shlex.split(cmd)
120 for i
in range(ntimes) :
121 p = subprocess.Popen(args, preexec_fn=setlimits, stdout=sout, stderr=serr, cwd=rundir)
123 if (p.returncode != 0) :
124 return p.returncode, {}
def error(message, status)
def sumarize_rdt_files(rundir)