The program labrun provides a means to run experiments and automatically log the context of the experiments.
|
The program <executable> should run non-interactively. labrun will first check whether the provided directories (the default is just the current directory) is under CVS and up to date and then, if so, executes the program <executable> with the given arguments <arguments> (if any). <options> might be used to control the behaviour of labrun. Type labrun --help to get more help.
In general, labrun generates at least two files: a .out file that
contains the output of the experiment and a .log file that contains
certain environment information. Additionally, if the program produces some
error messages (written to the standard error stream), these will be recorded
in a .err file. All file names are of the form
In the following tutorials, we illustrate how various options of labrun might be used in conjunction with labmex.
--log=./res --tag=5000-10 --batch --one
--comment=Memory=`free` --comment=Compiler=`gcc -v` --env=CXXFLAGS
Several experiments might be started by calling labrun several times.
However, it is more convenient to put all calls into one file and to separate
different experiments via the keyword NEX.
# experiment (1a) --comment=Compiler=`gcc -v` --tag=5000-10-no-O --verbose --batch labmex -c before ./sort-demo 5000 10 NEX # experiment (1b) --comment=Compiler=`gcc -v` --tag=5000-10-O3 --verbose --batch labmex -c before -m LFLAGS=-O3 ./sort-demo 5000 10 NEX # experiment (2a) --comment=Compiler=`gcc -v` --tag=10000-10-no-O --verbose --batch labmex -c before ./sort-demo 10000 10 NEX # experiment (2b) --comment=Compiler=`gcc -v` --tag=10000-10-O3 --verbose --batch labmex -c before -m LFLAGS=-O3 ./sort-demo 10000 10
Each of the above four experiments uses the three flags
--comment=Compiler=`cc-v', --verbose, and --batch.
If all your experiments are meant to be run with a common set of command-line
options, a global resource file can be created that contains these common
options. The program labsetup is available to help you create this resource
file. The options recorded in this file will be read will labrun is
executed and added to the command-line arguments. In the case of conflicts,
command-line arguments take precendence over those recorded in a resource
file. For options that may appear more than once on the command line, the
union of the command-line and resource file options is used.
[...] labsetup: Settings for labrun Execute labrun in verbose mode? [n] y [...] Run in the background? [n] y [...] Additional comments to be recorded in log file Enter new values one per line. Use a '+' at the beginning of the first line to add to the current list; otherwise any new values given will replace the current ones. An empty line ends the input. [None] Compiler='gcc -v' [...]
# experiment (1a) --tag=5000-10-no-O --log=lab_log2 labmex -c before ./sort-demo 5000 10 NEX # experiment (1b) --tag=5000-10-O3 --log=lab_log2 labmex -c before -m LFLAGS=-O3 ./sort-demo 5000 10 NEX # experiment (2a) --tag=10000-10-no-O --log=lab_log2 labmex -c before ./sort-demo 10000 10 NEX # experiment (2b) --tag=10000-10-O3 --log=lab_log2 labmex -c before -m LFLAGS=-O3 ./sort-demo 10000 10