The tool labmex (for ``Make and EXecute'') supports the first
kind of experiment. As its name implies, this tool can be used to compile
and execute a given program. By default, the command make is used,
together with any user-supplied options for make, to build a certain
target (or targets). If compilation succeeds, then the specified executable
is run with any given command-line arguments. If compilation fails, a
compilation log is generated with the name
<executable>-<date>-<time>.clog
. By default, this file will reside
in the current directory, or, if called by labrun it will reside in
the directory in which labrun's log files are stored.
For example, the command
labmex fun 123would translate into the commands
make fun fun 123If the make fun command fails, a file with a name like
fun-2002-05-09-205405.clog
would be created containing the output from the make command, and
fun 123 will obviously not be executed. In addition, a link to the
compile log file with the name current.clog
will be created in directory
containing the log file, thus making it easier to access the latest compile
log.
Other command-line options for this tool allow one to specify a different directory for the compilation log file, target or targets other than the executable for the compilation command, a command other than make for building the targets and that a make clean should be done before, after, or before and after the target is built.
The labmex tool can be used outside the context of computational experimentation as a general shortcut tool for compiling and executing any program.