[CP2K-user] installation problem cp2k-8.1 with libxc-5.1.3

Samir ABDELOUAHED abdeloua... at gmail.com
Sun Apr 25 14:37:36 UTC 2021


Hi Frederick,
I am really confused....I am getting back the same error message:
/home/samir/CP2K/cp2k-8.1/src/xc/xc_libxc.F:1648:66:

 1648 |                   CALL xc_f03_lda_exc(xc_func, 1, rhov(1, 1), exc)
      |                                                                  1
Error: Type mismatch in argument ‘np’ at (1); passed INTEGER(4) to 
INTEGER(8)
/home/samir/CP2K/cp2k-8.1/src/xc/xc_libxc.F:1661:73:

I compiled the libxc as you suggested. My Linux-x86-64-gfortran.psmp is:

# Tested with: GFortran 8.3.0, MPICH 3.3, LAPACK 3.8.0, ScaLAPACK 2.0.2, 
FFTW 3.3,
#              Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15, ELPA 2019.05.001, 
PLUMED 2.5.2, SPGLIB 1.12.2
# Author: Matthias Krack (matthi... at psi.ch, PSI, August 2020)

CC          = mpicc
FC          = mpif90
LD          = mpif90
AR          = ar -r

include /home/samir/CP2K/cp2k-8.1/plumed2-2.7.1/src/lib/Plumed.inc
EXTERNAL_OBJECTS=$(PLUMED_STATIC_DEPENDENCIES)
#ELPA_VER    = 2019.05.001
#ELPA_INC    = 
$(MPI_PATH)/elpa/$(ELPA_VER)-openmp/include/elpa_openmp-$(ELPA_VER)
#ELPA_LIB    = $(MPI_PATH)/elpa/$(ELPA_VER)-openmp/lib

FFTW_INC   = /usr/include
FFTW_LIB   = /usr/lib/x86_64-linux-gnu

LIBINT_INC  = /home/samir/CP2K/cp2k-8.1/libint-v2.6.0-cp2k-lmax-4/include
LIBINT_LIB  = /home/samir/CP2K/cp2k-8.1/libint-v2.6.0-cp2k-lmax-4/lib

LIBXC_INC   = /opt/etsf/libxc-5.1.3/include
LIBXC_LIB   = /opt/etsf/libxc-5.1.3/lib

LIBXSMM_INC = /opt/etsf/libxsmm-master/include
LIBXSMM_LIB = /opt/etsf/libxsmm-master/lib

SPGLIB_INC  = /usr/local/include
SPGLIB_LIB  = /usr/local/lib

LIBPATH = /usr/lib/x86_64-linux-gnu

MPI_LIB = /usr/lib/x86_64-linux-gnu
MPI_INC = /usr/include/mpi
CFLAGS      = -O2 -fopenmp -g -mtune=native
#DFLAGS      = -D__ELPA
DFLAGS     += -D__FFTW3
DFLAGS     += -D__LIBINT
DFLAGS     += -D__LIBXC
DFLAGS     += -D__LIBXSMM
DFLAGS     += -D__MPI_VERSION=3
DFLAGS     += -D__PLUMED2
DFLAGS     += -D__SPGLIB
DFLAGS     += -D__parallel
DFLAGS     += -D__SCALAPACK

FCFLAGS     = $(CFLAGS) $(DFLAGS)
FCFLAGS    += -ffree-form
FCFLAGS    += -ffree-line-length-none
FCFLAGS    += -ftree-vectorize
FCFLAGS    += -funroll-loops
FCFLAGS    += -std=f2008
#FCFLAGS    += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules
FCFLAGS    += -I$(FFTW_INC) -I$(LIBINT_INC) -I$(LIBXC_INC) -I$(LIBXSMM_INC) 
-I$(MPI_INC)

LDFLAGS     = $(FCFLAGS) -static-libgfortran

LIBS        = $(PLUMED_DEPENDENCIES) -lz -lmpi_cxx -lrt -lgsl -lgslcblas
LIBS       += $(LIBXC_LIB)/libxcf03.a
LIBS       += $(LIBXC_LIB)/libxc.a
LIBS       += $(LIBINT_LIB)/libint2.a
LIBS       += $(SPGLIB_LIB)/libsymspg.a
LIBS       += $(FFTW_LIB)/libfftw3.a
LIBS       += $(FFTW_LIB)/libfftw3_threads.a
LIBS       += $(LIBXSMM_LIB)/libxsmmf.a
LIBS       += $(LIBXSMM_LIB)/libxsmm.a
LIBS       += -L$(MPI_LIB) -lscalapack-openmpi -lmpi_usempif08 
-lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
LIBS       += $(LIBPATH)/lapack/liblapack.a
LIBS       += $(LIBPATH)/blas/libblas.a
LIBS       += -ldl -lpthread -lstdc++
I don't know I may have something wrong in the makefile...
Thanks a lot,
Samir
On Sunday, 25 April 2021 at 14:31:55 UTC+1 Frederick Stein wrote:

>
>
> Dear Samir,
>
> The toolchain of the master trunk includes libXC 5.1.3. Use either that 
> one or 
> http://www.tddft.org/programs/libxc/down.php?file=5.1.3/libxc-5.1.3.tar.gz 
> or https://www.cp2k.org/static/downloads/libxc-5.1.3.tar.gz .
> Best,
> Frederick
> abde... at gmail.com schrieb am Sonntag, 25. April 2021 um 15:18:36 
> UTC+2:
>
>> Dear Frederick,
>> No, I don't have a special interest in libxc 6.0. Could you please send 
>> me the link for the libXC 5.1.3 trunk version.
>> Many many thanks,
>> Samir
>>
>> On Sunday, 25 April 2021 at 13:58:33 UTC+1 Frederick Stein wrote:
>>
>>> Dear Samir,
>>>
>>> For now, we are not interested in moving to LibXC 6.0 because there is 
>>> for now no official release. I would recommend to use LibXC 5.1.3 with the 
>>> trunk version of CP2K if functionalities of LibXC 5.x are requested. Do you 
>>> really need LibC 6.0 instead of LibXC 5.x?
>>>
>>> I have downloaded and compiled the trunk version of LibXC and I have the 
>>> .mod file. I have compiled the LibXC master branch with "autoreconf -i && 
>>> ./configure --prefix=PATH/TO/LIBXC && make && make check && make install" 
>>> without any additional flags. So, LibXC should provide the Fortran bindings 
>>> automatically. How are you compiling LibXC? If you are not doing anything 
>>> different than me, you have to ask the LibXC developers directly.
>>>
>>> Best,
>>> Frederick
>>>
>>> abde... at gmail.com schrieb am Sonntag, 25. April 2021 um 04:02:30 
>>> UTC+2:
>>>
>>>> Dear Frederick,
>>>> I downloaded a master version of libxc (6.0.0),tested it and installed 
>>>> it successfully.
>>>> when cp2k tries to link with it, it says:
>>>> /home/samir/CP2K/cp2k-8.1/src/xc/xc_libxc_wrap.F:34:7:
>>>>
>>>>    34 |    USE xc_f03_lib_m, ONLY: xc_f03_func_end, &
>>>>       |       1
>>>> Fatal Error: Cannot open module file ‘xc_f03_lib_m.mod’ for reading at 
>>>> (1): No such file or directory
>>>>
>>>> I thought that the problem may be that it could not find the .mod file 
>>>> in the include directory but it's not the case as this file does not exist 
>>>> anywhere in my system.
>>>> Is there a way to make the libxc produce that file?
>>>> Many many thanks for your help,
>>>> yours,
>>>> Samir
>>>>
>>>> On Saturday, 24 April 2021 at 06:29:31 UTC+1 Frederick Stein wrote:
>>>>
>>>>> Dear Samir,
>>>>>
>>>>> CP2K 8.1 does not work with LibXC 5.1.3 because of the interface 
>>>>> problem in xc_libxc.F you have found. In the trunk, it has been fixed. That 
>>>>> means if you have to stick to CP2K 8.1, you cannot use LibXC 5.x. If you 
>>>>> definitely need functionality from LibXC 5.x, download and compile the 
>>>>> trunk version (master branch) of LibXC or wait for the next CP2K release.
>>>>>
>>>>> Best,
>>>>> Frederick
>>>>>
>>>>> abde... at gmail.com schrieb am Samstag, 24. April 2021 um 03:38:56 
>>>>> UTC+2:
>>>>>
>>>>>> Hello every one,
>>>>>> I am compiling cp2k-8.1 with libxc-5.1.3. but when it comes to link 
>>>>>> with the libxc it crash with: 
>>>>>> /home/samir/CP2K/cp2k-8.1/src/xc/xc_libxc.F:1648:66:
>>>>>>
>>>>>>  1648 |                   CALL xc_f03_lda_exc(xc_func, 1, rhov(1, 1), 
>>>>>> exc)
>>>>>>       
>>>>>> |                                                                  1
>>>>>> Error: Type mismatch in argument ‘np’ at (1); passed INTEGER(4) to 
>>>>>> INTEGER(8)
>>>>>> /home/samir/CP2K/cp2k-8.1/src/xc/xc_libxc.F:1661:73:
>>>>>>
>>>>>>  1661 |                   CALL xc_f03_lda_vxc(xc_func, 1, rhov(1, 1), 
>>>>>> vrho(1, 1))
>>>>>>       
>>>>>> |                                                                         1
>>>>>> I tried changing npoints integer to integer(8) in xc_libxc.F but 
>>>>>> still have the same problem.
>>>>>>
>>>>>> I don't know whether the problem comes from the xc_libxc.F cp2k-8.1 
>>>>>> program or the libxc-5.1.3 programs.
>>>>>> I did not have such a problem when I was using cp2k-6.1 with 
>>>>>> libxc-4....
>>>>>> I am using mpif90 (gfortran wrapper)
>>>>>> Many many thanks,
>>>>>> Samir
>>>>>>
>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20210425/deb41fb0/attachment.htm>


More information about the CP2K-user mailing list