Menu

Batch Scripts

Robert Forder

Scripts exist to execute large batches of simulations in serial. They are located in the batch/ directory under the main ESTReMo directory. There are two scripts, create-batch (which is responsible for creating sets of configuration files) and run-batch (which will execute simulations serially using those configuration files).

create-batch

create-batch is used to generate large sets of configuration files. Use this script in the following way:

./create-batch "name" "m" "k" "alpha" "ncrcounts" "ncrsizes" "population" "nodes" "bgsize"
Parameter Purpose Range
name A name for the batch Anything, but don't use spaces, slashes, or anything else that can't be used in a directory name. The script will create a directory with this name under the batch directory.
m The number of mutations per organism, per generation. Any positive integer (between 1 and 10 is reasonably).
k Selection pressure (larger values mean more pressure). A positive integer greater than 2.
alpha Probability that a mutation will occur on a non-coding region. Between 0.0 and 1.0
ncrcounts The number of non-coding regions per organism. Any positive integer (16-32 is realistic).
ncrsizes The width of each non-coding region. Any positive integer (8-20 is realistic)
population The number of organisms in the population. Any positive integer (must be greater than k). 500 is a good standard.
nodes The number of hidden nodes in each neural network. Any positive integer. Usually 1,2,4 or 8.
bgsize The size of the genome of each organism. Any positive integer. This will heavily influence the speed of the simulation (usually 1k (fast), 10k (medium), 100k (slow), or 1 million (days) are good).

Example 1

Create a batch called Test for m=1, k=2, alpha=0.5, ncrcounts=16, ncrsizes=8, population=500, nodes=1, bgsize=10000 and m=2, k=2, alpha=0.5, ncrcounts=16, ncrsizes=8, population=500, nodes=1, bgsize=10000.

./create-batch "Test" "1 2" "2" "0.5" "16" "8" "500" "1" "10000"

Example 2

Create a batch called Test2 for alpha=0.5, ncrcounts=16, ncrsizes=8, population=500, nodes=1, bgsize=10000 and all combations of m=1,2,3,4 k=2,3,4,5.

./create-batch "Test2" "1 2 3 4" "2 3 4 5" "0.5" "16" "8" "500" "1" "10000"

The only parameter which you cannot specify a range on is the bgsize (this must be a single value).

run-batch

Once a set of configurations is generated you can execute simulations serially for each configuration using run-batch. Alternately, create-batch will create a slurm script which can be executed (do sbatch run.slurm in the directory which has the name of the batch).

./run-batch "name" "duplicates"
Parameter Purpose
name The name which you gave to the batch when you ran create-batch
duplicates Number of times to run the simulation per configuration. (5 is usually good).

Example 1

Run the "Test" batch created above in triplicate:

./run-batch "Test" "3"

Related

Home: Home
Wiki: Home