Skip to contents

This function submits a NONMEM model file to a SLURM cluster for execution, allowing for parallel processing and job queue management. The function handles job configuration, resource allocation, and job submission through pharos

Usage

submit_model_to_slurm(
  model,
  overwrite = FALSE,
  dry_run = FALSE,
  run_in_output_dir = FALSE,
  ncpu = 1,
  partition = NULL,
  clean_level = 1,
  parafile = NULL,
  template = NULL,
  account = NULL
)

Arguments

model

A hyperion_nonmem_model object, path to the NONMEM model file, or character vector of model paths/patterns (required)

overwrite

Whether to overwrite existing output files (default: FALSE)

dry_run

Whether to perform a dry run without actually submitting the job (default: FALSE)

run_in_output_dir

Whether to run the job in the output directory (default: FALSE)

ncpu

Number of CPUs to allocate for the job (default: 1)

partition

SLURM partition to submit the job to (default: NULL, uses cluster default)

clean_level

Level of cleanup to perform after job completion (default: 1)

parafile

Path to parameter file for parallel runs (default: NULL)

template

Path to SLURM template file for job submission (default: NULL)

account

SLURM account to charge the job to (default: NULL)

Value

Returns invisibly after printing job submission results. Prints model path and corresponding SLURM job ID for each submitted job.

Examples

if (FALSE) { # \dontrun{
# Submit a basic NONMEM model
submit_model_to_slurm("model.mod")

# Submit using a model object
model <- read_model("model.mod")
submit_model_to_slurm(model)

# Dry run to test submission without actually running
submit_model_to_slurm("model.mod", dry_run = TRUE)

# Submit to specific partition with account
submit_model_to_slurm("model.mod", partition = "gpu", account = "myproject")
} # }