NERSCPowering Scientific Discovery Since 1974

VASP

Description

VASP is a package for performing ab initio quantum-mechanical molecular dynamics (MD) using pseudopotentials and a plane wave basis set. The approach implemented in VASP is based on a finite-temperature local-density approximation (with the free energy as variational quantity) and an exact evaluation of the instantaneous electronic ground state at each MD step using efficient matrix diagonalization schemes and an efficient Pulay mixing.

Access to VASP 

VASP is available only to NERSC users who already have an existing VASP license.  If you have a VASP license, send your license information to the VASP support at Vienna at vasp.materialphysik@univie.ac.at (and copy vasp_licensing@nersc.gov) requesting that they confirm your VASP license to NERSC staff at vasp_licensing@nersc.gov in order to gain access to the VASP binaries at NERSC. Please note, VASP 5 requires a separate license. The VASP 4.6 users will NOT be automatically upgraded to VASP 5. Therefore, you need to confirm your VASP 5 license separately.

The above instruction about obtaining the VASP access at NERSC is also available via the "module show vasp" command on the NERSC machines where VASP is installed. Currently VASP is available on Cori and Edison. 

It may take several business days from the date when your confirmation request is sent to the VASP support at Vienna to you actually gain the access to the VASP binaries provided at NERSC. If the confirmation takes longer than 5 business days, please let us know by updating the same email thread. 

When your VASP license is confirmed, NERSC will add you to a unix file group: vasp5 for VASP 5 and vasp for VASP 4. You can check if you have the VASP access at NERSC or not by typing the "groups" command. If you are in the vasp5 file group, then you can access both VASP 5 and VASP 4; if you are in the vasp file group, then you can access the VASP 4 only at NERSC.

VASP Modules

NERSC uses modules to manage access to software. To access VASP at NERSC you must first verify your VASP license via email as instructed above. When your request has been processed, you will be able to access the vasp executables.

To see the available vasp modules, type:

% module avail vasp

Eg., on Cori, these are the availble modules,

cori09:~> module avail vasp
--------------------------------- /usr/common/software/modulefiles ----------------------------------
vasp/5.3.5 vasp/5.3.5-cce vasp/5.3.5_vtst vasp/5.3.5_vtst-cce vasp/5.4.1(default)

Where the default module, vasp/5.4.1, is a build of the officially released VASP 5.4.1 code (release date: Jun 24, 2015, with the latest patches available at https://www.vasp.at/index.php/news). Similarly, vasp/5.3.5 is a build of the official release of VASP 5.3.5. The modules with the string "vtst" are the custom builds incorporating commonly used third party contributed codes, e.g., the VTST code from University of Texas at Austin,  Wannier90etc.. We also provide VASP builds with different compilers. We find this could be helpful if your VASP job run into issues with one compiler build. The modules with the string "cce" were built with a Cray compiler, and those without it were built with an Intel compiler. 

To see what environment variables a vasp module defines, do

% module show vasp

for the default module, or do

% module show vasp/5.4.1

For example, on Cori, the following is what you would see with the default vasp module, vasp/5.4.1

cori09:~> module show vasp
-------------------------------------------------------------------
/usr/common/software/modulefiles/vasp/5.4.1:

module-whatis     VASP: Vienna Ab-initio Simulation Package
...

setenv         PSEUDOPOTENTIAL_DIR /usr/common/software/vasp/pseudopotentials/5.3.5
setenv         VDW_KERNAL_DIR /usr/common/software/vasp/vdw_kernal
setenv         NO_STOP_MESSAGE 1
setenv         MPICH_NO_BUFFER_ALIAS_CHECK 1
prepend-path     PATH /usr/common/software/vasp/vtstscripts/3.1
prepend-path     PATH /usr/common/software/vasp/5.4.1/hsw/bin
-------------------------------------------------------------------

The bin directory is where the VASP binaries reside. There are several VASP binaries in the bin directory of each module.

% cori09:~> ls -l /usr/common/software/vasp/5.4.1/hsw/bin 
total 278184
-rwxrwxr-x 1 zz217 usg 89430121 Nov 25 22:57 vasp_gam
-rwxrwxr-x 1 zz217 usg 97722320 Nov 25 23:06 vasp_ncl
-rwxrwxr-x 1 zz217 usg 97704390 Nov 25 22:48 vasp_std

These are the gamma-point only (executable name:vasp_gam), the non-collinear (executable name: vasp_ncl), and the collinear (executable name: vasp_std) versions of the code, respectively. You need to choose an appropriate binary to run your job. Please note, starting from VASP/5.4.1, VASP binaries are named differently compared to the ones we have been providing previously.  We encourage you to switch to the new names. For the older VASP versions, e.g., for VASP 5.3.5, we still have the binary names, vasp, gvasp, and vasp_ncl,  as the collinear, the gamma point only and the non-collinear versions.

% ls -l  /usr/common/usg/vasp/5.3.5_vtst/bin 
total 473012
-rwxrwxr-x 1 zz217 usg 79880690 2013-05-24 16:11 gvasp
-rwxrwxr-x 1 zz217 usg 81001431 2013-05-24 16:41 vasp
-rwxrwxr-x 1 zz217 usg 81295934 2013-05-24 15:44 vasp_ncl

To access the default version of VASP, type:

% module load vasp

Then the path to the VASP binaries will be in your default path.  To access other non-default module, type

% module load vasp/<version>

Using VASP on Cori and Edison

The batch system on Cori and Edison is SLURM. You need to prepare a job script, and submit it to the batch system via the command sbatch. The instructions to run VASP on Cori and Edison are the same. However, a couple of differences you need to be aware of when preparing job scripts. First, the number of cores per node is different. Cori has 32 cores per node, while Edison has 24 cores per node. Secondly, the Cori (Haswell) has larger per core memory than Edison.  Cori has 128 GB of memory per node, 4 GB per core; while Edison has 64 GB memory per node, and 2.67 GB per core. Here are two sample job scripts to run VASP on Cori with two nodes using all the cores (2x32=64) available and on Edison with 2 nodes using all the cores availble (2x24=48), respectively.

A sample batch script to run VASP on Cori

#!/bin/bash -l
#SBATCH -J test_vasp
#SBATCH -p debug
#SBATCH -N 2
#SBATCH -t 00:30:00

module load vasp

srun -n 64 vasp_std

Sample batch script to run VASP on Edison

#!/bin/bash -l
#SBATCH -J test_vasp
#SBATCH -p debug
#SBATCH -N 2
#SBATCH -t 00:30:00

module load vasp

srun -n 48 vasp_std

Then submit the job script using the sbatch command, e.g., assuming the job script file is test_vasp.slrum, and is located in your run directory.

% sbatch test_vasp.slurm 

Once your job is submitted to the queue, please use the commands "squeue", "scontrol view job" and other availble commands to monitor your job. Please refer to the  Monitoring Jobs page for more information.

To run VASP interactively on Cori and Edison

For the short test jobs you may want to run them interactively via an interactive batch session. To request an interactive batch session, issue the command (e.g., requesting 2 nodes):

% salloc -N 2 -p debug -t 30:00 

When the batch session is returned to you, issue the following commands on Cori, which has 32 cores per compute node,

% module load vasp
% srun -n 64 vasp_std

Edison has 24 cores per node, so on Edison, you do

% module load vasp 
% srun -n 48 vasp_std

Trouble Shooting and Error Messages

In this section, we list some common errors users may run into when running VASP jobs on our machines, and our recommendations about how to resolve them. 

If you use our VASP modules,  and loaded a vasp module successfully, but still get an error on Hopper or Edison like this:

"aprun: file vasp not found" 

It usually means that you don't have the permission to access the precompiled VASP binaries that NERSC provides. You need to confirm your license by following the instructions posted in the Description session of this page.

VASP makefiles

If you need to build VASP by yourselves, you can use the makefiles available at each vasp installation directory.  E.g., the makefiles that we used to build the vasp/5.4.1 module on Cori is available at /usr/common/software/vasp/5.4.1/hsw directory.

cori09:~> ls -l /usr/common/software/vasp/5.4.1/hsw/makefile.include
-rw-rw-r-- 1 zz217 usg 1653 Oct 29 17:46 /usr/common/software/vasp/5.4.1/hsw/makefile.include

The makefiles that we used to build the vasp/5.3.5 module on Edison is avilable at /usr/common/usg/vasp/5.3.5/makefiles directory.

cori09:~> ls -l /usr/common/usg/vasp/5.3.5/makefiles
total 52
-rwxrwxr-x 1 zz217 usg   650 Apr 19  2013 build.sh
-rw-rw-r-- 1 zz217 usg 14844 May 28  2014 makefile
-rw-rw-r-- 1 zz217 usg 14911 May 28  2014 makefile.gamma
-rw-rw-r-- 1 zz217 usg 14869 May 28  2014 makefile.ncl
-rw-rw-r-- 1 zz217 usg  1867 Jun 12  2013 makefile_lib

Documentation

VASP Online Manual

Availability

PackagePlatformCategoryVersionModuleInstall DateDate Made Default
VASP cori applications/ material sciences 5.3.5 vasp/5.3.5 2016-03-07
VASP cori applications/ material sciences 5.3.5-cce vasp/5.3.5-cce 2016-03-07
VASP cori applications/ material sciences 5.3.5_vtst vasp/5.3.5_vtst 2016-03-07
VASP cori applications/ material sciences 5.3.5_vtst-cce vasp/5.3.5_vtst-cce 2016-03-07
VASP cori applications/ material sciences 5.4.1 vasp/5.4.1 2015-10-29 2016-06-29
VASP cori applications/ material sciences 5.4.1-gcc vasp/5.4.1-gcc 2016-07-06 2016-07-06
VASP cori applications/ material sciences 5.4.1_vtst vasp/5.4.1_vtst 2016-06-30
VASP cori applications/ material sciences 5.4.1_vtst-gcc vasp/5.4.1_vtst-gcc 2016-07-06
VASP edison applications/ material sciences 4.6.35 vasp/4.6.35 2016-03-07
VASP edison applications/ material sciences 4.6.35_vtst vasp/4.6.35_vtst 2013-04-19
VASP edison applications/ material sciences 5.3.2 vasp/5.3.2 2013-08-13
VASP edison applications/ material sciences 5.3.2_vtst vasp/5.3.2_vtst 2013-08-13
VASP edison applications/ material sciences 5.3.5 vasp/5.3.5 2014-05-29
VASP edison applications/ material sciences 5.3.5-cce vasp/5.3.5-cce 2014-05-29
VASP edison applications/ material sciences 5.3.5_vtst vasp/5.3.5_vtst 2014-05-29
VASP edison applications/ material sciences 5.3.5_vtst-cce vasp/5.3.5_vtst-cce 2014-05-29
VASP edison applications/ material sciences 5.4.1 vasp/5.4.1 2015-09-16
VASP edison applications/ material sciences 5.4.1.test vasp/5.4.1.test 2016-09-22