Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
docs.it4i.cz
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SCS
docs.it4i.cz
Commits
835de294
Commit
835de294
authored
1 year ago
by
Roman Sliva
Browse files
Options
Downloads
Patches
Plain Diff
Update slurm-job-submission-and-execution.md
parent
de193f26
No related branches found
No related tags found
No related merge requests found
Pipeline
#33225
passed with warnings
1 year ago
Stage: test
Stage: build
Stage: deploy
Stage: after_test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs.it4i/general/slurm-job-submission-and-execution.md
+51
-6
51 additions, 6 deletions
docs.it4i/general/slurm-job-submission-and-execution.md
with
51 additions
and
6 deletions
docs.it4i/general/slurm-job-submission-and-execution.md
+
51
−
6
View file @
835de294
...
@@ -40,13 +40,19 @@ $ squeue --me
...
@@ -40,13 +40,19 @@ $ squeue --me
Show job details for specific job
Show job details for specific job
```
console
```
console
$
scontrol
-d
show job JOBID
$
scontrol show job JOBID
```
```
Show job details for executing job from job session
Show job details for executing job from job session
```
console
```
console
$
scontrol
-d
show job
$SLURM_JOBID
$
scontrol show job
$SLURM_JOBID
```
Show my jobs with long output format (includes time limit)
```
console
$
squeue
--me
-l
```
```
Show all jobs
Show all jobs
...
@@ -79,7 +85,7 @@ Run interactive job - queue qcpu_exp, one node by default, one task by default
...
@@ -79,7 +85,7 @@ Run interactive job - queue qcpu_exp, one node by default, one task by default
$
salloc
-A
PROJECT-ID
-p
qcpu_exp
$
salloc
-A
PROJECT-ID
-p
qcpu_exp
```
```
Run interactive job on four nodes, 36 tasks per node (Barbora cluster, cpu partition recommended value based on core count), two hours time limit
Run interactive job on four nodes, 36 tasks per node (Barbora cluster, cpu partition recommended value based on
node
core count), two hours time limit
```
console
```
console
$
salloc
-A
PROJECT-ID
-p
qcpu
-N
4
--ntasks-per-node
36
-t
2:00:00
$
salloc
-A
PROJECT-ID
-p
qcpu
-N
4
--ntasks-per-node
36
-t
2:00:00
...
@@ -106,7 +112,7 @@ File script content:
...
@@ -106,7 +112,7 @@ File script content:
```
shell
```
shell
#!/usr/bin/bash
#!/usr/bin/bash
#SBATCH -J MyJobName
#SBATCH -J MyJobName
#SBATCH -A
OPEN-00-00
#SBATCH -A
PROJECT-ID
#SBATCH -N 4
#SBATCH -N 4
#SBATCH --ntasks-per-node 36
#SBATCH --ntasks-per-node 36
#SBATCH -p qcpu
#SBATCH -p qcpu
...
@@ -158,7 +164,7 @@ cn[101-102]
...
@@ -158,7 +164,7 @@ cn[101-102]
Expand nodelist to list of nodes.
Expand nodelist to list of nodes.
```
```
$ scontrol show hostnames
$SLURM_JOB_NODELIST
$ scontrol show hostnames
cn101
cn101
cn102
cn102
```
```
...
@@ -169,7 +175,13 @@ cn102
...
@@ -169,7 +175,13 @@ cn102
$ scontrol update JobId=JOBID ATTR=VALUE
$ scontrol update JobId=JOBID ATTR=VALUE
```
```
for example
Modify job's time limit
```
scontrol update job JOBID timelimit=4:00:00
```
Set/modify job's comment
```
```
$ scontrol update JobId=JOBID Comment='The best job ever'
$ scontrol update JobId=JOBID Comment='The best job ever'
...
@@ -177,9 +189,42 @@ $ scontrol update JobId=JOBID Comment='The best job ever'
...
@@ -177,9 +189,42 @@ $ scontrol update JobId=JOBID Comment='The best job ever'
## Deleting Jobs
## Deleting Jobs
Delete job by job id.
```
```
$ scancel JOBID
$ scancel JOBID
```
```
Delete all my jobs
```
$ scancel --me
```
Delete all my jobs in interactive mode
```
$ scancel --me -i
```
Delete all my running jobs
```
$ scancel --me -t running
```
Delete all my pending jobs
```
$ scancel --me -t pending
```
Delete all my pending jobs for project PROJECT-ID
```
$ scancel --me -t pending -A PROJECT-ID
```
[1]: https://slurm.schedmd.com/
[1]: https://slurm.schedmd.com/
[2]: https://slurm.schedmd.com/srun.html#SECTION_OUTPUT-ENVIRONMENT-VARIABLES
[2]: https://slurm.schedmd.com/srun.html#SECTION_OUTPUT-ENVIRONMENT-VARIABLES
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment