Skip to content
Snippets Groups Projects
Commit 834ed8c4 authored by Branislav Jansik's avatar Branislav Jansik
Browse files

Edit job-arrays.md

parent a6f95428
No related branches found
No related tags found
No related merge requests found
Pipeline #43824 failed
...@@ -60,7 +60,7 @@ Be aware, that if the myprog.x **is not multithreaded or multi-process (MPI)**, ...@@ -60,7 +60,7 @@ Be aware, that if the myprog.x **is not multithreaded or multi-process (MPI)**,
## Submiting Job Array ## Submiting Job Array
To submit the job array, use the `sbatch --array` command. The 900 jobs of the [example above][3] may be submitted like this: To submit the job array, use the `sbatch --array` command. The 900 jobs of the [example above][2] may be submitted like this:
```console ```console
$ sbatch -J JOBNAME --array 1-900 ./jobscript $ sbatch -J JOBNAME --array 1-900 ./jobscript
...@@ -75,60 +75,26 @@ Check status of the job array using the `squeue --me` command, alternatively `sq ...@@ -75,60 +75,26 @@ Check status of the job array using the `squeue --me` command, alternatively `sq
```console ```console
$ squeue --me --long $ squeue --me --long
JOBID PARTITION NAME USER STATE TIME TIME_LIMI NODES NODELIST(REASON) JOBID PARTITION NAME USER STATE TIME TIME_LIMI NODES NODELIST(REASON)
2499924_[5-101] qcpu myarray jansik PENDING 0:00 1:00 1 (Resources) 2499924_[1-900] qcpu myarray user PENDING 0:00 02:00:00 1 (Resources)
``` ```
Check the status of the tasks using the `squeue` command.
When the status is B, it means that some subjobs are already running.
Check the status of the first 100 subjobs using the `qstat` command.
```console ```console
$ qstat -a 12345[1-100].dm2 $ squeue -j 2499924
JOBID PARTITION NAME USER STATE TIME TIME_LIMI NODES NODELIST(REASON)
dm2: 2499924_1 qcpu myarray user PENDING 0:00 02:00:00 1 (Resources)
Req'd Req'd Elap
Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
--------------- -------- -- |---|---| ------ --- --- ------ ----- - -----
12345[1].dm2 user2 qprod xx 13516 1 16 -- 00:50 R 00:02
12345[2].dm2 user2 qprod xx 13516 1 16 -- 00:50 R 00:02
12345[3].dm2 user2 qprod xx 13516 1 16 -- 00:50 R 00:01
12345[4].dm2 user2 qprod xx 13516 1 16 -- 00:50 Q --
. . . . . . . . . . . . . . . . . . . . . .
, . . . . . . . . . . . . . . . . . . . . .
12345[100].dm2 user2 qprod xx 13516 1 16 -- 00:50 Q -- 2499924_900 qcpu myarray user PENDING 0:00 02:00:00 1 (Resources)
```
Delete the entire job array. Running subjobs will be killed, queueing subjobs will be deleted.
```console
$ qdel 12345[].dm2
```
Deleting large job arrays may take a while.
Display status information for all user's jobs, job arrays, and subjobs.
```console
$ qstat -u $USER -t
``` ```
Display status information for all user's subjobs. Delete the entire job array. Running tasks will be killed, queueing tasks will be deleted.
```console ```console
$ qstat -u $USER -tJ $ scancel 2499924
``` ```
For more information on job arrays, see the [PBSPro Users guide][1]. For more information on job arrays, see the [SLURM guide][1].
## Examples
Download the examples in [capacity.zip][2], illustrating the above listed ways to run a huge number of jobs. We recommend trying out the examples before using this for running production jobs.
Unzip the archive in an empty directory on cluster and follow the instructions in the README file-
```console
$ unzip capacity.zip
$ cat README
```
[1]: ../pbspro.md [1]: https://slurm.schedmd.com/job_array.html
[2]: capacity.zip [2]: #shared-jobscript
[3]: #shared-jobscript
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment