Checks the status of a TMB model running as a SLURM job by examining the job queue and output files. This function helps monitor TMB jobs submitted to a SLURM cluster.

check_tmb_slurm_status(
  slurm_script = "submit_tmb.sh",
  r_batch_out = "run_tmb.r.Rout"
)

Arguments

slurm_script

Character. Path to the SLURM submission script. Default is "submit_tmb.sh".

r_batch_out

Character. Path to the R batch output file. Default is "run_tmb.r.Rout".

Value

Character. Returns the job status as one of: - Full SLURM queue details if job is running/queued - "COMPLETED" if job finished successfully - "FAILED" if job ended with error - "UNKNOWN" if status cannot be determined

Details

The function works by: 1. Extracting job name from SLURM script 2. Checking if job is in SLURM queue 3. If not in queue, examining R output log for completion/error