This is an example framework for splitting up large simulations in parallel across a HPC cluster
git clone https://github.com/MRCIEU/example-simulation-framework.git-
dgm.r- This has the functions to take a set of parameters and generate the data -
test.r- This reads in the functions indgm.rand just checks that it's doing what it should -
params.r- this is gonna have all the parameters that are to be passed todgm.rfor the main simulation, writing the parameters to a csv. It also hasbatchcolumn, which determins how to split up all the simulations for each run. -
run.r- takes an argument of which rows inparams.rto run, and then runs just those simulations. Saves the results for that set of simulations -
run-parallel.r- alternative torun.r, but splits up into parallel across multiple cores within a batch -
run.sh- this is the script that will be submitted to the HPC cluster. It will runrun.rfor each batch, splitting up the whole set of parameters across the cluster
sbatch run.sh