View source: R/netsim_scenarios.R
step_tmpl_netsim_scenarios | R Documentation |
This step template is similar to netsim_scenarios
but for the HPC. It uses
slurmworkflow::step_tmpl_map
internally and should be used as any
slurmworkflow
step. For details, see netsim_scenarios
documentation.
step_tmpl_netsim_scenarios(
path_to_x,
param,
init,
control,
scenarios_list,
n_rep,
n_cores,
output_dir,
libraries = NULL,
save_pattern = "simple",
setup_lines = NULL,
max_array_size = NULL
)
path_to_x |
Path to a Fitted network model object saved with |
param |
Model parameters, as an object of class |
init |
Initial conditions, as an object of class |
control |
Control settings, as an object of class
|
scenarios_list |
A list of scenarios to be run. Produced by the
|
n_rep |
The number of replication to be run for each scenario. |
n_cores |
The number of CPUs on which the simulations will be run. |
output_dir |
The folder where the simulation files are to be stored. |
libraries |
A character vector containing the name of the libraries required for the model to run. (e.g. EpiModelHIV or EpiModelCOVID) |
save_pattern |
A character vector of what should be kept in the final
|
setup_lines |
(optional) a vector of bash lines to be run first. This can be used to load the required modules (like R, python, etc). |
max_array_size |
maximum number of array jobs to be submitted at the same time. Should be strictly less than the maximum number of jobs you are allowed to submit to slurm on your HPC. |
a template function to be used by add_workflow_step
This function takes care of editing .checkpoint.dir
to create unique sub
directories for each scenario. The EpiModel::control.net
way of setting up
checkpoints can be used transparently.
Step Templates are helper functions to be used within add_workflow_step
.
Some basic ones are provided by the slurmworkflow
package. They instruct
the workflow to run either a bash script, a set of bash lines given as a
character vector or an R script.
Additional Step Templates can be created to simplify specific tasks. The
easiest way to do so is as wrappers around existing templates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.