This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
torque_slurm_scripts [2020/01/31 20:27] root |
torque_slurm_scripts [2022/02/02 20:36] (current) jpummil |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====PBS and 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 script in '' | + | A basic script in '' |
- | < | + | |
- | #PBS -N mpi | + | |
- | #PBS -j oe | + | |
- | #PBS -o zzz.$PBS_JOBID | + | |
- | #PBS -l nodes=2: | + | |
- | #PBS -q q06h32c | + | |
- | cd $PBS_O_WORKDIR | + | |
- | NP=$(wc< | + | |
- | module purge | + | |
- | module load intel/ | + | |
- | mpirun -np $NP -machinefile $PBS_NODEFILE ./mympiexe -inputfile MA4um.mph -outputfile MA4um-output.mph | + | |
- | </ | + | |
< | < | ||
Line 38: | Line 26: | ||
mpirun -np $SLURM_NTASKS -machinefile / | mpirun -np $SLURM_NTASKS -machinefile / | ||
</ | </ | ||
+ | |||
and a more complex script with file moving looks like: | and a more complex script with file moving looks like: | ||
- | < | + | |
- | #PBS -N espresso | + | |
- | #PBS -j oe | + | |
- | #PBS -o zzz.$PBS_JOBID | + | |
- | #PBS -l nodes=4: | + | |
- | #PBS -q q06h32c | + | |
- | module purge | + | |
- | module load intel/ | + | |
- | cd $PBS_O_WORKDIR | + | |
- | cp *.in *UPF / | + | |
- | cd / | + | |
- | sort -u $PBS_NODEFILE > | + | |
- | mpirun -ppn 16 -hostfile hostfile -genv OMP_NUM_THREADS 4 -genv MKL_NUM_THREADS 4 / | + | |
- | mv ausurf.log *mix* *wfc* *igk* $PBS_O_WORKDIR/ | + | |
- | </ | + | |
< | < | ||
#!/bin/bash | #!/bin/bash | ||
Line 74: | Line 50: | ||
See also [ https:// | See also [ https:// | ||
- | We have a conversion script **/ | + | We have a conversion script **/ |
< | < | ||
pbs2slurm.sh < | pbs2slurm.sh < |