Compiling parallel cp2k using intel MKL

abdeloua... at gmail.com abdeloua... at gmail.com
Mon Aug 18 13:21:06 UTC 2014


Dear CP2K users,
I am compiling the parallel version of cp2k (2.5.1) using mkl together with 
an ifort (13.1.1) wrapper (mpif90) built from openmpi.
I installed the serial version but when it comes to the parallel version in 
my intel machine (24CPU):

MKL_LIB=/opt/intel/composer_xe
_2013.3.163/mkl
CC       = mpicc
CPP      =
FC       = mpif90   -openmp  -I$(MKL_LIB)/include
LD       = mpif90   -openmp  -I$(MKL_LIB)/include
AR       = ar -r
LIBXC_LIB = /opt/etsf
LIBXC_INC= /opt/etsf/include
LIBINT_DIR =/usr/local/libint/1.1.5-stable
INTEL_MKL=$(MKL_LIB)/lib/intel64
INTEL_INC=$(MKL_LIB)/include
LIBINT_INC=/usr/local/libint/1.1.5-stable/include/libint
FFTW_INC=$(MKL_LIB)/include/fftw
DFLAGS   = -D__INTEL -D__FFTSG -D__FFTW3 -DFFT_MKL -D__parallel -D__BLACS 
-D__SCALAPACK -D__LIBXC2
CPPFLAGS =
FCFLAGS  = $(DFLAGS) -I$(INTEL_INC) -I$(FFTW_INC) -I$(LIBINT_INC) 
-I$(LIBXC_INC)  -no-ipo -O3 -xHost -heap-arrays 64 -funroll-loops -fpp -free
FCFLAGS2 = $(DFLAGS) -I$(INTEL_INC) -I$(FFTW_INC) -I$(LIBINT_INC) 
-I$(LIBXC_INC)  -no-ipo -O1 -xHost -heap-arrays 64 -fpp -free
LDFLAGS  = $(FCFLAGS) -static-intel
LIBS=-L$(MKL_LIB)/interfaces/fftw3xf -lfftw3xf_intel\
-L$(MKL_LIB)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 
-lmkl_sequential -lmkl_core -lmkl_intel_thread -lmkl_blacs_openmpi_lp64 
-lpthread -lm\
         $(LIBINT_DIR)/lib/libderiv.a $(LIBINT_DIR)/lib/libint.a -lstdc++ \
 $(LIBXC_LIB)/lib/libxc.a
graphcon.o: graphcon.F
        $(FC) -c $(FCFLAGS2) $<

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

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

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

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

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

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

when I make make ARCH=Linux-x86-64-intel VERSION=popt

I get:
make[1]: Entering directory 
`/home/sa1170/cp2k-par/obj/Linux-x86-64-intel/popt'
mpif90   -openmp  -I/opt/intel/composer_xe_2013.3.163/mkl/include -D__INTEL 
-D__FFTSG -D__FFTW3 -DFFT_MKL -D__parallel -D__BLACS -D__SCALAPACK 
-D__LIBXC2 -I/opt/intel/composer_xe_2013.3.163/mkl/include 
-I/opt/intel/composer_xe_2013.3.163/mkl/include/fftw 
-I/usr/local/libint/1.1.5-stable/include/libint -I/opt/etsf/include -no-ipo 
-O3 -xHost -heap-arrays 64 -funroll-loops -fpp -free 
-D__COMPILE_ARCH="\"Linux-x86-64-intel\"" -D__COMPILE_DATE="\"Fri Aug 15 
17:20:44 BST 2014\"" -D__COMPILE_HOST="\"sa1170-virtual-machine\"" 
-D__COMPILE_REVISION="\"svn:13632\"" -static-intel  -o 
/home/sa1170/cp2k-par/makefiles/../exe/Linux-x86-64-intel/cp2k.popt cp2k.o 
/home/sa1170/cp2k-par/makefiles/../lib/Linux-x86-64-intel/popt/libcp2k_lib.a 
/home/sa1170/cp2k-par/makefiles/../lib/Linux-x86-64-intel/popt/libcp2k_dbcsr_lib.a 
/home/sa1170/cp2k-par/makefiles/../lib/Linux-x86-64-intel/popt/libcp2k_fft_lib.a 
/home/sa1170/cp2k-par/makefiles/../lib/Linux-x86-64-intel/popt/libcp2k_base_lib.a 
/home/sa1170/cp2k-par/makefiles/../lib/Linux-x86-64-intel/popt/libcp2k_ma_lib.a
/home/sa1170/cp2k-par/makefiles/../lib/Linux-x86-64-intel/popt/libcp2k_lib.a(library_tests.o): 
In function `library_tests_mp_matmul_test_..0':
/home/sa1170/cp2k-par/makefiles/../src/library_tests.F:(.text+0x219f): 
undefined reference to `dgemm_'

And whatever the change I make in the Makefile concerning LIBS I have the 
same error!!!. So I don't really see where my problem is...but the LIBS 
path may not be taken correctly!!!
Many many thanks,
Samir

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20140818/b3957502/attachment.htm>


More information about the CP2K-user mailing list