torque_slurm_scripts
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| torque_slurm_scripts [2020/01/29 18:59] – external edit 127.0.0.1 | torque_slurm_scripts [2025/10/15 19:51] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====Slurm Commands and Scripts==== | ====Slurm Commands and Scripts==== | ||
| - | Basic torque/slurm commands are: | + | Basic slurm commands are: |
| <csv> | <csv> | ||
| - | torque, | + | slurm, use |
| - | qsub, sbatch | + | sbatch |
| - | qsub -I , | + | srun , submit interactive job |
| - | qstat , squeue | + | squeue |
| - | qstat -u rfeynman | + | squeue -u rfeynman |
| - | qdel , | + | scancel |
| - | shownodes -l -n;qstat -q , sinfo , | + | sinfo , |
| </ | </ | ||
| - | A basic slurm script looks like: | + | A basic script |
| < | < | ||
| #!/bin/bash | #!/bin/bash | ||
| Line 25: | Line 26: | ||
| mpirun -np $SLURM_NTASKS -machinefile / | mpirun -np $SLURM_NTASKS -machinefile / | ||
| </ | </ | ||
| - | and a little | + | |
| + | and a more complex script | ||
| + | |||
| < | < | ||
| - | pinnacle-l1: | ||
| #!/bin/bash | #!/bin/bash | ||
| #SBATCH --job-name=espresso | #SBATCH --job-name=espresso | ||
| Line 44: | Line 47: | ||
| pinnacle-l1: | pinnacle-l1: | ||
| </ | </ | ||
| + | |||
| + | See also [ https:// | ||
| + | |||
| + | We have a conversion script **/ | ||
| + | < | ||
| + | pbs2slurm.sh < | ||
| + | </ | ||
| + | will generate the conversion to stdout, thus save with "> newscript.slurm" | ||
| + | |||
| + | ==Notes:== | ||
| + | |||
| + | Leading hash-bang /bin/sh or /bin/bash or /bin/tcsh is optional in torque, required in slurm, pbs2slurm.sh inserts it if not present\\ | ||
| + | Slurm does not autogenerate an MPI machinefile/ | ||
| + | < | ||
| + | The generated machinefile differs from torque machinefile in that it has 1 entry per host instead of '' | ||
| + | Slurm does define a variable with the total number of cores '' | ||
| + | |||
torque_slurm_scripts.1580324380.txt.gz · Last modified: (external edit)
