Skip to content

Commit

Permalink
Adding homeworks
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Apr 21, 2023
1 parent 295b4df commit 06f1eaf
Show file tree
Hide file tree
Showing 6 changed files with 6,719 additions and 76 deletions.
3,285 changes: 3,285 additions & 0 deletions docs/hw-04-slurmr.html

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions docs/hw-04-slurmr.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "Homework 4 -- Working with Slurm"
format:
html:
embed-resources: true
---

# 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:

```r
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.
Loading

0 comments on commit 06f1eaf

Please sign in to comment.