You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hpc/05_submitting_jobs/01_slurm_submitting_jobs.md
+50-3Lines changed: 50 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,50 @@
1
1
# Submitting Jobs on Torch
2
2
3
3
:::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.
5
5
:::
6
6
7
7
:::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).
9
9
:::
10
10
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:
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:
You can find the available types of GPUs at [Torch Spec Sheet](../10_spec_sheet.md)
47
+
11
48
## Partitions
12
49
13
50
`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
31
68
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.
32
69
33
70
:::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:
0 commit comments