LIBXC 4.0 support for CP2K-5.1 (Patch)

Nico Holmberg holmbe... at gmail.com
Thu Feb 22 11:54:37 UTC 2018


Hi,

You forgot to change the libxc library flag in your arch-file. You need to 
change $(LIBXC)/lib/libxcf90.a\ to $(LIBXC)/lib/*libxcf03.*a\


BR, 

Nico

torstai 22. helmikuuta 2018 8.27.13 UTC+2 huy pham kirjoitti:
>
> Hi Andreas,
>
> I think this post is very useful, especially for someone want to use some 
> newest functionals in libxc.
>
> I have a problem when compiling cp2k following your guide. Please see the 
> error below.
>
> mpifort -O0 -xHost -pc64 -unroll -heap-arrays 64  
> -I/home/chp071/Codes/install-libint-1.1.4/bin/include 
> -I/home/chp071/Codes/install-libxc-4.0.4/include -L/home/chp071/lib 
> -L/opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64 
> -L/home/chp071/Codes/install-libint-1.1.4/bin/lib 
> -L/home/chp071/Codes/install-libxc-4.0.4/lib 
> -L/home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt -o 
> /home/chp071/Codes/cp2k-5.1/exe/Linux-ia64-intel_xc404/cp2k.popt cp2k.o  
> -lcp2kstart -lcp2kmc -lcp2kswarm -lcp2kmotion -lcp2kthermostat -lcp2kemd 
> -lcp2ktmc -lcp2kmain -ldbcsrarnoldi -ldbcsrx -lcp2kshg_int -lcp2keri_mme 
> -lcp2kminimax -lcp2khfxbase -lcp2ksubsys -lcp2kxc -lcp2kao -lcp2kinput 
> -lcp2kpw -lcp2kfft -lcp2kdbcsr_tensor -ldbcsr -ldbcsrmm -ldbcsrops 
> -ldbcsrbblock -ldbcsrbdist -ldbcsrbase -ldbcsrdata -lmicsmm -lclsmm 
> -lcp2kacc -lcp2kaccmic -lcp2kaccopencl -lcp2kfm -lcp2kcommon -lcp2kmpiwrap 
> -lcp2kgrid -lcp2kbase /opt/fftw/3.3.4/intel/openmpi_ib/lib/libfftw3.a 
> /opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/libmkl_scalapack_lp64.a 
> -Wl,--start-group 
> /opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/libmkl_intel_lp64.a 
> /opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/libmkl_core.a 
> /opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/libmkl_sequential.a 
> -Wl,--end-group 
> /opt/intel/composer_xe_2013_sp1.2.144/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.a 
> -lpthread /home/chp071/Codes/install-libint-1.1.4/bin/lib/libderiv.a 
> /home/chp071/Codes/install-libint-1.1.4/bin/lib/libint.a 
> /home/chp071/Codes/install-libxc-4.0.4/lib/libxcf90.a 
> /home/chp071/Codes/install-libxc-4.0.4/lib/libxc.a
> ipo: warning #11060: 
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libmicsmm.a is 
> an archive, but has no symbols (this can happen if ar is used where xiar is 
> needed)
> ipo: warning #11060: 
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libclsmm.a is 
> an archive, but has no symbols (this can happen if ar is used where xiar is 
> needed)
> ipo: warning #11060: 
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kaccmic.a 
> is an archive, but has no symbols (this can happen if ar is used where xiar 
> is needed)
> ipo: warning #11060: 
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kaccopencl.a 
> is an archive, but has no symbols (this can happen if ar is used where xiar 
> is needed)
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc.o): 
> In function `xc_libxc_mp_libxc_lda_info_':
> xc_libxc.f90:(.text+0x2ad): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_init_'
> xc_libxc.f90:(.text+0x2c6): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_get_info_'
> xc_libxc.f90:(.text+0x2f5): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_name_'
> xc_libxc.f90:(.text+0x325): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_kind_'
> xc_libxc.f90:(.text+0x8da): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0xb15): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0xcc5): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_end_'
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc.o): 
> In function `xc_libxc_mp_libxc_lsd_info_':
> xc_libxc.f90:(.text+0xf77): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_init_'
> xc_libxc.f90:(.text+0xf90): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_get_info_'
> xc_libxc.f90:(.text+0xfbf): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_name_'
> xc_libxc.f90:(.text+0xfef): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_kind_'
> xc_libxc.f90:(.text+0x15a4): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0x17fe): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0x19ae): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_end_'
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc.o): 
> In function `xc_libxc_mp_libxc_lda_eval_':
> xc_libxc.f90:(.text+0x1ee8): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_init_'
> xc_libxc.f90:(.text+0x1f01): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_get_info_'
> xc_libxc.f90:(.text+0x2739): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0x2e0b): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0x32b2): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0x3b32): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_end_'
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc.o): 
> In function `xc_libxc_mp_libxc_lsd_eval_':
> xc_libxc.f90:(.text+0x40c4): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_init_'
> xc_libxc.f90:(.text+0x40dd): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_get_info_'
> xc_libxc.f90:(.text+0x512e): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0x5e66): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0x6d37): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0x8493): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_end_'
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc.o): 
> In function `xc_libxc_mp_libxc_lda_calc_':
> xc_libxc.f90:(.text+0x85b3): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_init_'
> xc_libxc.f90:(.text+0x85cc): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_get_info_'
> xc_libxc.f90:(.text+0x8616): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0x8700): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_exc_'
> xc_libxc.f90:(.text+0x8848): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_vxc_'
> xc_libxc.f90:(.text+0x8988): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_exc_vxc_'
> xc_libxc.f90:(.text+0x8b26): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_fxc_'
> xc_libxc.f90:(.text+0x8c60): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_exc_vxc_'
> xc_libxc.f90:(.text+0x8c9e): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_fxc_'
> xc_libxc.f90:(.text+0x8e8c): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_kxc_'
> xc_libxc.f90:(.text+0x8fed): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_'
> xc_libxc.f90:(.text+0x92c0): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_exc_'
> xc_libxc.f90:(.text+0x94b2): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_vxc_'
> xc_libxc.f90:(.text+0x970e): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_vxc_'
> xc_libxc.f90:(.text+0x97dd): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_exc_vxc_'
> xc_libxc.f90:(.text+0x9ab3): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_vxc_'
> xc_libxc.f90:(.text+0x9b30): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_fxc_'
> xc_libxc.f90:(.text+0x9bb6): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_exc_vxc_'
> xc_libxc.f90:(.text+0x9c37): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_fxc_'
> xc_libxc.f90:(.text+0x9f17): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_vxc_'
> xc_libxc.f90:(.text+0x9f94): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_fxc_'
> xc_libxc.f90:(.text+0xa067): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_exc_vxc_'
> xc_libxc.f90:(.text+0xa0e8): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_fxc_'
> xc_libxc.f90:(.text+0xa603): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_exc_'
> xc_libxc.f90:(.text+0xa91f): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_vxc_'
> xc_libxc.f90:(.text+0xad45): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_vxc_'
> xc_libxc.f90:(.text+0xae4d): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_exc_vxc_'
> xc_libxc.f90:(.text+0xb2dd): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_vxc_'
> xc_libxc.f90:(.text+0xb3cf): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_fxc_'
> xc_libxc.f90:(.text+0xb502): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_'
> xc_libxc.f90:(.text+0xbb87): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_vxc_'
> xc_libxc.f90:(.text+0xbc79): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_fxc_'
> xc_libxc.f90:(.text+0xbdf9): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_'
> xc_libxc.f90:(.text+0xc544): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_end_'
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc.o): 
> In function `xc_libxc_mp_libxc_lsd_calc_':
> xc_libxc.f90:(.text+0xc607): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_init_'
> xc_libxc.f90:(.text+0xc620): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_get_info_'
> xc_libxc.f90:(.text+0xc66a): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_family_'
> xc_libxc.f90:(.text+0xc7d9): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_exc_'
> xc_libxc.f90:(.text+0xc9a6): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_vxc_'
> xc_libxc.f90:(.text+0xcbbd): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_exc_vxc_'
> xc_libxc.f90:(.text+0xce32): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_fxc_'
> xc_libxc.f90:(.text+0xd0ad): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_exc_vxc_'
> xc_libxc.f90:(.text+0xd0da): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_fxc_'
> xc_libxc.f90:(.text+0xd45b): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_kxc_'
> xc_libxc.f90:(.text+0xd761): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_lda_'
> xc_libxc.f90:(.text+0xdd84): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_exc_'
> xc_libxc.f90:(.text+0xe098): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_vxc_'
> xc_libxc.f90:(.text+0xe556): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_vxc_'
> xc_libxc.f90:(.text+0xe614): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_exc_vxc_'
> xc_libxc.f90:(.text+0xeb4c): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_vxc_'
> xc_libxc.f90:(.text+0xebb8): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_fxc_'
> xc_libxc.f90:(.text+0xec2d): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_exc_vxc_'
> xc_libxc.f90:(.text+0xec9d): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_fxc_'
> xc_libxc.f90:(.text+0xf7cb): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_vxc_'
> xc_libxc.f90:(.text+0xf837): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_fxc_'
> xc_libxc.f90:(.text+0xf8f9): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_exc_vxc_'
> xc_libxc.f90:(.text+0xf969): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_gga_fxc_'
> xc_libxc.f90:(.text+0x10901): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_exc_'
> xc_libxc.f90:(.text+0x10e00): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_vxc_'
> xc_libxc.f90:(.text+0x115f9): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_vxc_'
> xc_libxc.f90:(.text+0x116df): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_exc_vxc_'
> xc_libxc.f90:(.text+0x11f42): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_vxc_'
> xc_libxc.f90:(.text+0x12012): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_fxc_'
> xc_libxc.f90:(.text+0x12123): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_'
> xc_libxc.f90:(.text+0x13ac3): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_vxc_'
> xc_libxc.f90:(.text+0x13b93): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_fxc_'
> xc_libxc.f90:(.text+0x13cf1): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_mgga_'
> xc_libxc.f90:(.text+0x15770): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_end_'
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc_wrap.o): 
> In function `xc_libxc_wrap_mp_xc_libxc_wrap_info_refs_':
> xc_libxc_wrap.f90:(.text+0xb5): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_references_'
> xc_libxc_wrap.f90:(.text+0xe4): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_reference_get_ref_'
> xc_libxc_wrap.f90:(.text+0x144): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_reference_get_doi_'
> xc_libxc_wrap.f90:(.text+0x58a): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_n_ext_params_'
> xc_libxc_wrap.f90:(.text+0x773): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_ext_params_description_'
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc_wrap.o): 
> In function `xc_libxc_wrap_mp_xc_libxc_wrap_functional_get_number_':
> xc_libxc_wrap.f90:(.text+0xea0): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_functional_get_number_'
> xc_libxc_wrap.f90:(.text+0xf01): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_functional_get_number_'
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc_wrap.o): 
> In function `xc_libxc_wrap_mp_xc_libxc_wrap_needs_laplace_':
> xc_libxc_wrap.f90:(.text+0x1129): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_init_'
> xc_libxc_wrap.f90:(.text+0x113c): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_get_info_'
> xc_libxc_wrap.f90:(.text+0x1150): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_flags_'
> xc_libxc_wrap.f90:(.text+0x1179): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_end_'
> /home/chp071/Codes/cp2k-5.1/lib/Linux-ia64-intel_xc404/popt/libcp2kxc.a(xc_libxc_wrap.o): 
> In function `xc_libxc_wrap_mp_xc_libxc_wrap_functional_set_params_':
> xc_libxc_wrap.f90:(.text+0x11fb): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_n_ext_params_'
> xc_libxc_wrap.f90:(.text+0x139e): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_set_ext_params_'
> xc_libxc_wrap.f90:(.text+0x160d): undefined reference to 
> `xc_f03_lib_m_mp_xc_f03_func_info_get_flags_'
> make[3]: *** 
> [/home/chp071/Codes/cp2k-5.1/exe/Linux-ia64-intel_xc404/cp2k.popt] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [popt] Error 2
> make: *** [all] Error 2
>
> It seems to me that there was a linking issue with the libxc, but I 
> couldn't figure out the problem. Could you please help me with this problem?
> Below is my arch file:
>
> LIBXC = /home/chp071/Codes/install-libxc-4.0.4
> LIBINT = /home/chp071/Codes/install-libint-1.1.4/
> FFTW3 = /opt/fftw/3.3.4/intel/openmpi_ib
> MKLROOT = /opt/intel/composer_xe_2013_sp1.2.144/mkl
> INTEL_INC=$(MKLROOT)/include
>
>
> CC       = icc
> CPP      = /lib/cpp
>
> FC       = mpifort -FR
> FC_fixed = mpifort -FI
> LD       = mpifort
>
> AR       = /usr/bin/ar -r
>
>
>
> DFLAGS   = -D__INTEL -D__FFTSG -D__parallel -D__BLACS -D__SCALAPACK 
> -D__LIBINT -D__LIBXC
>
> CPPFLAGS = -C $(DFLAGS) -P -traditional -I$(LIBXC)/include
> FCFLAGS  = -O0 -xHost -pc64 -unroll -heap-arrays 64  -I$(LIBINT)/include 
> -I$(LIBXC)/include
>
> LDFLAGS  = $(FCFLAGS) -L$(HOME)/lib -L$(MKLROOT)/lib/intel64 
> -L$(LIBINT)/lib -L$(LIBXC)/lib
> LDFLAGS_C  = $(FCFLAGS) -L$(HOME)/lib -L$(MKLROOT)/lib/intel64 -nofor_main 
> -L$(LIBINT)/lib -L$(LIBXC)/lib
>
> FCFLAGS2 = $(DFLAGS) -O0 -heap-arrays 64 -fpp -free
>
> LIBS     = $(FFTW3)/lib/libfftw3.a \
>            $(MKLROOT)/lib/intel64/libmkl_scalapack_lp64.a \
>            -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a \
>            $(MKLROOT)/lib/intel64/libmkl_core.a \
>            $(MKLROOT)/lib/intel64/libmkl_sequential.a \
>            -Wl,--end-group \
>            $(MKLROOT)/lib/intel64/libmkl_blacs_intelmpi_lp64.a \
>            -lpthread\
>            $(LIBINT)/lib/libderiv.a\
>            $(LIBINT)/lib/libint.a\
>            $(LIBXC)/lib/libxcf90.a\
>            $(LIBXC)/lib/libxc.a
>
> OBJECTS_ARCHITECTURE = machine_intel.o
>
> hfx_screening_methods.o: hfx_screening_methods.F
>         $(FC) -c $(FCFLAGS2) $<
>
>
> Thanks,
> Huy
>
> On Tuesday, February 6, 2018 at 8:46:58 AM UTC-8, Andreas Glöss wrote:
>>
>> Dear CP2K users and developers,
>>
>> Since we got several requests for LIBXC-4.0 support for the current 
>> release of CP2K (5.1), a patch has been prepared (Thanks to Axel Kohlmeyer).
>> You can fetch the patch directly from here:
>>
>>
>> https://www.cp2k.org/static/downloads/patches/patch_cp2k-5.1_libxc-4.0.4-support.diff
>>
>> To apply the patch follow this procedure:
>>
>>    - Download and compile LIBXC-4.0 (see eg.: 
>>    http://octopus-code.org/wiki/Libxc_4.0.4)
>>    - Checkout CP2K-5.1: 
>>    svn checkout -r 18095 http://
>>    svn.code.sf.net/p/cp2k/code/branches/cp2k-5_1-branch/cp2k cp2k-5.1
>>    - Change directory: 
>>    cd cp2k-5.1
>>    - Get patch: 
>>    wget https://
>>    www.cp2k.org/static/downloads/patches/patch_cp2k-5.1_libxc-4.0.4-support.diff
>>    - Apply patch: 
>>    patch -p 0 < patch_cp2k-5.1_libxc-4.0.4-support.diff
>>    - Adapt your ARCH-file:
>>       - Change the DFLAGS, eg. 
>>       DFLAGS += -D__LIBXC 
>>       - Change LIBXCs include directory in CFLAGS and FCFLAGS, eg. 
>>       CFLAGS += -I'/my_local_libxc4_installation/include'
>>       - Change LIBXCs library directory in LDFLAGS, eg. 
>>       LDFLAGS += -L'/my_local_libxc4_installation/lib'
>>       Note, on some architectures this directory is called lib64.
>>       - Change LIBXCs interface in LIBS, eg. 
>>       LIBS += -lxcf03 -lxc
>>       
>>       - Compile as usual ...
>>
>> Please note that this patch comes with some features and drawbacks listed 
>> below.
>>
>> Features:
>>
>>    - &LIBXC section is repeatable.
>>    - Only one functional per &LIBXC section.
>>    - Optional PARAMETERS and SCALE keywords are private to the 
>>    functional - formerly they could have been mixed.
>>    - A lot of bug-fixes and new functionals.
>>
>> Drawbacks:
>>
>>    - New input is not backward compatible.
>>
>>
>> To visualize the input changes, here is one example (first old, followed 
>> by new syntax):
>>
>> &XC_FUNCTIONAL
>>   &LIBXC
>>     FUNCTIONAL XC_GGA_X_PBE XC_GGA_C_PBE
>>   &END LIBXC
>> &END XC_FUNCTIONAL
>>
>> &XC_FUNCTIONAL
>>   &LIBXC
>>     FUNCTIONAL XC_GGA_X_PBE
>>   &END LIBXC
>>   &LIBXC
>>     FUNCTIONAL XC_GGA_C_PBE
>>   &END LIBXC
>> &END XC_FUNCTIONAL 
>>
>>
>> Best regards and hope this is useful to others,
>> Andreas
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20180222/ff9b0372/attachment.htm>


More information about the CP2K-user mailing list