Installing VASP-6.4.2 with Intel-2023.1

For full Requirements for installing VASP-6.4.2, do take a look at Installing VASP.6.X.X

Requirements Needs

Step 1: Prepare the makefile.include

Select the appropriate makefile.include from arch folder that you resemble your environment. In my case

$ cp arch/makefile.include  ./makefile.include

Step 2: Source Intel Environment

$ source /usr/local/intel/2023.1/setvars.sh
:: initializing oneAPI environment ...
   -bash: BASH_VERSION = 4.4.20(1)-release
   args: Using "$@" for setvars.sh arguments:
:: advisor -- latest
:: ccl -- latest
:: clck -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: inspector -- latest
:: intelpython -- latest
:: ipp -- latest
:: ippcp -- latest
:: ipp -- latest
:: itac -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: vtune -- latest
:: oneAPI environment initialized ::

Step 3: Prepare the Intel Optimised BLAS95, LAPACK95 and FFTW.

Step 4: Build VASP

I like to use “-j1” as I want the compilation to stop on first error

$ make DEPS=1 -j1 all

Step 5: Test

$ make test

No rule to make target `pyamff_fortran/*.f90′, needed by `pyamff_fortran/*.o’.

If you are having this error during your compilation with VASP-6.4.2 and VTST, if you are encountering the error

error message;
No rule to make target `pyamff_fortran/*.f90', needed by `pyamff_fortran/*.o'. Stop.

Solution

Make sure you have updated the LIB in makefile inside src/

# vim /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src/makefile
LIB=lib parser pyamff_fortran

For more information, do take a look at Configuring VTST with VASP-6.4.2 with Intel 2023.1

Configuring VTST with VASP-6.4.2 with Intel 2023.1

Taken from VTST.Tools Installation Guide

The VTST•Tools has a Fortran component which can be linked into the VASP code as well as a collection of scripts.

Step 1: Download the VTST Code

Download the VTST Code (vtstcode.tgz) at http://theory.cm.utexas.edu/vtsttools/download.html 

Step 2: Building VTST code into VASP

To install, download the files in vtsttools/vtstcode, choose a version, and copy the files in the directory into your vasp source directory. The file chain.F is replaced, so back up the old version. There are other files in the package: neb.F, dynmat.F, dimer.F, lanczos.F, sd.F, cg.F, qm.F, lbfgs.F, bfgs.F, fire.F, and opt.F in and vtstcode6.4/ directories. The vtstcode6.4/ directory contains another file called ml_pyamff.F and directory named pyamff_fortran/, which interface to a machine learning package PyAMFF.

In my situation, I put it in /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src

$ cd /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src
$ tar -zxvf vtstcode-198.tgz
$ cd vtstcode-198/vtstcode6.4
$ cp -Rv * /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src

Step 3: Find the variable SOURCE in the .objects file (a hidden file in src/)

Find the variable SOURCE in the .objects file (a hidden file in src/), which defines which objects will be built, and add the following objects before chain.o:

$ cd /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src
$ ls -al .objects
$ vim .objects

Around line 126, before chain.o, insert the following

bfgs.o dynmat.o instanton.o lbfgs.o sd.o cg.o dimer.o bbm.o \
fire.o lanczos.o neb.o qm.o \
pyamff_fortran/*.o ml_pyamff.o \
opt.o

Step 4: Update the LIB in makefile inside src/

# vim /usr/local/vasp-6.4.2-vtst/vasp.6.4.2/src/makefile
LIB=lib parser pyamff_fortran

To be continued with VASP Installation later.

Compiling VASP.6.3.0 using Nvidia hpcx, gcc-12.3 and MKL on Rocky Linux 8.7

For information, do take a look at VASP – Install VASP.6.X.X

VASP support several compilers. But we will be focusing on Nvidia hpcx only for this blog. To compile Nvidia hpcx, do take a look at Installing and using Mellanox HPC-X Software Toolkit

You may want to use Nvida hpcx. You may want to module use

export HPCX_HOME=/usr/local/hpcx-v2.15-gcc-MLNX_OFED_LINUX-5-redhat8-cuda12-gdrcopy2-nccl2.17-x86_64
module use $HPCX_HOME/modulefiles
----------------- /usr/local/hpcx-v2.15 --------------------------------------------
hpcx  hpcx-debug  hpcx-debug-ompi  hpcx-mt  hpcx-mt-ompi  hpcx-ompi  hpcx-prof  hpcx-prof-ompi  hpcx-stack

You can untar the VASP.6.3.3. and potpaw_PBE.54

% tar -xvf vasp.6.3.0.tar
% tar -xvf potpaw_PBE.54.tar 

At the installation base of vasp.6.3.0 base

% cp arch/makefile.include.gnu_ompi_mkl_omp ./makefile.include

You will need the latest GNU GCC-10 or the latest for a successful compile. I compiled with GCC-12.3. You may want to take a look at Compiling GCC 12.1.0 on Rocky Linux 8.5

If you are using OneAPI Intel MKL, you can use module use after compilation. It will not be covered in this write-up. But you can:

% module use /usr/local/intel/2023.1/modulefiles

Finally,

% module load mkl/latest
% module load gnu/gcc-12.3
% module load hpcx
% make veryclean
% make DEPS=1 -j
.....
.....
make[2]: Leaving directory '/usr/local/vasp/vasp.6.3.0/build/std'
make[1]: Leaving directory '/usr/local/vasp/vasp.6.3.0/build/std'

In the bin directory, you should see vasp_gam vasp_ncl vasp_std

Compiling VASP.6.3.0 with GPGPU Capability using Nvidia HPC-SDK on Rocky Linux 8.5

To Compile VASP with GPGPU Capability using Nvidia HPC-SDK. For more information, do take a look at VASP – Install VASP.6.X.X

VASP support several compilers. But we will be focusing on Nvidia HPC-SDK only for this blog. To download the NVIDIA HPC-SDK

To compile Nvidia HPC SDK, do take a look at HPC SDK Documentation

% tar -xpfz <tarfile>.tar.gz

You may want to use modulefiles provided at hpc-sdk if you are using Module Environment

% module use /usr/local/nvidia/hpc_sdk/modulefiles

You should be able to see something like

------------------- /usr/local/nvidia/hpc_sdk/modulefiles ---------------
nvhpc-byo-compiler/22.5  nvhpc-nompi/22.5  nvhpc/22.5

You can untar the VASP.6.3.3. and potpaw_PBE.54

% tar -xvf vasp.6.3.0.tar
% tar -xvf potpaw_PBE.54.tar 

At the installation base of vasp.6.3.0 base

% cp arch/makefile.include.nvhpc_ompi_mkl_omp_acc ./makefile.include

Load the Nvidia GPGPU SDK and compile. If you are using OneAPI Intel Compilers, you can use module use after compilation. It will not be covered in this write-up.

% module use /usr/local/intel/oneapi-2022/modulefiles
% module load nvhpc/22.5
% module load mkl/latest
% make veryclean
% make DEPS=1 -j

If during the make, you encounter the error

/usr/local/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/.bin/mpif90: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

You can dnf install libatomic

% dnf install libatomic -y

Try Compiling again

References:

  1. Installing VASP.6.X.X