Updated 2023-03-31

Run VASP on Cluster

Overview

  • The Vienna Ab initio Simulation Package (VASP) is a computer program for atomic scale materials modelling, e.g. electronic structure calculations and quantum-mechanical molecular dynamics, from first principles.
  • More informaton can be found at Vasp's homepage

Walkthrough

Important

A license is required to use Vasp

  • Only users that have an approved license to use Vasp will be able to load the Vasp module.

Loading Vasp Interactively

Step 1: Allocate resources through the Slurm scheduler
  • To load Vasp 6.1.2 (default version of Vasp on cluster) interactively, you will first need to request a resource allocation through Slurm. You can find out more information on interactive jobs here: Slurm Example Guide - Interactive Jobs.
  • For a non-GPU request, run the following on the command line:
$ salloc -A gts-gburdell -q inferno -N1 -n4
  • For a GPU request, run the following on the command line:
$ salloc -A gts-gburdell -q inferno -N1 -n4 --gres=gpu:2
Step 2: Load modules
  • Next, you need to load module dependencies (intel, mvapich2) before loading the Vasp module.
  • Using module load, this can be done as a separate step or one step:
$ module load intel/20.0.4 mvapich2/2.3.6 vasp/6.1.2
  • Run module avail vasp to see other verisions of Vasp (i.e. older versions like vasp/5.4.4).

Loading Vasp With Sbatch Scripts

Example SBATCH Script

#SBATCH -J vasp_job
#SBATCH -A gts-gburdell3
#SBATCH -N1 -n4
#SBATCH -j oe
#SBATCH -o Report-%j.out
#SBATCH -t 1:00:00
#SBATCH -q inferno

#Start from the directory that I submitted this job from
cd $SLURM_SUBMIT_DIR

#Load the necessary modules
module load intel/20.0.4 mvapich2/2.3.6 vasp/6.1.2

#This command will automatically run vasp on the 4 processors assigned to the job
srun vasp_std &> VASP_job.out
  • In addition to the standard (vasp_std) version of VASP, Gamma-only (vasp_gam) and non-collinear (vasp_ncl) versions of VASP are also available.
  • Additionaly, GPU-optimized versions of VASP are available for standard (vasp_gpu) and non-collinear (vasp_gpu_ncl) applications.