Homework 4 – Working with Slurm
Due Date
There’s no due date for this assignment. Use it to practice with Slurm.
Submitting Jobs to Slurm
Question 1
To practice your skills with Slurm, submit the following R code using (a) an R script with sbatch and (b) using the slurmR::sourceSlurm function:
cat(do.call(sprintf, c(
list("Hello from\njobid: %s\ndir: %s, and\nhost: %s\n"),
as.list(Sys.getenv(
c("SLURM_JOB_ID", "SLURM_SUBMIT_DIR", "SLURM_JOB_NODELIST")
))
)))We recommend you use the notchpeak-shared-short account+partition. Remember that you have to be explicit about the requested resources.
Question 2
Repeat the previous exercise, but this time request two nodes.