Skip to content

Commit 06f1eaf

Browse files
committed
Adding homeworks
1 parent 295b4df commit 06f1eaf

File tree

6 files changed

+6719
-76
lines changed

6 files changed

+6719
-76
lines changed

docs/hw-04-slurmr.html

Lines changed: 3285 additions & 0 deletions
Large diffs are not rendered by default.

docs/hw-04-slurmr.qmd

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: "Homework 4 -- Working with Slurm"
3+
format:
4+
html:
5+
embed-resources: true
6+
---
7+
8+
# Due Date
9+
10+
There's no due date for this assignment. Use it to practice with Slurm.
11+
12+
# Submitting Jobs to Slurm
13+
14+
## Question 1
15+
16+
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:
17+
18+
```r
19+
cat(do.call(sprintf, c(
20+
list("Hello from\njobid: %s\ndir: %s, and\nhost: %s\n"),
21+
as.list(Sys.getenv(
22+
c("SLURM_JOB_ID", "SLURM_SUBMIT_DIR", "SLURM_JOB_NODELIST")
23+
))
24+
)))
25+
```
26+
27+
We recommend you use the `notchpeak-shared-short` account+partition. Remember that you have to be explicit about the requested resources.
28+
29+
## Question 2
30+
31+
Repeat the previous exercise, but this time request two nodes.

0 commit comments

Comments
 (0)