This function deletes all temporary files associated with the specified Slurm job, including files created by slurm_apply or slurm_call, as well as outputs from the cluster. These files should be located in the _rslurm_[jobname] folder of the current working directory.

cleanup_files(slr_job, wait = TRUE)

Arguments

slr_job

A slurm_job object.

wait

Specify whether to block until slr_job completes.

Examples

if (FALSE) {
sjob <- slurm_apply(func, pars)
print_job_status(sjob) # Prints console/error output once job is completed.
func_result <- get_slurm_out(sjob, "table") # Loads output data into R.
cleanup_files(sjob)
}