Tool for running benchmarking or other non-interactive tests
labrun [<option>] ... <program> [<argument>] ...
[ <LABEL> = ] <STRING>
<STRING>the following expressions are possible:
$<ENVVAR>will be replaced by shell variable <ENVVAR>,
Each of the first three statements may be followed by a
If the regular expression
only the match corresponding to the parentheses will be
Otherwise the first word after the regular expression
will be taken.
<PATTERN> may not contain spaces. Use
\s instead. Some documentation for regular
expressions is given in Section .
<STRING> begins with 0x, the number
following this will be converted from hexidecimal to decimal.
Processor Speed=@/proc/cpuinfo:cpu.MHz MHz
Processor Name=It's a @/proc/cpuinfo:model.name[\s:]+(.*)
@ FILE(some) command-line options are read from
FILE(see section ).
As mentioned in Section , the keyword NEX (for ``new experiment'') can be used in the command line to indicate that what follows is the input for a new experiment. For an example of this, see Section .
<NAME>-<TAG>.out will be produced in
directory (unless the
--one option is used). If there was some output
to standard error, a file
<NAME>-<TAG>.err will also result. For
each of the .out, .log and .err files created,
a link will be created in the log directory by the name of
labrun steiner -v closed 41 30Executes the program steiner with arguments -v closed 41 30, creating a log file and an output file in the default log directory lab_log.
labrun --cvs .:/home/hert/src --log ../lab --name example --tag closed_41_30 steiner -v closed 41 30
(The command should be all on one line, of course.)
Overrides the default CVS directory (adding
a directory in addition to the current one),
the default log directory (using
../lab instead of
./lab_log) and the default file name prefix (using
example-closed_41_30 instead of
labrun -e CC -c 'Compiler version=`$CC -v`:version\s+(\S*).*' timings
Records the value of the environment variable
CC (the compiler) and the version number of this compiler in
the log file. Notice that the version number is achieved by executing
$CC -v and then looking for the first
set of non-spaces following the word ``version'' in the resulting text.
Notice also the different quoting required. The quotes (') around the
argument to -c are required because of the space in the label
for the value and the stars
used in the regular expression. The quotes (`) around the command are
required to indicate that it is a command to be executed.
labrun -n timings labmex -x benchmark -m CC=gcc ~/src/timings
Uses labrun in conjunction with labmex. Without the -n argument to labrun, the name of the experiment would be labrun, which is probably not what you want. See Section for explanation of the labmex arguments.
labrun ssh turing labmex fun 123 NEX ssh oracle labmex fun 123
Runs two experiments. The first compiles the program fun on the machine turing and then executes it with arguments 123. The second experiment compiles the same program on the machine oracle and executes it using the same arguments. Without additional arguments all commands are executed in the user's home directory on these two machines.
labrun ssh turing 'cd benchmark; labmex fun 123'
Runs the experiment above on the machine turing in the directory benchmark.