Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

CP2K INSTALLATION GUIDE

## Pre-requisites

 Intel Compiler
 Intel MPI

# Configuring/Installing CP2K
----------------------------------------

$ cd /opt/apps

$ tar -xvf cp2k.tar.gz

$ cd cp2k/

$ cd arch/

$ vi Linux-x86-64-intel.sopt/Linux-x86-64-intel.popt # Edit it accordingly (# Serial/parallel)

INTEL_MKL = /opt/intel/composer_xe_2015.1.133/mkl
INTEL_INC = $(INTEL_MKL)/include/fftw
INTEL_LIB = $(INTEL_MKL)/lib/intel64

LIBINT_PATH = /opt/scripts/build/libint-1.1.4
LIBINT_LIB = $(LIBINT_PATH)/lib/libderiv.a $(LIBINT_PATH)/lib/libint.a -lstdc++

FC = ifort
LD = ifort
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 \
-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

Esc :/wq Enter # Save changes


$ cd /opt/intel/composer_xe_2015.1.133/mkl/interfaces/fftw3xf # FFTW wrapper library for Intel

$ make libintel64 compiler=intel

$ source /opt/intel/composer_xe_2015/bin/compilervars.sh intel64

$ cd cp2k/makefiles/

$ make ARCH=Linux-x86-64-intel VERSION=sopt/popt # optional # Option –j N with make

$ cd cp2k/tests/QS/ # Testing- Running CP2K

$ mpirun -np 1 ../../exe/Linux-x86-intel/cp2k.popt -i C.inp

You might also like