top of page
Search

Installation of VASP3.5 with Intel® Compilers, Intel® MPI, and Intel® MKL

  • Pradeep R. Varadwaj, PhD, DSC
  • Feb 2, 2016
  • 4 min read

I assume you are having an account in a linux/unix based cluster workstation/supercomputer. All you need to do is to follow-up the command lines below in a step-wise manner, and get some priliminary information that are essentially mandatory for your buildup of the VASP code.

Initially, to check the feasibility of the Intel® Compilers and Intel® MPI libraries, just type the following commands after logged in on to your account, and upon opening an editor like vim, and see if they are available to you:

1. user$which ifort

/opt/intel/composer_xe_2015.2.164/bin/intel64

2. user$which mpiifort

/opt/intel/impi/5.0.3.048/intel64/bin/mpiifort

(This means message passing interface (mpi) version of intel fortran is available. You would use this as your compiler to instal the mpi version of your VASP code).

Moreover, to check the feasibility of the Intel® MKL libraries, just type the following:

3. user$ls $MKLROOT

benchmarks bin examples include interfaces lib tests tools

(You may see several folders like above, which indicate that Intel® MKL library is on your $PATH. To reconfirm this, please type the following:)

4. user$echo $PATH

/opt/intel/impi/5.0.3.048/intel64/bin:/opt/intel/impi/5.0.3.048/intel64/bin:/opt/intel/composer_xe_2015.2.164/bin/intel64:/opt/intel/composer_xe_2015.2.164/ipp/include:/usr/lib64/qt-3.3/bin:/opt/lsf/7.0/linux2.6-glibc2.3-x86_64/etc:/opt/lsf/7.0/linux2.6-glibc2.3-x86_64/bin:/usr/local/bin:/bin:/usr/bin:/opt/bin

(If you get texts similar to above it would detail you about the the various libraries viable on your command line)

Installation of VASP

Once you identify all the required libraries available to you, you may now want to proceed to the next step. At first, you would be involved to install the VASP library provided to you by your admin. If not, please contact him/her to supply you with the code in the form a tar ball. You may be provided with two (or one) tar balls that contain two directories, one with the VASP library, and the other with various fortrain programs and makefiles that can be linked to various libraries upon compilation.

Now use the commands below to untar them each..

5. user$tar –zxvf vasp.5.lib.tar.gz (This may create a directory called vasp.5.lib)

6. user$cd vasp.5.lib (Enter into the directory)

7. user$cp makefile.linux_ifc_P4 makefile (Copy to a file named makefile without affecting the original file supplied to you by the developers)

8. user$vi makefile (Open the makefile using the vi editor)

Please uncomment the following ones (that is, make them active) inside the make file:

FC=mpiifort (you may see FC=ifc in the original file, line 19. You may need to change it to mpiifort)

9. user$wq: (Get out of the file by saving it)

10. user$make (Compile the file)

(If it is complied successfully, it would produce a file, and you will end up with no error or warning message at the last line of the text the compilation would produce - the whole process would take less than a minute.)

11. user$cd .. (Now get out of the vasp lib directory)

12. user$tar –zxvf vasp.5.3.2.tar.gz (Unzip the other tar ball, which may create a new dir)

13. user$cd vasp.5.3 (

14. user$cp makefile.linux_ifc_P4 makefile

15. user$vi makefile

(Use # to unread stuffs inside the file if needed. I suggest keep these two lines as is in the makefile)

CPP_ = ./preprocess <$*.F | /usr/bin/cpp -P -C -traditional >$*$(SUFFIX)

CPP_=fpp -f_com=no -free -w0 $*.F $*$(SUFFIX)

FFLAGS = -FR -name lowercase -assume byterecl (No need to add/remove anything from this line)

  1. #OFLAG=-O3 -xHOST

  2. #OFLAG=-O2 -ip -xavx

  3. #OFLAG=-O3 -xCORE-AVX2

  4. #OFLAG=-O3 -ip -ftz -xSSE3

  5. #OFLAG=-O3 -ip -ftz -xHost -axAVX #-xSSE3

(You can use any one of the aforementioned flags depending on your interest. Each of them work well with me. Please follow up intel recommendations for optimal solutions if you seek advice).

  1. OFLAG_HIGH = $(OFLAG)

  2. OBJ_HIGH =

  3. OBJ_NOOPT =

  4. DEBUG = -FR -O0

  5. INLINE = $(OFLAG)

(Leave the above as is)

# fortran linker for mpi# fortran linker for mpi

#-----------------------------------------------------------------------

FC=mpiifort -I/opt/intel/impi/5.0.3.048/intel64/lib -I${MKLROOT}/include/intel64/lp64 -I${MKLROOT}/include

FCL=$(FC)

#------------------------------------------------------------------------

CPP = $(CPP_) -DMPI -DHOST=\"LinuxIFC\" -DIFC \ -DCACHE_SIZE=32000 -DPGF90 -Davoidalloc -DNGZhalf \ -DMPI_BLOCK=64000 -Duse_collective -DscaLAPACK -DMKL_LP64 \ -DRPROMU_DGEMV -DRACCMU_DGEMV

#-----------------------------------------------------------------------

(MOST important is how you call the MKL libs…I used the following two lines for my case…)

You can use either of the following sets to call the intel library files at the time of compilation

Either,

SCA = ${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group ${MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a -lpthread -lm

LAPACK=/opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_lapack95_lp64.a BLAS = -L/opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/-lmkl_blas95_lp64.a -lmkl_sequential -lmkl_core -lpthread -lm

#----------------------------------------------------------------------- # libraries for mpi #-----------------------------------------------------------------------

LIB = -L../vasp.5.lib -ldmy \ ../vasp.5.lib/linpack_double.o $(LAPACK) \ $(SCA) $(BLAS)

FFT3D = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o /home/users/adk/vasp_tar/vasp5.3.2/fftw3xf_intel.15.0.2/interface/libfftw3xf_intel.a

OR, simply the ones metioned just below:

SCA= -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread

BLAS = -mkl=cluster (this is a VERY useful Intel flag to connect the MKL libs)

LIB = -L../vasp.5.lib -ldmy \ ../vasp.5.lib/linpack_double.o $(LAPACK) \ $(SCA) $(BLAS) #$(BLACS)

FFT3D = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o /home/users/adk/vasp_tar/vasp5.3.2/fftw3xf_intel.15.0.2/interface/libfftw3xf_intel.a

(DO NOT CHANGE/ADD ANY OTHER stuffs IN THE MAKEFILE IF YOU are STRICTLY FOLLOWING MY INSTUCTIONS)

user$wq: (To get out of the vi editor after saving the changes made)

user$make (This may compile the program, and generate an executable called, vasp)

vasp.5.3]$ ldd vasp (You may get you the following lines if your vasp compilation is installed correctly...)

linux-vdso.so.1 =>(0x00007ffff7ffe000)

libmkl_scalapack_lp64.so => /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_scalapack_lp64.so (0x00007ffff7712000)

libmkl_intel_lp64.so => /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007ffff6dff000)

libmkl_intel_thread.so => /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_intel_thread.so (0x00007ffff59de000)

libmkl_core.so => /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_core.so (0x00007ffff3e7f000)

libiomp5.so => /opt/intel/composer_xe_2015.2.164/compiler/lib/intel64/libiomp5.so (0x00007ffff3b43000)

libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003c23200000)

libmkl_cdft_core.so => /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_cdft_core.so (0x00007ffff38dd000)

libmkl_blacs_intelmpi_lp64.so => /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.so (0x00007ffff36a9000)

libmkl_sequential.so => /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_sequential.so (0x00007ffff2dd2000)

libmpifort.so.12 => /opt/intel/impi/5.0.3.048/intel64/lib/libmpifort.so.12 (0x00007ffff2b48000)

libmpi.so.12 => /opt/intel/impi/5.0.3.048/intel64/lib/libmpi.so.12 (0x00007ffff23bd000)

libdl.so.2 => /lib64/libdl.so.2 (0x0000003c22e00000)

librt.so.1 => /lib64/librt.so.1 (0x0000003c23a00000)

libm.so.6 => /lib64/libm.so.6 (0x0000003c22a00000)

libc.so.6 => /lib64/libc.so.6 (0x0000003c22600000)

libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003c26200000)

/lib64/ld-linux-x86-64.so.2 (0x0000003c22200000)

LAST

Add a $PATH to the vasp5.3 dir in your .bashrc, or .bash_profile, or .cshrc file, in order for to use the command ‘which vasp’ from your home directory.

Have fun!!!


 
 
 

Recent Posts

See All
Vasp Installation in Linux Clusters

An installation of vasp in a massively parallel linux machine (and/or cluster) is a bit tricky. If the MKL and OpenMPi library files are...

 
 
 
Very Useful Linux Commands

A list of commands for general use in linux can be found from the following link: http://www.tecmint.com/how-to-check-disk-space-in-linux...

 
 
 
Very useful PBS commands

Node info pbsnodes -a # show status of all nodes pbsnodes -a <node> # show status of specified node pbsnodes -l # list inactive nodes...

 
 
 

Comments


Featured Posts
Check back soon
Once posts are published, you’ll see them here.
Recent Posts
Search By Tags
Follow Us
  • Facebook Classic
  • Twitter Classic
  • Google Classic

FOLLOW ME

  • Facebook Classic
  • Twitter Classic
  • c-youtube

© 2023 by Samanta Jonse. Proudly created with Wix.com

bottom of page