Difference between revisions of "Benchmarking: VASP5.3"

From Define Wiki
Jump to navigation Jump to search
 
Line 188: Line 188:
 
---
 
---
 
>    INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, IND
 
>    INTEGER IP, LMBASE, ISPIRAL, ISPINOR, NLIIND, NIS, NT, LMMAXC, NI, INDMAX, L, IND
 +
</syntaxhighlight>
 +
 +
== Running VASP ==
 +
* Need to run from the same directory as the input files (INCAR file)
 +
<syntaxhighlight>
 +
[ccfe@haswell5 vasp_tests]$ cp -rvf W128 W128-8cores-2640v3
 +
`W128' -> `W128-8cores-2640v3'
 +
`W128/test' -> `W128-8cores-2640v3/test'
 +
`W128/test/POSCAR' -> `W128-8cores-2640v3/test/POSCAR'
 +
`W128/test/KPOINTS' -> `W128-8cores-2640v3/test/KPOINTS'
 +
`W128/test/POTCAR' -> `W128-8cores-2640v3/test/POTCAR'
 +
`W128/test/INCAR' -> `W128-8cores-2640v3/test/INCAR'
 +
</syntaxhighlight>
 +
 +
The use mpirun as normal without any parameters
 +
<syntaxhighlight>
 +
[ccfe@haswell5 test]$ mpirun -np 8 ../../../vasp/vasp.5.3.3/vasp
 +
running on    8 total cores
 +
distrk:  each k-point on    8 cores,    1 groups
 +
distr:  one band on    4 cores,    2 groups
 +
using from now: INCAR   
 +
vasp.5.3.3 18Dez12 (build Oct 14 2014 18:21:23) complex                       
 +
 
 +
POSCAR found type information on POSCAR  W
 +
POSCAR found :  1 types and    128 ions
 +
scaLAPACK will be used
 +
LDA part: xc-table for Pade appr. of Perdew
 +
POSCAR found type information on POSCAR  W
 +
POSCAR found :  1 types and    128 ions
 +
POSCAR, INCAR and KPOINTS ok, starting setup
 +
WARNING: small aliasing (wrap around) errors must be expected
 +
FFT: planning ...
 +
WAVECAR not read
 +
entering main loop
 +
      N      E                    dE            d eps      ncg    rms          rms(c)
 +
DAV:  1    0.249105650454E+04    0.24911E+04  -0.28834E+05  3688  0.122E+03
 +
DAV:  2    -0.125913140424E+04  -0.37502E+04  -0.35875E+04  4288  0.346E+02
 +
DAV:  3    -0.172769139673E+04  -0.46856E+03  -0.45103E+03  5632  0.801E+01
 +
DAV:  4    -0.174931719863E+04  -0.21626E+02  -0.21038E+02  5096  0.182E+01
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 17:55, 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

Running VASP

  • Need to run from the same directory as the input files (INCAR file)
[ccfe@haswell5 vasp_tests]$ cp -rvf W128 W128-8cores-2640v3
`W128' -> `W128-8cores-2640v3'
`W128/test' -> `W128-8cores-2640v3/test'
`W128/test/POSCAR' -> `W128-8cores-2640v3/test/POSCAR'
`W128/test/KPOINTS' -> `W128-8cores-2640v3/test/KPOINTS'
`W128/test/POTCAR' -> `W128-8cores-2640v3/test/POTCAR'
`W128/test/INCAR' -> `W128-8cores-2640v3/test/INCAR'

The use mpirun as normal without any parameters

[ccfe@haswell5 test]$ mpirun -np 8 ../../../vasp/vasp.5.3.3/vasp 
 running on    8 total cores
 distrk:  each k-point on    8 cores,    1 groups
 distr:  one band on    4 cores,    2 groups
 using from now: INCAR     
 vasp.5.3.3 18Dez12 (build Oct 14 2014 18:21:23) complex                        
  
 POSCAR found type information on POSCAR  W 
 POSCAR found :  1 types and     128 ions
 scaLAPACK will be used
 LDA part: xc-table for Pade appr. of Perdew
 POSCAR found type information on POSCAR  W 
 POSCAR found :  1 types and     128 ions
 POSCAR, INCAR and KPOINTS ok, starting setup
 WARNING: small aliasing (wrap around) errors must be expected
 FFT: planning ...
 WAVECAR not read
 entering main loop
       N       E                     dE             d eps       ncg     rms          rms(c)
DAV:   1     0.249105650454E+04    0.24911E+04   -0.28834E+05  3688   0.122E+03
DAV:   2    -0.125913140424E+04   -0.37502E+04   -0.35875E+04  4288   0.346E+02
DAV:   3    -0.172769139673E+04   -0.46856E+03   -0.45103E+03  5632   0.801E+01
DAV:   4    -0.174931719863E+04   -0.21626E+02   -0.21038E+02  5096   0.182E+01