STILT Execution

Now that you’ve installed STILT and edited model controls in run_stilt.r, we’re ready to run the model. The simplest way to do this is to execute run_stilt.r with Rscript.

Rscript r/run_stilt.r

Depending on which of the three parallelization settings you used, you will see one of the following.

Serialized simulations

Rscript r/run_stilt.r
Initializing STILT
Number of receptors: 4
Number of parallel threads: 1
Estimated footprint grid RAM allocation: 314 MB
Parallelization disabled. Executing simulations sequentially...

Running simulation ID: 2015061822_-111.980323_40.782561_5
...

The model will execute the simulations one at a time in order and print the current simulation ID to the console. This is the default and occurs when slurm = FALSE and n_cores = 1.

Single-node parallel

Rscript r/run_stilt.r
Initializing STILT
Number of receptors: 4
Number of parallel threads: 2
Estimated footprint grid RAM allocation: 314 MB
Single node parallelization. Dispatching worker processes...

Running simulation ID: 2015061822_-111.980323_40.782561_5
Running simulation ID: 2015061823_-111.980323_40.782561_5
...

The model will dispatch batches of simulations to forked worker processes. This occurs when slurm = FALSE, n_nodes = 1, and n_cores > 1.

SLURM multi-node parallel

Rscript r/run_stilt.r
Initializing STILT
Number of receptors: 4
Number of parallel threads: 4
Estimated footprint grid RAM allocation: 314 MB
Multi node parallelization using slurm. Dispatching jobs...

The model will dispatch batches of simulations across multiple SLURM nodes and execute the forked worker processes. This occurs when slurm = TRUE. SLURM jobs can be monitored and controlled using squeue and sacct as well as other utilities and GUI tools.

Background processing

SLURM execution will run the job in the background without tying up the active shell. You can check the progress of your job from the command line with the sacct command.

Single node simulations should be executed in the background to keep the process safe from disconnects and not tie up the active shell. While methods vary between systems, an easy way to ensure disconnects do not disrupt the simulations and allow for monitoring progress is to use the screen UNIX tool.