Register a named resource profile
profile_register.RdStore a resource profile in the registry for reuse across jobs. Profiles can be retrieved by name and used as base profiles or referenced by string shorthand.
Examples
# \donttest{
# Register a standard compute profile
standard <- profile()
standard <- res_time(standard, "4:00:00")
standard <- mem(standard, "8G")
standard <- cpus(standard, 4)
profile_register("standard", standard, overwrite = TRUE)
# Register a GPU profile
gpu <- profile()
gpu <- res_time(gpu, "12:00:00")
gpu <- mem(gpu, "32G")
gpu <- cpus(gpu, 8)
gpu <- gpus(gpu, 1)
profile_register("gpu", gpu, overwrite = TRUE)
# Use registered profiles (SLURM only; skip if not available)
if (Sys.which("squeue") != "") {
my_function <- function(x) x + 1
job <- slurm_call(my_function, x = 1, resources = "gpu")
}
# }