Skip to main content

VASP

Vienna Ab-initio Simulation Package (VASP) is a software package for electronic structure calculations and quantum mechanical molecular dynamics simulations, developed by the Hafner group at the University of Vienna.

License required

Please purchase the VASP license, download, and install it yourself. If you require assistance with installation or usage, please contact us and provide proof that your research group holds a VASP license.


1. Script Template

submit.sh
#!/bin/bash
#SBATCH --nodes=1 # Number of nodes
#SBATCH --ntasks-per-node=56 # Number of cores per node
#SBATCH --ntasks=56 # Total number of cores
#SBATCH --partition=g1_share # Queue partition; must specify the correct partition
#SBATCH --job-name=hello # Job name
#SBATCH --output=hello.%j.out # Standard output log (%j is the jobId)
#SBATCH --error=hello.%j.err # Error output log (%j is the jobId)

##############################################
# Software Envrironment #
##############################################
unset I_MPI_PMI_LIBRARY # Unset default MPI library, use Intel's built-in
export I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=0 # Parameter modification required for Intel multi-node jobs
module load intel/2022 intelmpi/2022 # Load Intel environment

##############################################
# Run job #
##############################################
export OMP_NUM_THREADS=1

mpirun -hosts `scontrol show hostname $SLURM_JOB_NODELIST |tr '\n' ',' | head -c-1` -np $SLURM_NTASKS vasp_std

2. Errors encountered during example runs

# Error message as follows:
internal error in SETUP_DEG_CLUSTERS: NB_TOT exceeds NMAX_DEG
increase NMAX_DEG to 96
# This is an error you may encounter when performing phonon calculations (IBRION=7 or 8). This is one case where the hard-coded array size limit is exceeded. The first step is to apply the suggested modification. This means going to your VASP source and increasing the hard-coded limit.
cd vasp.5.4.4/src
vim subrot_cluster.F
# Before change
INTEGER, PARAMETER :: NMAX_DEG=48
# After change
INTEGER, PARAMETER :: NMAX_DEG=96
cd ../
make veryclean
make all
# This usually resolves the issue. However, it does not always do so; you may encounter the same error in your next run.
## Error details as follows

the old and the new charge density differ
old charge density:512.00000 new512.35715
## Job phenomenon: calculation stuck, and the out file contains the above characters
### Solution: Add export I_MPI_ADJUST_REDUCE=3 to the submission script
export I_MPI_ADJUST_REDUCE=3
## Error details as follows
reached required accuracy - stopping structural energy minimisation
LOOP+: cpu time 78.8490: real time 79.8828
## Job phenomenon: calculation stuck, and the out file contains the above characters
### Solution: VASP job stuck and not converging in the submission script; if not a case issue, adjust the case