A guide to using SLURM to run PATHSAMPLE

From Docswiki
Jump to navigation Jump to search

Below are two example submission scripts for running PATHSAMPLE jobs on clusters using the SLURM queueing system, e.g. volkhan and sinister. Keyword SLURM can be used to launch jobs using srun, or keywords SSH and PBS can be used to launch jobs using ssh (however, stray OPTIM processes may not be killed after the job dies). Passwordless login between all nodes in your job is still required for using scp to transfer the input files (regular copy from sharedscratch cannot be used, as different nodes may not see the same list of files available due to NFS latency issues). A PATHSAMPLE submission script for the GPU cluster pat can be found here.

Example submission script for SLURM versions 14 and below, e.g. volkhan

#!/bin/bash
#SBATCH --time=20:0:0
#SBATCH --job-name=myjobname
#SBATCH --ntasks=16 # Number of cores used for running OPTIM jobs
#SBATCH --no-requeue # Do not requeue job in the case of node failure
#SBATCH --mail-type=FAIL

echo "Time: `date`"

# Load required modules here
module load anaconda/python2/2.4.1 # Needed for python networkx module if using AMBER12 - must be python 2, not 3

echo $SLURM_NTASKS > nodes.info
srun hostname >> nodes.info
echo $USER >> nodes.info
pwd >> nodes.info

# If using SLURM version 15 or higher, remove srun -N1 -n1 from before executable
srun -N1 -n1 /home/$USER/svn/PATHSAMPLE/build/PATHSAMPLE > output

echo Finished at `date`

Example submission script for SLURM versions 15 and above, e.g. sinister

#!/bin/bash
#SBATCH --time=20:0:0
#SBATCH --job-name=myjobname
#SBATCH --ntasks=16 # Number of cores used for running OPTIM jobs
#SBATCH --no-requeue # Do not requeue job in the case of node failure
#SBATCH --mail-type=FAIL

echo "Time: `date`"

# Load required modules here
module load anaconda/python2/2.4.1 # Needed for python networkx module if using AMBER12 - must be python 2, not 3

echo $SLURM_NTASKS > nodes.info
srun hostname >> nodes.info
echo $USER >> nodes.info
pwd >> nodes.info

# If using SLURM version 14 or lower, add srun -N1 -n1 before executable
/home/$USER/svn/PATHSAMPLE/build/PATHSAMPLE > output

echo Finished at `date`