drake (version 7.3.0)

drake_hpc_template_file: Write a template file for deploying work to a cluster / job scheduler.

Description

See the example files from drake_examples() and drake_example() for example usage.

Usage

drake_hpc_template_file(file = drake::drake_hpc_template_files(),
  to = getwd(), overwrite = FALSE)

Arguments

file

Name of the template file, including the "tmpl" extension.

to

Character vector, where to write the file.

overwrite

Logical, whether to overwrite an existing file of the same name.

Value

NULL is returned, but a batchtools template file is written.

See Also

drake_hpc_template_files(), drake_examples(), drake_example(), shell_file()

Examples

Run this code
# NOT RUN {
isolate_example("Quarantine side effects.", {
load_mtcars_example() # Get the code with drake_example("mtcars").
# List the available template files.
drake_hpc_template_files()
# Write a SLURM template file from the SLURM example.
drake_hpc_template_file("slurm_batchtools.tmpl") # Writes slurm_batchtools.tmpl.
# library(future.batchtools) # nolint
# future::plan(batchtools_slurm, template = "slurm_batchtools.tmpl") # nolint
# make(my_plan, parallelism = "future", jobs = 2) # nolint
})
# }

Run the code above in your browser using DataCamp Workspace