Z Gu
Z Gu

Reputation: 163

Changing the executing (R) script sent to sbatch in slurm during run

If I change something within the R script 'foo.R' after submitting the following job that consists multiple tasks, would the pending tasks execute the updated 'foo.R'? I believe the running tasks will not be affected, but what about the tasks that are still queuing?

#!/bin/sh

#SBATCH --job-name="S"
#SBATCH --time=7-0:00
#SBATCH --mem=15g
#SBATCH --cpus-per-task=1
#SBATCH --array=1-500

Rscript foo.R

I saw a similar question regarding changing the bash script itself: Changing the bash script sent to sbatch in slurm during run a bad idea?. In my case, the change is made in the executing R file, and the bash script is unchanged.

Upvotes: 3

Views: 1076

Answers (1)

ciaron
ciaron

Reputation: 1159

foo.R will only be picked up when the job starts, so you can modify it before then.

Upvotes: 3

Related Questions