next up previous contents index
Next: Analyzing the Output Up: A Tool Set for Previous: Running an Experiment   Contents   Index


Rerunning an Experiment

Because one of our goals is to enable experiments to be rerun from the data recorded, we provide a tool, labrerun, that does precisely that. In particular, given a log file created by our experimentation tool (or by some other means following the same syntax; see Section [*]), this tool will run the experiment described in this log file using a context as close to the one described in the original log file as possible. For example, one may rerun an experiment with a command as simple as:

   labrerun ../lab/example-closed_41_30.log
A string of command-line arguments for labrun are constructed from the information recorded in the given log file together with the arguments given to labrerun. If environment variables were recorded in the input log file, the same values for these variables will be used in the call to labrun. If this is not desirable (e.g., because a certain path has changed or software available previously has been upgraded), it is possible, through the --ignore option, to tell labrerun to ignore the value of an environment variable recorded in the log file and simply record the current value of this variable for the rerun of the experiment. Global and local resource files, if they exist, are ignored by labrun when it is called from labrerun since all information relevant to an experiment is recorded in its log file and need not be supplemented by data in a resource file.

Once the list of command-line arguments has been constructed and all environment variables are set, the tool will attempt to change to the directory that was current when the log file was created and execute the labrun command from there. If that directory no longer exists, the tool will issue a warning and try to proceed in the current directory.

The CVS date tag recorded in the given log file is used to tell labrun to check out the version of the code that was current when the original experiment was run. This affects the running of the experiment, of course, only if the experiment involves recompiling the program from its sources. After the rerun of the experiment is finished, the current version of all relevant files under CVS will be restored. If you wish to keep the old files after the rerun, the --keep option for labrerun can be used. There is also a --nocvs option for labrerun, which allows you to rerun an experiment with the same settings as an old experiment but using the current version of the source code (e.g., to see the effect of certain code changes).

The name of the log file from which the environmental information was taken is noted in the new log file created for the new run. Environmental differences, if any, can then be discovered using, for example, diff with the current log file and the old log file.

The default location of the files created from the experiment is the location of the log file given on the command line, and the files are named in the same way as for labrun. A subset of the options available for labrun are also available for labrerun. They allow one to specify a directory other than the default in which to store the output files, a different directory in which to run the program, a different name to use for the experiment when creating the log file, additional environmental information to be recorded in the new experiment's log file, that all output should be stored in the log file, and that the experiment should be run in the background and notify the user upon completion. There is also an option that allows one simply to print the labrun command generated from a log file without executing it and an option to edit the command constructed from the log file before execution.


next up previous contents index
Next: Analyzing the Output Up: A Tool Set for Previous: Running an Experiment   Contents   Index
Tobias Polzin 2003-05-30