Difference between revisions of "Benchmarking: VASP5.3"

From Define Wiki
Jump to navigation Jump to search
Line 60: Line 60:
 
# cd to the vasp directory  
 
# cd to the vasp directory  
 
cd ../vasp.5.3.3/
 
cd ../vasp.5.3.3/
[ccfe@head-boston vasp.5.3.3]$ diff makefile.linux_ifc_P4 makefile
+
</syntaxhighlight>
62c62
+
 
< FC=ifort  
+
Update the makefile
---
+
<syntaxhighlight>
> FC=mpiifort
+
[ccfe@head-boston vasp.5.3.3]$ diff -u  makefile.linux_ifc_P4 makefile
98,99c98,99
+
--- makefile.linux_ifc_P4       2014-10-13 16:42:47.000000000 +0100
< CPP    = $(CPP_)  -DHOST=\"LinuxIFC\" \
+
+++ makefile   2014-10-14 18:21:05.000000000 +0100
<          -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
+
@@ -59,7 +59,7 @@
---
+
#-----------------------------------------------------------------------
> #CPP    = $(CPP_)  -DHOST=\"LinuxIFC\" \
+
# fortran compiler and linker
> #          -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
+
#-----------------------------------------------------------------------
101a102,106
+
-FC=ifort  
> CPP    = $(CPP_) -DMPI  -DHOST=\"LinuxIFC\" -DIFC \
+
+FC=mpiifort
>      -DCACHE_SIZE=32000 -DPGF90 -Davoidalloc -DNGZhalf \
+
# fortran linker
>      -DMPI_BLOCK=64000 -DscaLAPACK -Duse_collective -Ddo_loops –DMKL_ILP64
+
FCL=$(FC)
>
+
>
+
@@ -83,6 +83,8 @@
108c113,114
+
# if this fails go back to cpp
< FFLAGS =  -FR -names lowercase -assume byterecl  
+
CPP_=fpp -f_com=no -free -w0 $*.F $*$(SUFFIX)
---
+
> #FFLAGS =  -FR -names lowercase -assume byterecl  
+
+#CPP_=fpp
> FFFLAGS = -FR -names lowercase -assume byterecl -I$(MKLROOT)/include/
+
+
140a147,151
+
#-----------------------------------------------------------------------
> #MKL_PATH=$(MKLROOT)/lib/intel64
+
# possible options for CPP:
>
+
# NGXhalf            charge density  reduced in X direction
> #MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf/
+
@@ -95,17 +97,23 @@
>
+
# tbdyn                MD package of Tomas  Bucko
> MKLROOT=/cm/shared/apps/intel/composer_xe/2013_sp1.3.174/mkl
+
#-----------------------------------------------------------------------
141a153,155
+
> MKL_FFTW_PATH=$(MKL_PATH)/interfaces/fftw3xf
+
-CPP    = $(CPP_)  -DHOST=\"LinuxIFC\" \
> BLAS= -mkl=cluster
+
-          -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
> LAPACK= -mkl=cluster
+
+#CPP    = $(CPP_)  -DHOST=\"LinuxIFC\" \
143d156
+
+#          -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
< MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf/
+
#          -DRPROMU_DGEMV  -DRACCMU_DGEMV
149c162
+
< BLAS= -lguide  -mkl
+
+CPP    = $(CPP_) -DMPI  -DHOST=\"LinuxIFC\" -DIFC \
---
+
+    -DCACHE_SIZE=32000 -DPGF90 -Davoidalloc -DNGZhalf \
> #BLAS= -lguide  -mkl  
+
+    -DMPI_BLOCK=64000 -DscaLAPACK -Duse_collective -Ddo_loops -DMKL_ILP64
158c171
+
+
< LAPACK= $(MKL_PATH)/libmkl_intel_lp64.a  
+
+
 +
#-----------------------------------------------------------------------
 +
# general fortran flags  (there must a trailing blank on this line)
 +
# byterecl is strictly required for ifc, since otherwise
 +
# the WAVECAR file becomes huge
 +
#-----------------------------------------------------------------------
 +
 +
-FFLAGS =  -FR -names lowercase -assume byterecl  
 +
+#FFLAGS =  -FR -names lowercase -assume byterecl  
 +
+FFFLAGS = -FR -names lowercase -assume byterecl -I$(MKLROOT)/include/
 +
 +
#-----------------------------------------------------------------------
 +
# optimization
 +
@@ -138,15 +146,22 @@
 +
#MKL_PATH=$(MKLROOT)/lib/em64t
 +
 +
# mkl path for ifc 12 compiler
 +
+#MKL_PATH=$(MKLROOT)/lib/intel64
 +
+
 +
+#MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf/
 +
+
 +
+MKLROOT=/cm/shared/apps/intel/composer_xe/2013_sp1.3.174/mkl
 +
MKL_PATH=$(MKLROOT)/lib/intel64
 +
+MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf
 +
+BLAS= -mkl=cluster
 +
+LAPACK= -mkl=cluster
 +
 +
-MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf/
 +
 +
# BLAS
 +
# setting -DRPROMU_DGEMV  -DRACCMU_DGEMV in the CPP lines usually speeds up program execution
 +
# BLAS= -Wl,--start-group $(MKL_PATH)/libmkl_intel_lp64.a $(MKL_PATH)/libmkl_intel_thread.a $(MKL_PATH)/libmkl_core.a -Wl,--end-group -lguide  
 +
  # faster linking and available from at least version 11
 +
-BLAS= -lguide  -mkl
 +
+#BLAS= -lguide  -mkl  
 +
 +
 +
# LAPACK, use vasp.5.lib/lapack_double
 +
@@ -155,7 +170,7 @@
 +
 +
# LAPACK from mkl, usually faster and contains scaLAPACK as well
 +
 +
-LAPACK= $(MKL_PATH)/libmkl_intel_lp64.a
 +
+#LAPACK= $(MKL_PATH)/libmkl_intel_lp64.a  
 +
 +
# here a tricky version, link in libgoto and use mkl as a backup
 +
# also needs a special line for LAPACK
 +
@@ -179,7 +194,9 @@
 +
# since this version is faster on P4 machines, we recommend to use it
 +
#-----------------------------------------------------------------------
 +
 +
-FFT3D  = fft3dfurth.o fft3dlib.o
 +
+#FFT3D  = fft3dfurth.o fft3dlib.o
 +
+FFT3D= fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o $(MKL_FFTW_PATH)/libfftw3xf_intel.a
 +
+INCS = -I$(MKLROOT)/include/fftw
 +
 +
# alternatively: fftw.3.1.X is slighly faster and should be used if available
 +
#FFT3D  = fftw3d.o fft3dlib.o  /opt/libs/fftw-3.1.2/lib/libfftw3.a
 +
@@ -234,6 +251,8 @@
 +
#BLACS= -lmkl_blacs_openmpi_lp64
 +
#SCA= $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)
 +
 +
+SCA=$(MKL_PATH)/libmkl_scalapack_ilp64.a $(MKL_PATH)/libmkl_intelmpi_ilp64.a
 +
+
 +
#-----------------------------------------------------------------------
 +
# libraries
 +
#-----------------------------------------------------------------------
 +
@@ -274,6 +293,8 @@
 +
          paw_base.o metagga.o  egrad.o    pawsym.o  pawfock.o  pawlhf.o  rhfatm.o  hyperfine.o paw.o  \
 +
          mkpoints_full.o      charge.o  Lebedev-Laikov.o  stockholder.o dipol.o    pot.o \
 +
          dos.o      elf.o      tet.o      tetweight.o hamil_rot.o \
 +
+        lbfgs.o    cg.o      qm.o      bfgs.o      sd.o      fire.o \
 +
+        neb.o      dynmat.o  dimer.o    lanczos.o  bbm.o    instanton.o    opt.o \
 +
          chain.o    dyna.o    k-proj.o    sphpro.o    us.o  core_rel.o \
 +
          aedens.o  wavpre.o  wavpre_noio.o broyden.o \
 +
          dynbr.o    hamil_high.o  rmm-diis.o reader.o  writer.o  tutor.o xml_writer.o \
 +
</syntaxhighlight>
 +
 
 +
Apply a patch for the nonlr.F file (in the VASP root directory) 
 +
<syntaxhighlight>
 +
By applying the patch mentioned below to the nonlr.F, this compilation error can be fixed.
 +
3002c3002
 +
<    INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, LM, IND
 
---
 
---
> #LAPACK= $(MKL_PATH)/libmkl_intel_lp64.a
+
>     INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, IND
182c195,197
+
3144c3144
< FFT3D  = fft3dfurth.o fft3dlib.o
+
<     INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, LM, IND
 
---
 
---
> #FFT3D  = fft3dfurth.o fft3dlib.o
+
>     INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, IND
> FFT3D= fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o $(MKL_FFTW_PATH)/libfftw3xf_intel.a
 
> INCS = -I$(MKLROOT)/include/fftw
 
236a252,253
 
> SCA=$(MKL_PATH)/libmkl_scalapack_ilp64.a $(MKL_PATH)/libmkl_intelmpi_ilp64.a
 
>
 
 
</syntaxhighlight>
 
</syntaxhighlight>
Replace -lguide with -liomp5
 

Revision as of 17:50, 14 October 2014

VASP 5.3

Standard Build

Compilation

In the source directory you will find two tar files. Untar both of them.

vasp.X.tar.gz  
vasp.X.lib.tar.gz


In each directory copy one of the makefiles to 'makefile' and change the compilers to the ones. (ifc -> ifort)

cd vasp.5.3
cp makefile.linux_ifc_P4 makefile
make
cd vasp.5.lib
cp makefile.linux_ifc_P4 makefile
make


Intel Compilation

Build FFTW wrapper library for Intel MKL

  • Build the libfftw3xf_intel.a lib
[root@head-boston ~]# cd /cm/shared/apps/intel/composer_xe/2013_sp1.3.174/mkl/interfaces/fftw3xf
[root@head-boston fftw3xf]# make libintel64 compiler=intel
make -f  makefile lib _IA=intel64
...
[root@head-boston fftw3xf]# ls
fftw3xf.lst  libfftw3xf_intel.a  makefile  wrappers

Build libdmy.a

  • Unpack the vasp.5.lib.tar.gz file
[ccfe@haswell5 vasp.5.lib]$ pwd
/home/ccfe/vasp/vasp.5.lib
[ccfe@haswell5 vasp.5.lib]$ cp makefile.linux_ifc_P4 makefile
[ccfe@haswell5 vasp.5.lib]$ vi makefile
[ccfe@haswell5 vasp.5.lib]$ diff makefile.linux_ifc_P4 makefile
19c19
< FC=ifc
---
> FC=ifort
[ccfe@haswell5 vasp.5.lib]$ make -f makefile
[ccfe@haswell5 vasp.5.lib]$ ls libdmy.a 
libdmy.a

Build VASP

# cd to the vasp directory 
cd ../vasp.5.3.3/

Update the makefile

[ccfe@head-boston vasp.5.3.3]$ diff -u  makefile.linux_ifc_P4 makefile
--- makefile.linux_ifc_P4       2014-10-13 16:42:47.000000000 +0100
+++ makefile    2014-10-14 18:21:05.000000000 +0100
@@ -59,7 +59,7 @@
 #-----------------------------------------------------------------------
 # fortran compiler and linker
 #-----------------------------------------------------------------------
-FC=ifort 
+FC=mpiifort 
 # fortran linker
 FCL=$(FC)
 
@@ -83,6 +83,8 @@
 # if this fails go back to cpp
 CPP_=fpp -f_com=no -free -w0 $*.F $*$(SUFFIX) 
 
+#CPP_=fpp
+
 #-----------------------------------------------------------------------
 # possible options for CPP:
 # NGXhalf             charge density   reduced in X direction
@@ -95,17 +97,23 @@
 # tbdyn                 MD package of Tomas  Bucko
 #-----------------------------------------------------------------------
 
-CPP     = $(CPP_)  -DHOST=\"LinuxIFC\" \
-          -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
+#CPP     = $(CPP_)  -DHOST=\"LinuxIFC\" \
+#          -DCACHE_SIZE=12000 -DPGF90 -Davoidalloc -DNGXhalf \
 #          -DRPROMU_DGEMV  -DRACCMU_DGEMV
 
+CPP    = $(CPP_) -DMPI  -DHOST=\"LinuxIFC\" -DIFC \
+     -DCACHE_SIZE=32000 -DPGF90 -Davoidalloc -DNGZhalf \
+     -DMPI_BLOCK=64000 -DscaLAPACK -Duse_collective -Ddo_loops -DMKL_ILP64
+
+
 #-----------------------------------------------------------------------
 # general fortran flags  (there must a trailing blank on this line)
 # byterecl is strictly required for ifc, since otherwise
 # the WAVECAR file becomes huge
 #-----------------------------------------------------------------------
 
-FFLAGS =  -FR -names lowercase -assume byterecl 
+#FFLAGS =  -FR -names lowercase -assume byterecl 
+FFFLAGS = -FR -names lowercase -assume byterecl -I$(MKLROOT)/include/
 
 #-----------------------------------------------------------------------
 # optimization
@@ -138,15 +146,22 @@
 #MKL_PATH=$(MKLROOT)/lib/em64t
 
 # mkl path for ifc 12 compiler
+#MKL_PATH=$(MKLROOT)/lib/intel64
+
+#MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf/
+
+MKLROOT=/cm/shared/apps/intel/composer_xe/2013_sp1.3.174/mkl
 MKL_PATH=$(MKLROOT)/lib/intel64
+MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf
+BLAS= -mkl=cluster
+LAPACK= -mkl=cluster
 
-MKL_FFTW_PATH=$(MKLROOT)/interfaces/fftw3xf/
 
 # BLAS
 # setting -DRPROMU_DGEMV  -DRACCMU_DGEMV in the CPP lines usually speeds up program execution
 # BLAS= -Wl,--start-group $(MKL_PATH)/libmkl_intel_lp64.a $(MKL_PATH)/libmkl_intel_thread.a $(MKL_PATH)/libmkl_core.a -Wl,--end-group -lguide 
 # faster linking and available from at least version 11
-BLAS= -lguide  -mkl 
+#BLAS= -lguide  -mkl 
 
 
 # LAPACK, use vasp.5.lib/lapack_double
@@ -155,7 +170,7 @@
 
 # LAPACK from mkl, usually faster and contains scaLAPACK as well
 
-LAPACK= $(MKL_PATH)/libmkl_intel_lp64.a 
+#LAPACK= $(MKL_PATH)/libmkl_intel_lp64.a 
 
 # here a tricky version, link in libgoto and use mkl as a backup
 # also needs a special line for LAPACK
@@ -179,7 +194,9 @@
 # since this version is faster on P4 machines, we recommend to use it
 #-----------------------------------------------------------------------
 
-FFT3D   = fft3dfurth.o fft3dlib.o
+#FFT3D   = fft3dfurth.o fft3dlib.o
+FFT3D= fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o $(MKL_FFTW_PATH)/libfftw3xf_intel.a
+INCS = -I$(MKLROOT)/include/fftw
 
 # alternatively: fftw.3.1.X is slighly faster and should be used if available
 #FFT3D   = fftw3d.o fft3dlib.o   /opt/libs/fftw-3.1.2/lib/libfftw3.a
@@ -234,6 +251,8 @@
 #BLACS= -lmkl_blacs_openmpi_lp64
 #SCA= $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)
 
+SCA=$(MKL_PATH)/libmkl_scalapack_ilp64.a $(MKL_PATH)/libmkl_intelmpi_ilp64.a
+
 #-----------------------------------------------------------------------
 # libraries
 #-----------------------------------------------------------------------
@@ -274,6 +293,8 @@
          paw_base.o metagga.o  egrad.o    pawsym.o   pawfock.o  pawlhf.o   rhfatm.o  hyperfine.o paw.o   \
          mkpoints_full.o       charge.o   Lebedev-Laikov.o  stockholder.o dipol.o    pot.o \
          dos.o      elf.o      tet.o      tetweight.o hamil_rot.o \
+        lbfgs.o    cg.o       qm.o       bfgs.o      sd.o      fire.o \
+        neb.o      dynmat.o   dimer.o    lanczos.o   bbm.o     instanton.o    opt.o \
          chain.o    dyna.o     k-proj.o    sphpro.o    us.o  core_rel.o \
          aedens.o   wavpre.o   wavpre_noio.o broyden.o \
          dynbr.o    hamil_high.o  rmm-diis.o reader.o   writer.o   tutor.o xml_writer.o \

Apply a patch for the nonlr.F file (in the VASP root directory)

By applying the patch mentioned below to the nonlr.F, this compilation error can be fixed.
3002c3002
<     INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, LM, IND
---
>     INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, IND
3144c3144
<     INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, LM, IND
---
>     INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, IND