Skip to content

Commit c5f0d15

Browse files
authored
Merge pull request #359 from NYU-RTS/robjy-gpu-update
added GPU section and low GPU warning table
2 parents 246c88e + c86ad20 commit c5f0d15

1 file changed

Lines changed: 50 additions & 3 deletions

File tree

docs/hpc/05_submitting_jobs/01_slurm_submitting_jobs.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,50 @@
11
# Submitting Jobs on Torch
22

33
:::tip Beginner tutorial available
4-
If you are new to using HPC resources and would like to learn about the principles of using the `SLURM` scheduler for submitting batch jobs, please refer to [this section](../13_tutorial_intro_hpc/04_scheduler_fundamentals.mdx). This section focuses on the specifics of the Torch cluster and assumes familiarity with the tutorial.
4+
If you are new to using HPC resources and would like to learn about the principles of using the `SLURM` scheduler for submitting batch jobs, please refer to [this section](../13_tutorial_intro_hpc/04_scheduler_fundamentals.mdx). It focuses on the specifics of the Torch cluster and assumes familiarity with the tutorial.
55
:::
66

77
:::warning Active allocation in the HPC projects portal
8-
An active allocation in the HPC projects portal is needed to submit any jobs on Torch. For more information on how to get one, please refer to [this section](../../hpc/01_getting_started/03_Slurm_Accounts/02_hpc_project_management_portal.mdx). All job submissions must include the `--account` parameter. On Torch, you can list the SLURM accounts you have access to by running the command `my_slurm_accounts`.
8+
An active allocation in the HPC projects portal is needed to submit any jobs on Torch. For more information on how to get one, please refer to [this section](../../hpc/01_getting_started/03_Slurm_Accounts/02_hpc_project_management_portal.mdx). All job submissions must include the `--account` parameter. On Torch, you can list the SLURM accounts you have access to by running the command [`my_slurm_accounts`](https://services.rt.nyu.edu/docs/hpc/tools_and_software/utils/#my_slurm_accounts).
99
:::
1010

11+
## GPUs
12+
13+
To request GPUs on Torch you'll need to use the `--gres=gpu:number` flag in either your sbatch file or the command line, where you'll replace `number` with the number of GPUs you're requesting.
14+
15+
For example, in an sbatch file you'd do something like:
16+
```bash
17+
#!/bin/bash
18+
#SBATCH --job-name=gpu_test
19+
#SBATCH --output=gpu_test.out
20+
#SBATCH --gres=gpu:1
21+
#SBATCH --nodes=1
22+
#SBATCH --ntasks=1
23+
#SBATCH --cpus-per-task=1
24+
#SBATCH --mem=1M
25+
#SBATCH --time=00:10:00
26+
#SBATCH --account=torch_pr_XXX_XXXXX
27+
28+
python gpu_test.py
29+
```
30+
31+
and to start an interactive job with a GPU you would do something like:
32+
```bash
33+
srun --account=torch_pr_XXXX_XXXXX --gres=gpu:1 --cpus-per-task=1 --mem=8GB --time=1:00:00 --pty /bin/bash
34+
```
35+
36+
If you'd like a specific type of GPU you can specify that with the `--constraint='type'` flag. You'll need to replace `type` with the type of GPU or a `|` separated list of acceptable GPUs.
37+
Here are a couple of examples using `srun`, but you can also use the same syntax in an sbatch file:
38+
```bash
39+
srun --account=torch_pr_XXXX_XXXXX --gres=gpu:1 --constraint='h200' --cpus-per-task=1 --mem=8GB --time=1:00:00 --pty /bin/bash
40+
```
41+
or
42+
```bash
43+
srun --account=torch_pr_XXXX_XXXXX --gres=gpu:1 --constraint='h200|l40s' --cpus-per-task=1 --mem=8GB --time=1:00:00 --pty /bin/bash
44+
```
45+
46+
You can find the available types of GPUs at [Torch Spec Sheet](../10_spec_sheet.md)
47+
1148
## Partitions
1249

1350
`SLURM` partitions on Torch control stakeholder resource access. No physical nodes are tied to partitions — instead, equivalent compute resources are allocated via partition `QoS`([QualityOfService](https://slurm.schedmd.com/qos.html)).
@@ -31,7 +68,17 @@ Non-stakeholders to temporarily use stakeholder resources (a stakeholder group t
3168
As stated in the tutorial, be sure to only request the compute resources (e.g., GPUs, CPUs, memory) needed for the job. Requesting too many resources can prevent your job from being scheduled within an adequate time. The `SLURM` scheduler will automatically dispatch jobs to all accessible GPU partitions that match resource requests.
3269

3370
:::danger Low GPU Utilization Policy
34-
Jobs with low GPU utilization will be automatically canceled. The exact threshold is TBD, but enforcement will be very aggressive.
71+
Jobs with low GPU utilization will be automatically canceled:
72+
| Node Pattern | Cancellation Criteria | Warning Criteria |
73+
| :----------- | :-------------------: | :--------------: |
74+
| gl* | 50% | 70% |
75+
| gh* | 60% | 75% |
76+
| ga* | 50% | 70% |
77+
| gr* | 50% | 70% |
78+
| * (default) | 10% | 50% |
79+
80+
81+
Enforcement will be very aggressive.
3582
:::
3683

3784
## Preemptible jobs on Torch

0 commit comments

Comments
 (0)