Difference between revisions of "Benchmarking: CP2K"

From Define Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 41: Line 41:
 
FCFLAGS2 = $(DFLAGS) -I$(INTEL_INC) -O1 -msse2 -heap-arrays 64 -fpp -free
 
FCFLAGS2 = $(DFLAGS) -I$(INTEL_INC) -O1 -msse2 -heap-arrays 64 -fpp -free
 
LDFLAGS  = $(FCFLAGS) -I$(INTEL_INC)
 
LDFLAGS  = $(FCFLAGS) -I$(INTEL_INC)
LIBS    = -L$(INTEL_LIB) -lfftw3xf_intel \
+
LIBS    = -L$(INTEL_LIB) -lfftw3xf_intel -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64
          -L${INTEL_LIB} -I${INTEL_INC} -I${INTEL_INC}/intel64/lp64 -lmkl_blas95_lp64 \
 
          -L${INTEL_LIB} -I${INTEL_INC} -I${INTEL_INC}/intel64/lp64 -lmkl_lapack95_lp64 \
 
          ${INTEL_LIB}/libmkl_scalapack_lp64.a ${INTEL_LIB}/libmkl_solver_lp64_sequential.a \
 
          -Wl,--start-group ${INTEL_LIB}/libmkl_intel_lp64.a ${INTEL_LIB}/libmkl_sequential.a \
 
          ${INTEL_LIB}/libmkl_core.a ${INTEL_LIB}/libmkl_blacs_openmpi_lp64.a -Wl,--end-group -lpthread
 
 
 
  
 
OBJECTS_ARCHITECTURE = machine_intel.o
 
OBJECTS_ARCHITECTURE = machine_intel.o
Line 78: Line 72:
 
$ mpirun -np 8 ../../exe/Linux-x86-intel/cp2k.popt -i H2O-32.inp
 
$ mpirun -np 8 ../../exe/Linux-x86-intel/cp2k.popt -i H2O-32.inp
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
== Additional Info ==
 +
http://www.hpcadvisorycouncil.com/pdf/CP2K_Analysis_and_Profiling_Intel_E5.pdf
 +
 +
http://www.hpcadvisorycouncil.com/pdf/CP2K_Best_Practices.pdf

Latest revision as of 21:51, 8 October 2012

Instructions to build CP2K using the following:

  • OpenMPI 1.4.3 (OFED 1.5.4.1) built using the Intel Compilers (v12 and v13 tested)
  • Intel Fortran (v12 / v13)
  • CP2K 2.3
  • Tested on Centos 6.2

About CP2K

CP2K is a freely available (GPL) program, written in Fortran, to perform atomistic and molecular simulations of solid state, liquid, molecular and biological systems. It provides a general framework for different methods such as density functional theory (DFT) using a mixed Gaussian and plane waves approach (GPW), and classical pair and many-body potentials, solid state, liquid, molecular and biological systems. CP2K, including its sources and pointers to the authors can be found at: http://cp2k.berlios.de/

Build FFTW from MKL

$ cd /share/apps/intel/composer_xe_2013.0.079/mkl/interfaces/fftw3xf/
$ make libintel64 compiler=intel
$ cp libfftw3xf_intel.a /share/apps/intel/composer_xe_2013.0.079/mkl/lib/intel64/

Create the arch file

Contents of the cp2k-2.3/arch/Linux-x86-64-intel.popt

INTEL_MKL=/share/apps/intel/composer_xe_2013.0.079/mkl
INTEL_INC=$(INTEL_MKL)/include/fftw
INTEL_LIB=$(INTEL_MKL)/lib/intel64

CC       = cc
CPP      =
FC       = mpif90
LD       = mpif90 
AR       = xiar -r

DFLAGS   = -D__INTEL -D__FFTSG -D__parallel -D__BLACS -D__SCALAPACK -D__FFTW3
CPPFLAGS =
FCFLAGS  = $(DFLAGS) -I$(INTEL_INC) -O3 -msse2 -heap-arrays 64 -funroll-loops -fpp -free
FCFLAGS2 = $(DFLAGS) -I$(INTEL_INC) -O1 -msse2 -heap-arrays 64 -fpp -free
LDFLAGS  = $(FCFLAGS) -I$(INTEL_INC)
LIBS     = -L$(INTEL_LIB) -lfftw3xf_intel -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64

OBJECTS_ARCHITECTURE = machine_intel.o

graphcon.o: graphcon.F
        $(FC) -c $(FCFLAGS2) $<

qs_vxc_atom.o: qs_vxc_atom.F
        $(FC) -c $(FCFLAGS2) $<

Build CP2K

$ cd cp2k-2.3/makefiles
$ make -j 4 ARCH=Linux-x86-64-intel VERSION=popt

Run sample tests

A first recommended test is to run C.inp job.

$ cd cp2k/tests/QS/
$ mpirun -np 8 ../../exe/Linux-x86-intel/cp2k.popt -i C.inp

This is a short test just to be sure that the executable is running without any segmentation fault problem. You can run any test you want, for instance H2O-32.inp

$ cd cp2k/tests/QS/
$ mpirun -np 8 ../../exe/Linux-x86-intel/cp2k.popt -i H2O-32.inp

Additional Info

http://www.hpcadvisorycouncil.com/pdf/CP2K_Analysis_and_Profiling_Intel_E5.pdf

http://www.hpcadvisorycouncil.com/pdf/CP2K_Best_Practices.pdf