... | @@ -15,37 +15,15 @@ But what if your own job is running on a compute node ? then you have a legitima |
... | @@ -15,37 +15,15 @@ But what if your own job is running on a compute node ? then you have a legitima |
|
|
|
|
|
## With a running job
|
|
## With a running job
|
|
|
|
|
|
For this example, we consider a [dummy job](/SLURM/running/sleep.slurm) that just sleep for 5 minutes:
|
|
For this example, we consider a [dummy job](https://gitlab.oca.eu/DSI/HPC/-/blob/master/SLURM/running/sleep.slurm) that just sleep for 5 minutes:
|
|
|
|
|
|
**Then, go SLURM**
|
|
|
|
```
|
|
|
|
17:01:47 [ctchiling@pollux ~]# cd view/HPC/SLURM
|
|
|
|
|
|
|
|
**Then, create a file name's running**
|
|
|
|
#mkdir running
|
|
|
|
#./sequential/sequential.slurm ./sleep.slurm
|
|
|
|
#nano sleep.slurm
|
|
|
|
```
|
|
```
|
|
In this text you write:
|
|
|
|
```
|
|
|
|
" GNU nano 2.3.1 File: sleep.slurm
|
|
|
|
|
|
|
|
#!/usr/bin/env bash
|
|
#!/usr/bin/env bash
|
|
#SBATCH --job-name=waste
|
|
#SBATCH --job-name=waste
|
|
#SBATCH --partition=seq
|
|
#SBATCH --partition=seq
|
|
#SBATCH --time=0:20:0
|
|
|
|
#SBATCH --output %x.%j.out
|
|
|
|
#SBATCH --error %x.%j.err
|
|
|
|
|
|
|
|
echo "This job was launch from $SLURM_SUBMIT_HOST in $SLURM_SUBMIT_DIR"
|
|
|
|
|
|
|
|
sleep 300
|
|
sleep 300
|
|
"
|
|
|
|
```
|
|
|
|
Your commande sleeps while 5 minutes.
|
|
|
|
|
|
|
|
**Then**
|
|
|
|
|
|
|
|
|
|
```
|
|
```
|
|
```
|
|
#[ctchiling@pollux running]# sbatch sleep.slurm
|
|
#[ctchiling@pollux running]# sbatch sleep.slurm
|
|
|
|
|
... | | ... | |