Compile VASP 6.3.2 with VTST on supercomputer

In this post I will introduce the steps and key points for compiling the latest VASP (version 6.3.2) with the latest VTST (190) successfully. There are some mistakes along the way, and I hope you won't repeat those mistakes like I did. Let's begin!

Step 1: Download the VASP and VTST

This step should be straightforward:

Step 2: Import the modules

In this post, I will only focus on the compilation by using CPU, the GPU version will be posted on a separate article.

You can load these modules from your supercomputer like this:

module load intel
module load intel-mpi
module load intel-mkl

The way you check whether you get the correct modules is in the following:

  • which mpiifort can help you check if you have the MPI version of Intel compilers
  • echo $MKLROOT will tell you if you have the environmental variable for Intel MKL library

Step 3: Copy VTST code to VASP

Now I assume you have unzip both the vasp and vtst. Now go into the vtst folder, and use the following command:

cp -r *.F pyamff_fortran/ ../vasp.6.3.2/src/.

Now we can go to the vasp.6.3.2/src and modify something in order to compile successfully, details can be viewed on in this website:

  1. open .object file in src folder, and add the following between hamil_rot.o and chain.o
The correct .object file should be like this
  1. open makefile, and add pyamff_fortran behind variable LIB, like in the following:
LIB=lib parser pyamff_fortran
  1. Open main.F and change two parts:

    3.1 Replace




    3.2 Replace

    IF (LCHAIN) CALL chain_init( T_INFO, IO)


    CALL chain_init( T_INFO, IO)

Remind: Step 3.2 is really really important! Because otherwise you will have Segmentation fault (174).

Step 4: Modify the makefile.include

Now let's move to the makefile.include file, which is the most important file when compiling.

I have used arch/ as the template. Here are some modifications that I have done, they may be different for your own supercomputer:

  • FCL += -mkl#-qmkl=sequential

Step 5: Compilation

Now everything is ready, all you need to do is:

make std (or all)

Bring a coffee and enjoy the smooth compilation.

Merry Christmas!



Subscribe to He Zhengda

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.