|
### Job en tranche
|
|
You may wish to specify dependencies between jobs for various reasons, including
|
|
Il faut soumettre chaque tranche avec les dépendance qui vont bien, par exemple:
|
|
* checkpoint/restart: if you job takes more than the time limit, you'll need to split it in sub steps and launch step $`N+1`$ only when step $`N`$ successfully completed.
|
|
> sbatch --dependancy=afterany:<jobid> script.slurm
|
|
* multi stage work: you work might be divided in different stages, each of which might not use te same resources. Again, stage $`N+1`$ must wait for successful completion of stage $`N`$.
|
|
|
|
|
|
Lance la première tranche et renvoi un numéro de job 'jobid':
|
|
This can be achieved with the '--dependancy' option of [sbatch](https://slurm.schedmd.com/sbatch.html) command.
|
|
|
|
|
|
> sbatch --dependancy=afterany:<jobid>:<autrejobid> script.slurm |
|
First, you launch you first jobs (you can have one or more):
|
|
\ No newline at end of file |
|
```
|
|
|
|
[alainm@castor rel]$ sbatch -p fdr ./usefull.slurm
|
|
|
|
Submitted batch job 16388602
|
|
|
|
[alainm@castor rel]$ sbatch -p fdr ./usefull.slurm
|
|
|
|
Submitted batch job 16388603
|
|
|
|
[alainm@castor rel]$
|
|
|
|
```
|
|
|
|
This will provide you with the job ids, here 16388602 and 16388603.
|
|
|
|
|
|
|
|
You can then launch another job, requiring that it only be launch once the previous jobs successfully completed:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ sbatch --dependancy=after:16388602:16388603 ./usefull2.slurm
|
|
|
|
```
|
|
|
|
|
|
|
|
There are many more ways to specify dependencies explained in the [sbatch man page](https://slurm.schedmd.com/sbatch.html). |
|
|
|
\ No newline at end of file |