<div dir="ltr">Dear all<br><br>I managed to have CP2K compiled with mkl, fftw3, xsmm, elap and libint. I would like to add also libxc but somethin is going wrong.<br>Indeed, as soon as I add the libxc option, the compiler complains producing several errors (at the bottom of the post)<br><br>If anyone can help or give me any advice in what I am doing wrong it would be extremely helpful.<br>(I tried with libxc 2.2.2 and 3.0 but nothing changed)<br><br>Many thanks<br>Davide<br><br>I am compiling V4.01 svn:17462  and I am using ifort version 15.0.3<br><br>this is my arch file:<br>#Define the correct path for the different variables<br>MKL=/ichec/packages/intel/2015.u3/composer_xe_2015.3.187/mkl<br>FFTW=/ichec/packages/fftw/intel_threads/3.3.4<br>XSMM=/ichec/home/users/davide/lib/xsmm-1.8-7<br>LIBINT=/ichec/home/users/davide/lib/libint-1.1.4/build<br>ELPA=/ichec/home/users/davide/lib/elpa-2016.05.004/build<br>ELPA_INC=/ichec/home/users/davide/lib/elpa-2016.05.004/build/include/elpa-2016.05.004/modules<br>LIBXC=/ichec/home/users/davide/lib/libxc-2.2.2/installed<br>#Define the compilers<br>CC       = mpiicc<br>CPP      = /lib/cpp<br>FC       = mpiifort<br>FC_fixed = mpiifort<br>LD       = mpiifort<br>AR       = /usr/bin/ar -r<br>#Modify the flags as reqired<br>DFLAGS   = -D__INTEL_COMPILER -D__MKL -D__FFTSG -D__parallel -D__BLACS -D__SCALAPACK -D__FFTW3 -D__LIBXSMM -D__LIBINT -D__ELPA3 -D__LIBXC <br>CPPFLAGS = -C $(DFLAGS) -P -traditional -I$(FFTW)/include/ -I$(XSMM)/include -I$(ELPA_INC) -I$(LIBXC)/include<br>FCFLAGS  = -O2 -pc64 -unroll -heap-arrays 64 -I$(FFTW)/include -I$(XSMM)/include -openmp -openmp-threadprivate=compat -I$(ELPA_INC) -I$(LIBXC)/include<br>#verify if the path to the libraries is correct<br>LDFLAGS  = $(FCFLAGS) -L$(MKL)/lib/intel64 -L$(FFTW)/lib -L$(XSMM)/lib -L$(LIBINT)/lib<br>LDFLAGS_C  = $(LDFLAGS) -nofor_main <br>#What Libraries <br>LIBS     = -mkl -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_intel_lp64 \<br>           -lmkl_intel_thread -lmkl_core -lm -lpthread  -lfftw3  -lfftw3_threads -lxsmmf -lxsmm -lxsmmext  \<br>           -lderiv -lint -lstdc++ -L$(ELPA)/lib -lelpa -L$(LIBXC)/lib -lxcf90 -lxc <br>#Not sure what this does but it works with and without<br>OBJECTS_ARCHITECTURE = machine_intel.o<br><br><br><br>Here the long list of errors that I cannot understand.<br><br><br>mpiifort -c -O2 -pc64 -unroll -heap-arrays 64 -I/ichec/packages/fftw/intel_threads/3.3.4/include -I/ichec/home/users/davide/lib/xsmm-1.8-7/include -openmp -openmp-threadprivate=compat -I/ichec/home/users/davide/lib/elpa-2016.05.004/build/include/elpa-2016.05.004/modules -I/ichec/home/users/davide/lib/libxc-2.2.2/installed/include xc_libxc_wrap.f90 <br>xc_libxc_wrap.f90(26): error #5082: Syntax error, found '/' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...<br>/*<br>^<br>xc_libxc_wrap.f90(27): error #5082: Syntax error, found INTEGER_CONSTANT '2012' when expecting one of: ( % [ . = =><br> Copyright (C) 2012 M.A.L. Marques, M. Oliveira<br>---------------^<br>xc_libxc_wrap.f90(27): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: , ]<br> Copyright (C) 2012 M.A.L. Marques, M. Oliveira<br>-----------------------------------------------^<br>xc_libxc_wrap.f90(29): error #5082: Syntax error, found IDENTIFIER 'PROGRAM' when expecting one of: ( % [ : . = =><br> This program is free software; you can redistribute it and/or modify<br>------^<br>xc_libxc_wrap.f90(29): error #5082: Syntax error, found IDENTIFIER 'CAN' when expecting one of: ( % [ : . = =><br> This program is free software; you can redistribute it and/or modify<br>------------------------------------^<br>xc_libxc_wrap.f90(30): error #5082: Syntax error, found IDENTIFIER 'UNDER' when expecting one of: ( % [ : . = =><br> it under the terms of the GNU Lesser General Public License as published by<br>----^<br>xc_libxc_wrap.f90(31): error #5082: Syntax error, found IDENTIFIER 'FREE' when expecting one of: ( % [ : . = =><br> the Free Software Foundation; either version 3 of the License, or<br>-----^<br>xc_libxc_wrap.f90(31): error #5082: Syntax error, found IDENTIFIER 'VERSION' when expecting one of: ( % [ : . = =><br> the Free Software Foundation; either version 3 of the License, or<br>--------------------------------------^<br>xc_libxc_wrap.f90(32): error #5082: Syntax error, found '(' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...<br> (at your option) any later version.<br>-^<br>xc_libxc_wrap.f90(34): error #5082: Syntax error, found IDENTIFIER 'PROGRAM' when expecting one of: ( % [ : . = =><br> This program is distributed in the hope that it will be useful,<br>------^<br>xc_libxc_wrap.f90(35): error #5082: Syntax error, found IDENTIFIER 'WITHOUT' when expecting one of: ( % [ : . = =><br> but WITHOUT ANY WARRANTY; without even the implied warranty of<br>-----^<br>xc_libxc_wrap.f90(35): error #5082: Syntax error, found IDENTIFIER 'EVEN' when expecting one of: ( % [ : . = =><br> but WITHOUT ANY WARRANTY; without even the implied warranty of<br>-----------------------------------^<br>xc_libxc_wrap.f90(36): error #5082: Syntax error, found IDENTIFIER 'OR' when expecting one of: ( % [ : . = =><br> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>-----------------^<br>xc_libxc_wrap.f90(37): error #5082: Syntax error, found IDENTIFIER 'LESSER' when expecting one of: ( % [ : . = =><br> GNU Lesser General Public License for more details.<br>-----^<br>xc_libxc_wrap.f90(39): error #5082: Syntax error, found IDENTIFIER 'SHOULD' when expecting one of: ( % [ : . = =><br> You should have received a copy of the GNU Lesser General Public License<br>-----^<br>xc_libxc_wrap.f90(40): error #5082: Syntax error, found IDENTIFIER 'WITH' when expecting one of: ( % [ : . = =><br> along with this program; if not, write to the Free Software<br>-------^<br>xc_libxc_wrap.f90(40): error #5082: Syntax error, found IDENTIFIER 'NOT' when expecting one of: (<br> along with this program; if not, write to the Free Software<br>-----------------------------^<br>xc_libxc_wrap.f90(41): error #5082: Syntax error, found ',' when expecting one of: ( % [ : . = =><br> Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA<br>-----------^<br>xc_libxc_wrap.f90(42): error #5082: Syntax error, found '*' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...<br>*/<br>^<br>xc_libxc_wrap.f90(26): error #6274: This statement must not appear in the specification part of a module.<br>/*<br>^<br>xc_libxc_wrap.f90(51): error #6236: A specification statement cannot appear in the executable section.<br>  USE libxc_funcs_m,                   ONLY: XC_GGA_C_N12,&<br>--^<br>xc_libxc_wrap.f90(84): error #6236: A specification statement cannot appear in the executable section.<br>  USE kinds,                           ONLY: dp<br>--^<br>xc_libxc_wrap.f90(85): error #6236: A specification statement cannot appear in the executable section.<br>  USE xc_f90_lib_m,                    ONLY: xc_f90_func_end,&<br>--^<br>xc_libxc_wrap.f90(162): error #6236: A specification statement cannot appear in the executable section.<br>  USE base_hooks,                      ONLY: cp__a,&<br>--^<br>xc_libxc_wrap.f90(181): error #6236: A specification statement cannot appear in the executable section.<br>   IMPLICIT NONE<br>---^<br>xc_libxc_wrap.f90(182): error #6236: A specification statement cannot appear in the executable section.<br>   PRIVATE<br>---^<br>xc_libxc_wrap.f90(184): error #6236: A specification statement cannot appear in the executable section.<br>   CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'xc_libxc_wrap'<br>---^<br>xc_libxc_wrap.f90(186): error #6236: A specification statement cannot appear in the executable section.<br>   CHARACTER(LEN=*), PARAMETER, PUBLIC :: libxc_version = "2.2.2"<br>---^<br>xc_libxc_wrap.f90(188): error #6236: A specification statement cannot appear in the executable section.<br>   PUBLIC :: xc_f90_pointer_t<br>---^<br>xc_libxc_wrap.f90(189): error #6236: A specification statement cannot appear in the executable section.<br>   PUBLIC :: xc_f90_func_init, xc_f90_func_end<br>---^<br>xc_libxc_wrap.f90(667): catastrophic error: Too many errors, exiting<br>compilation aborted for xc_libxc_wrap.f90 (code 1)<br>make[3]: *** [xc_libxc_wrap.o] Error 1<br>make[3]: *** Waiting for unfinished jobs....<br>make[2]: *** [all] Error 2<br>make[1]: *** [tmp] Error 2<br>make: *** [all] Error 2<br><br><br><br></div>