The menu file and pymule batch
To avoid having to run dozens of jobs manually, McMule uses menu files.
These files list all McMule jobs that need to be executed which is done by pymule.
Currently pymule supports two executors: shell for running on a single machine and slurm for running on a SLURM cluster.
To run a menu file, one either runs
pymule batch shell -np <number of cores> menu-m2enng.menu # using shell executor
pymule batch slurm menu-m2enng.menu # using slurm executor as part of a SLURM script
Menu file syntax
Menu files use a DSL to minimise effort.
Statements are separated by line breaks similar to python or bash.
Blocks are indented, again similar to python.
Variables are indicated with dollar signs, eg. $x
conf </path/to/config.toml>loads the variables of a config file to use in the following runs. config file can be (partially) overridden with a second
confcallimage <image name>loads the docker image to run in
mode <mode>sets the running mode of McMule. Currently only
vegasis supporteduser <path/to/user.so>sets the measurement function to be executed
run <seed> <xic> <piece> [optional arguments..]executes
mcmulewith the currently active variables for the specified which_piece.let <var> = <val>sets the variable
varto the valuevalin all following commands. Note thatvardoes not contain a dollar sign herefor <var> in <a> <b> <c>...executes the body of this block with
$var = a,$var = b,$var = c.if <$var> <op> <value>executes the body of this block only if the expression evaluates to true. valid operators are
==,<=,<,>,>=, and!=.
An example can be found in Listing
let a = 3
conf ../manual/example2/m2enng.toml
mode vegas
run $a 0.3 m2enng0 0
for b in 0.1 0.2 0.3 0.4
run $a $b m2enngR 0
if $b == 0.3
run $a $b m2enngR 1
Configuration file
The config file is written using TOML and can be used to set arbitrary variables.
However, most commonly used to set statistics and the name of the mcmule executable.