[CP2K:9222] Compiling CP2K wih Intel 2016

Tiziano Müller tiziano... at chem.uzh.ch
Mon Jul 17 10:33:52 CEST 2017


Hi Aniruddha

My guess is that the following linker/LIBS flags are invalid:

          -L$(LIBINT_DIR)/lib/libderiv.a -L$(LIBINT_DIR)/lib/libint.a 
-lstdc++ \
          -L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.la 
-L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.a \
          -L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.so 
-L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.so.4 
-L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.so.4.2.0

which should be something like instead:

          -L$(LIBINT_DIR)/lib -lderiv -lint -lstdc++ \
          -L/opt/apps/elpa/2016.05.003/lib -lelpa_openmp

Please read `man ld` for more information about the difference between 
-L and -l

Best regards,
Tiziano

On 14.07.2017 20:20, Aniruddha Dive wrote:
> Hi All,
> 
> I have trying to compile CP2K with intel MKL 2016, LIBINIT 1.1.4, LIBXC 
> 3.0, FFTW 3.3.4 and ELPA 2016.05.03 but I am getting the below errors:
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_terminate_libint_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:181: 
> undefined reference to `free_libint'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_terminate_libderiv_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:191: 
> undefined reference to `free_libderiv'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_initialize_libderiv_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:160: 
> undefined reference to `init_libderiv_base'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:164: 
> undefined reference to `libderiv1_storage_required'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:169: 
> undefined reference to `init_libderiv1'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_initialize_libint_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:128: 
> undefined reference to `init_libint_base'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:132: 
> undefined reference to `libint_storage_required'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:136: 
> undefined reference to `init_libint'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kfm.a(cp_fm_diag.o): 
> In function `cp_fm_diag_mp_cp_fm_power_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/fm/cp_fm_diag.F:971: 
> undefined reference to `elpa2_mp_solve_evp_real_2stage_'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kfm.a(cp_fm_diag.o): 
> In function `cp_fm_diag_mp_cp_fm_elpa_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/fm/cp_fm_diag.F:971: 
> undefined reference to `elpa2_mp_solve_evp_real_2stage_'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_terminate_libint_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:181: 
> undefined reference to `free_libint'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_terminate_libderiv_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:191: 
> undefined reference to `free_libderiv'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_initialize_libderiv_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:160: 
> undefined reference to `init_libderiv_base'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:164: 
> undefined reference to `libderiv1_storage_required'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:169: 
> undefined reference to `init_libderiv1'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_initialize_libint_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:128: 
> undefined reference to `init_libint_base'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:132: 
> undefined reference to `libint_storage_required'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:136: 
> undefined reference to `init_libint'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_terminate_libint_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:181: 
> undefined reference to `free_libint'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_terminate_libderiv_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:191: 
> undefined reference to `free_libderiv'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_initialize_libderiv_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:160: 
> undefined reference to `init_libderiv_base'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:164: 
> undefined reference to `libderiv1_storage_required'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:169: 
> undefined reference to `init_libderiv1'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kmain.a(hfx_libint_wrapper.o): 
> In function `hfx_libint_wrapper_mp_initialize_libint_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:128: 
> undefined reference to `init_libint_base'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:132: 
> undefined reference to `libint_storage_required'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/hfx_libint_wrapper.F:136: 
> undefined reference to `init_libint'
> make[3]: *** 
> [/home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/exe/Linux-x86-64-intel-host/cp2k_shell.popt] 
> Error 1
> make[3]: *** Waiting for unfinished jobs....
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kfm.a(cp_fm_diag.o): 
> In function `cp_fm_diag_mp_cp_fm_power_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/fm/cp_fm_diag.F:971: 
> undefined reference to `elpa2_mp_solve_evp_real_2stage_'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kfm.a(cp_fm_diag.o): 
> In function `cp_fm_diag_mp_cp_fm_elpa_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/fm/cp_fm_diag.F:971: 
> undefined reference to `elpa2_mp_solve_evp_real_2stage_'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kfm.a(cp_fm_diag.o): 
> In function `cp_fm_diag_mp_cp_fm_power_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/fm/cp_fm_diag.F:971: 
> undefined reference to `elpa2_mp_solve_evp_real_2stage_'
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/lib/Linux-x86-64-intel-host/popt/libcp2kfm.a(cp_fm_diag.o): 
> In function `cp_fm_diag_mp_cp_fm_elpa_':
> /home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/src/fm/cp_fm_diag.F:971: 
> undefined reference to `elpa2_mp_solve_evp_real_2stage_'
> make[3]: *** 
> [/home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/exe/Linux-x86-64-intel-host/cp2k.popt] 
> Error 1
> make[3]: *** 
> [/home/aniruddha.dive/CP2K/CP2K_INTEL/cp2k-4.1/exe/Linux-x86-64-intel-host/libcp2k_unittest.popt] 
> Error 1
> 
> Here is my .popt arch file:
> CC       = icc
> CPP      =
> FC       = mpiifort
> LD       = mpiifort
> AR       = ar -r
> 
> LIBXC_DIR = /home/aniruddha.dive/CP2K/LIBXC/install
> LIBINT_DIR = /opt/apps/libint/1.1.4_2017-1-4
> ELPA_LIB = /opt/apps/elpa/2016.05.003/lib
> ELPA_INC = /opt/apps/elpa/2016.05.003/include/elpa_openmp-2016.05.003
> 
> CPPFLAGS =
> DFLAGS   = -D__MKL -D__parallel -D__SCALAPACK -D__FFTW3 -D__LIBXC 
> -D__ELPA3 \
>             -D__LIBINT \
>             -I$(LIBXC_DIR)/include
> CFLAGS   = $(DFLAGS)
> MKLROOT = 
> /opt/apps/intel/xe_2016_update3/compilers_and_libraries_2016.3.210/linux/mkl
> FCFLAGS  = $(DFLAGS) -O2 -g -traceback -fpp -free \
>             -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw 
> -I$(ELPA_INC)/modules -I$(ELPA_INC)/elpa
> FCFLAGS2 = $(DFLAGS) -O0 -g -traceback -fpp -free \
>             -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw 
> -I$(ELPA_INC)/modules -I$(ELPA_INC)/elpa
> LDFLAGS  = $(FCFLAGS) -static-intel
> LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main
> LIBS    += $(MKLROOT)/lib/intel64/libmkl_scalapack_lp64.a \
>           -Wl,--start-group  $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a \
>           $(MKLROOT)/lib/intel64/libmkl_sequential.a \
>           $(MKLROOT)/lib/intel64/libmkl_core.a \
>           $(MKLROOT)/lib/intel64/libmkl_blacs_intelmpi_lp64.a 
> -Wl,--end-group \
>           -lpthread -lm \
>           -L$(LIBXC_DIR)/lib -lxcf90 -lxc \
>           -L$(LIBINT_DIR)/lib/libderiv.a -L$(LIBINT_DIR)/lib/libint.a 
> -lstdc++ \
>           -L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.la 
> -L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.a \
>           -L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.so 
> -L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.so.4 
> -L/opt/apps/elpa/2016.05.003/lib/libelpa_openmp.so.4.2.0
> 
> # Required due to memory leak that occurs if high optimisations are used
> mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F
>           $(FC) -c $(FCFLAGS2) $<
> 
> hfx_contraction_methods.o: hfx_contraction_methods.F
>           $(FC) -c $(FCFLAGS2) $<
> 
> Kindly let me know where am I going wrong.
> 
> Regards,
> Aniruddha M Dive
> PhD Candidate
> Washington State University
> 
> -- 
> You received this message because you are subscribed to the Google 
> Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to cp2k+uns... at googlegroups.com 
> <mailto:cp2k+uns... at googlegroups.com>.
> To post to this group, send email to cp... at googlegroups.com 
> <mailto:cp... at googlegroups.com>.
> Visit this group at https://groups.google.com/group/cp2k.
> For more options, visit https://groups.google.com/d/optout.

-- 
Tiziano Müller
University of Zurich
Department of Chemistry
Winterthurerstrasse 190
CH-8057 Zürich

Tel: +41 44 63 54234
www.chem.uzh.ch
tiziano... at chem.uzh.ch



More information about the CP2K-user mailing list