% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/submit_job_slurm.R
\name{abba_slurm_submit_job}
\alias{abba_slurm_submit_job}
\title{Submit R program as a SLURM job}
\usage{
abba_slurm_submit_job(
  program_path,
  log_path,
  r_version = NULL,
  user_tag = NULL,
  cpu_cores = getOption("abba.slurm.cpu.cores"),
  memory = getOption("abba.slurm.memory"),
  username = NULL,
  working_dir = NULL,
  job_timeout = 3600,
  ...
)
}
\arguments{
\item{program_path}{Full path to the R program file. Must be accessible from the SLURM node}

\item{log_path}{Parent folder for the program's log file. Required; must
be supplied explicitly so that logs are never written to an unexpected
location in the user's filespace.}

\item{r_version}{Version of R that will be used to run the program. Can be specified as a full path to Rscript executable, or as a label of R version that is displayed in the Workbench GUI.}

\item{user_tag}{custom string that will be added to the job name.}

\item{cpu_cores}{Amount of CPU cores that will be requested for the job.}

\item{memory}{Amount of RAM in megabytes that will be requested for the job.}

\item{username}{user whose permission level is used to execute the script. Defaults to user submitting the job.}

\item{working_dir}{working directory for the SLURM job. Defaults to parent directory of \code{program_path}.}

\item{job_timeout}{time limit for a job. Must be specified in a format of "days-hours:minutes:seconds" If exceeded, job will be cancelled.}

\item{...}{additional arguments (currently unused)}
}
\value{
job ID
}
\description{
Submit R program as a SLURM job
}
\examples{
\dontrun{
job_id <- abba_slurm_submit_job("/home/user/tfl/t1_dm.sas",
                                log_path = "/home/user/tfl/logs")
 }
}
