Problem in compiling CP2K 4.01 with LIBXC

David T amazing... at gmail.com
Tue Apr 4 18:23:48 UTC 2017


Dear all

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.
Indeed, as soon as I add the libxc option, the compiler complains producing 
several errors (at the bottom of the post)

If anyone can help or give me any advice in what I am doing wrong it would 
be extremely helpful.
(I tried with libxc 2.2.2 and 3.0 but nothing changed)

Many thanks
Davide

I am compiling V4.01 svn:17462  and I am using ifort version 15.0.3

this is my arch file:
#Define the correct path for the different variables
MKL=/ichec/packages/intel/2015.u3/composer_xe_2015.3.187/mkl
FFTW=/ichec/packages/fftw/intel_threads/3.3.4
XSMM=/ichec/home/users/davide/lib/xsmm-1.8-7
LIBINT=/ichec/home/users/davide/lib/libint-1.1.4/build
ELPA=/ichec/home/users/davide/lib/elpa-2016.05.004/build
ELPA_INC=/ichec/home/users/davide/lib/elpa-2016.05.004/build/include/elpa-2016.05.004/modules
LIBXC=/ichec/home/users/davide/lib/libxc-2.2.2/installed
#Define the compilers
CC       = mpiicc
CPP      = /lib/cpp
FC       = mpiifort
FC_fixed = mpiifort
LD       = mpiifort
AR       = /usr/bin/ar -r
#Modify the flags as reqired
DFLAGS   = -D__INTEL_COMPILER -D__MKL -D__FFTSG -D__parallel -D__BLACS 
-D__SCALAPACK -D__FFTW3 -D__LIBXSMM -D__LIBINT -D__ELPA3 -D__LIBXC 
CPPFLAGS = -C $(DFLAGS) -P -traditional -I$(FFTW)/include/ 
-I$(XSMM)/include -I$(ELPA_INC) -I$(LIBXC)/include
FCFLAGS  = -O2 -pc64 -unroll -heap-arrays 64 -I$(FFTW)/include 
-I$(XSMM)/include -openmp -openmp-threadprivate=compat -I$(ELPA_INC) 
-I$(LIBXC)/include
#verify if the path to the libraries is correct
LDFLAGS  = $(FCFLAGS) -L$(MKL)/lib/intel64 -L$(FFTW)/lib -L$(XSMM)/lib 
-L$(LIBINT)/lib
LDFLAGS_C  = $(LDFLAGS) -nofor_main 
#What Libraries 
LIBS     = -mkl -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 
-lmkl_intel_lp64 \
           -lmkl_intel_thread -lmkl_core -lm -lpthread  -lfftw3  
-lfftw3_threads -lxsmmf -lxsmm -lxsmmext  \
           -lderiv -lint -lstdc++ -L$(ELPA)/lib -lelpa -L$(LIBXC)/lib 
-lxcf90 -lxc 
#Not sure what this does but it works with and without
OBJECTS_ARCHITECTURE = machine_intel.o



Here the long list of errors that I cannot understand.


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 
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 ...
/*
^
xc_libxc_wrap.f90(27): error #5082: Syntax error, found INTEGER_CONSTANT 
'2012' when expecting one of: ( % [ . = =>
 Copyright (C) 2012 M.A.L. Marques, M. Oliveira
---------------^
xc_libxc_wrap.f90(27): error #5082: Syntax error, found END-OF-STATEMENT 
when expecting one of: , ]
 Copyright (C) 2012 M.A.L. Marques, M. Oliveira
-----------------------------------------------^
xc_libxc_wrap.f90(29): error #5082: Syntax error, found IDENTIFIER 
'PROGRAM' when expecting one of: ( % [ : . = =>
 This program is free software; you can redistribute it and/or modify
------^
xc_libxc_wrap.f90(29): error #5082: Syntax error, found IDENTIFIER 'CAN' 
when expecting one of: ( % [ : . = =>
 This program is free software; you can redistribute it and/or modify
------------------------------------^
xc_libxc_wrap.f90(30): error #5082: Syntax error, found IDENTIFIER 'UNDER' 
when expecting one of: ( % [ : . = =>
 it under the terms of the GNU Lesser General Public License as published by
----^
xc_libxc_wrap.f90(31): error #5082: Syntax error, found IDENTIFIER 'FREE' 
when expecting one of: ( % [ : . = =>
 the Free Software Foundation; either version 3 of the License, or
-----^
xc_libxc_wrap.f90(31): error #5082: Syntax error, found IDENTIFIER 
'VERSION' when expecting one of: ( % [ : . = =>
 the Free Software Foundation; either version 3 of the License, or
--------------------------------------^
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 ...
 (at your option) any later version.
-^
xc_libxc_wrap.f90(34): error #5082: Syntax error, found IDENTIFIER 
'PROGRAM' when expecting one of: ( % [ : . = =>
 This program is distributed in the hope that it will be useful,
------^
xc_libxc_wrap.f90(35): error #5082: Syntax error, found IDENTIFIER 
'WITHOUT' when expecting one of: ( % [ : . = =>
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-----^
xc_libxc_wrap.f90(35): error #5082: Syntax error, found IDENTIFIER 'EVEN' 
when expecting one of: ( % [ : . = =>
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-----------------------------------^
xc_libxc_wrap.f90(36): error #5082: Syntax error, found IDENTIFIER 'OR' 
when expecting one of: ( % [ : . = =>
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-----------------^
xc_libxc_wrap.f90(37): error #5082: Syntax error, found IDENTIFIER 'LESSER' 
when expecting one of: ( % [ : . = =>
 GNU Lesser General Public License for more details.
-----^
xc_libxc_wrap.f90(39): error #5082: Syntax error, found IDENTIFIER 'SHOULD' 
when expecting one of: ( % [ : . = =>
 You should have received a copy of the GNU Lesser General Public License
-----^
xc_libxc_wrap.f90(40): error #5082: Syntax error, found IDENTIFIER 'WITH' 
when expecting one of: ( % [ : . = =>
 along with this program; if not, write to the Free Software
-------^
xc_libxc_wrap.f90(40): error #5082: Syntax error, found IDENTIFIER 'NOT' 
when expecting one of: (
 along with this program; if not, write to the Free Software
-----------------------------^
xc_libxc_wrap.f90(41): error #5082: Syntax error, found ',' when expecting 
one of: ( % [ : . = =>
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-----------^
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 ...
*/
^
xc_libxc_wrap.f90(26): error #6274: This statement must not appear in the 
specification part of a module.
/*
^
xc_libxc_wrap.f90(51): error #6236: A specification statement cannot appear 
in the executable section.
  USE libxc_funcs_m,                   ONLY: XC_GGA_C_N12,&
--^
xc_libxc_wrap.f90(84): error #6236: A specification statement cannot appear 
in the executable section.
  USE kinds,                           ONLY: dp
--^
xc_libxc_wrap.f90(85): error #6236: A specification statement cannot appear 
in the executable section.
  USE xc_f90_lib_m,                    ONLY: xc_f90_func_end,&
--^
xc_libxc_wrap.f90(162): error #6236: A specification statement cannot 
appear in the executable section.
  USE base_hooks,                      ONLY: cp__a,&
--^
xc_libxc_wrap.f90(181): error #6236: A specification statement cannot 
appear in the executable section.
   IMPLICIT NONE
---^
xc_libxc_wrap.f90(182): error #6236: A specification statement cannot 
appear in the executable section.
   PRIVATE
---^
xc_libxc_wrap.f90(184): error #6236: A specification statement cannot 
appear in the executable section.
   CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'xc_libxc_wrap'
---^
xc_libxc_wrap.f90(186): error #6236: A specification statement cannot 
appear in the executable section.
   CHARACTER(LEN=*), PARAMETER, PUBLIC :: libxc_version = "2.2.2"
---^
xc_libxc_wrap.f90(188): error #6236: A specification statement cannot 
appear in the executable section.
   PUBLIC :: xc_f90_pointer_t
---^
xc_libxc_wrap.f90(189): error #6236: A specification statement cannot 
appear in the executable section.
   PUBLIC :: xc_f90_func_init, xc_f90_func_end
---^
xc_libxc_wrap.f90(667): catastrophic error: Too many errors, exiting
compilation aborted for xc_libxc_wrap.f90 (code 1)
make[3]: *** [xc_libxc_wrap.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all] Error 2
make[1]: *** [tmp] Error 2
make: *** [all] Error 2



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


More information about the CP2K-user mailing list