`glurmo` by example

Version 0.1

A brief guide to using the `glurmo` command line utility

Setting up

Introducing parameter vectors

If you open varied-lm/.glurmo/settings.json, you’ll notice that it’s more or less the same as the last settings file, with one exception:

...
"beta_1" : "@[1, 2, 3]",
...

This parameter uses a parameter vector. A parameter vector has the syntax @[param 1, param 2, ... param n], and serve a special purpose in glurmo. Each parameter in the vector represents a distinct simulation setting, and a separate simulation directory will be made for it. So rather than representing five simulations (note that n_sims is still set to 5), this single file now encodes 15 simulations: 5 where beta_1 is equal to 1, five where it’s equal to two, and five where it’s equal to three.

Setting up the simulation study

Despite this change, setting up the simulation is the same as before. Just make sure you’re in glurmo-examples/varied-lm and run:

$ glurmo -s .

You should see three messages, along the lines of:

Creating  /path/to/dir/glurmo-examples/varied-lm/beta_1_1 ...
Creating  /path/to/dir/glurmo-examples/varied-lm/beta_1_2 ...
Creating  /path/to/dir/glurmo-examples/varied-lm/beta_1_3 ...

Now if you look at the contents of the varied-lm directory, you should see three new subdirectories: beta_1_1, beta_1_2, and beta_1_3. Each of these corresponds to one of the settings in the parameter vectors for beta_1; they are named by taking the parameter being varied and tacking on an underscore along with the parameter value.

Examining subdirectories

Let’s take a look at beta_1_1. If you examine the contents using ls -a to show hidden files, you should see six subdirectories: .glurmo, results, scripts, slurm, slurm_errors, slurm_out. In other words, this subdirectory just has a standard glurmo directory setup, complete with a .glurmo directory! If you examine the settings file in that .glurmo directory, you’ll notice that it’s identical to the original (as are the slurm and script templates), but the parameter vector has been replaced with the value “1”. the beta_1_2 and beta_1_3 directories are set up analogously.

Last updated on 7 Sep 2024
Published on 7 Sep 2024
 Edit on GitHub