compilation error in yambo 4.5.2

Having trouble compiling the Yambo source? Using an unusual architecture? Problems with the "configure" script? Problems in GPU architectures? This is the place to look.

Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, andrea marini, Daniele Varsano, Conor Hogan, Nicola Spallanzani

Forum rules
If you have trouble compiling Yambo, please make sure to list:
(1) the compiler (vendor and release: e.g. intel 10.1)
(2) the architecture (e.g. 64-bit IBM SP5)
(3) if the problems occur compiling in serial/in parallel
(4) the version of Yambo (revision number/major release version)
(5) the relevant compiler error message
Post Reply
f.chemam
Posts: 2
Joined: Tue Sep 08, 2020 6:05 pm

compilation error in yambo 4.5.2

Post by f.chemam » Tue Sep 08, 2020 6:34 pm

Dear Sir,
ive compiled the yambo4.5.,with ifort and mpi, but the error still her, ive installed LIBxc, netcdf, m4,zlib,hdf5,curl...
./configure CC=icc FC=ifort

#
# - COMPILERS -
#
# FC kind = intel
# MPI kind= Intel(R) MPI Library 2017 Update 4 for Linux* OS
#
# [ CPP ] icc -E -ansi -D_MPI -D_FFTW -D_TIMING
# [ FPP ] fpp -free -P -D_MPI -D_FFTW -D_TIMING
# [ CC ] mpiicc -O2 -D_C_US -D_FORTRAN_US
# [ FC ] mpiifort -assume bscc -O3 -g -ip
# [ FCUF] -assume bscc -O0 -g
# [ F77 ] mpiifort -assume bscc -O3 -g -ip
# [ F77U] -assume bscc -O0 -g
# [Cmain] -nofor_main

but when i run make all


make[6]: Entering directory '/home/chemam/Downloads/yambo-4.5.2/lib/libxc/libxc-2.2.3/src'
/bin/bash ../libtool --tag=CC --mode=compile mpiicc -DHAVE_CONFIG_H -I. -I.. -O2 -D_C_US -D_FORTRAN_US -MT special_functions.lo -MD -MP -MF .deps/special_functions.Tpo -c -o special_functions.lo special_functions.c
libtool: compile: mpiicc -DHAVE_CONFIG_H -I. -I.. -O2 -D_C_US -D_FORTRAN_US -MT special_functions.lo -MD -MP -MF .deps/special_functions.Tpo -c special_functions.c -o special_functions.o
In file included from util.h(22),
from special_functions.c(21):
/opt/intel/compilers_and_libraries_2017.5.239/linux/compiler/include/math.h(1300): error: identifier "_LIB_VERSION_TYPE" is undefined
_LIBIMF_EXT _LIB_VERSIONIMF_TYPE _LIBIMF_PUBVAR _LIB_VERSIONIMF;
^

compilation aborted for special_functions.c (code 2)
Makefile:937: recipe for target 'special_functions.lo' failed
make[6]: *** [special_functions.lo] Error 1
make[6]: Leaving directory '/home/chemam/Downloads/yambo-4.5.2/lib/libxc/libxc-2.2.3/src'
Makefile:536: recipe for target 'all' failed
make[5]: *** [all] Error 2
make[5]: Leaving directory '/home/chemam/Downloads/yambo-4.5.2/lib/libxc/libxc-2.2.3/src'
Makefile:467: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/chemam/Downloads/yambo-4.5.2/lib/libxc/libxc-2.2.3'
Makefile:376: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/chemam/Downloads/yambo-4.5.2/lib/libxc/libxc-2.2.3'
Makefile:48: recipe for target 'package-ready-stamp' failed
make[2]: *** [package-ready-stamp] Error 2
make[2]: Leaving directory '/home/chemam/Downloads/yambo-4.5.2/lib/libxc'
Makefile:150: recipe for target 'ext-libs' failed
make[1]: *** [ext-libs] Error 2
make[1]: Leaving directory '/home/chemam/Downloads/yambo-4.5.2'
yambo build failed

the same error is when i run in the dierctory of quantum espresso the make yambo.
best regards

User avatar
Daniele Varsano
Posts: 3816
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: compilation error in yambo 4.5.2

Post by Daniele Varsano » Wed Sep 09, 2020 8:20 am

Dear f.chemam ,
please sign your posts with your name and affiliation, this is a rule of the forum and you can do once for all by filling the signature in your user profile.
The error seems related with the compiler you are using, and it is possible that this version of intel compiler is not suitable for your OS.
A google search of your error bring to this:
https://unix.stackexchange.com/question ... r-in-linux

Maybe you need to update your compiler or use another compiler e.g. gfortran.

Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

andrea.ferretti
Posts: 206
Joined: Fri Jan 31, 2014 11:13 am

Re: compilation error in yambo 4.5.2

Post by andrea.ferretti » Wed Sep 09, 2020 10:59 am

Dear f.chemam,
besides Daniele's suggestion, if you have a version of libxc compiled externally, you can try to pass it to yambo (thereby avoiding internal compilation, which
fails in your case). This is done invoking configure as

Code: Select all

./configure [other flags]  --with-libxc-path=<path-to-libxc-dir>
where path-to-libxc-dir is the folder containing ./lib ./include and ./bin for libxc.

Alternatively, one can set the three vars:

Code: Select all

  --with-libxc-libs=<libs>             Use libxc libraries <libs>
  --with-libxc-libdir=<path>          Path to the libxc lib directory
  --with-libxc-includedir=<path>   Path to the libxc include directory
This would work if the problem is libxc related. If the failure is more general, you need to go back to Daniele's point.
Andrea
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it

f.chemam
Posts: 2
Joined: Tue Sep 08, 2020 6:05 pm

Re: compilation error in yambo 4.5.2

Post by f.chemam » Thu Sep 10, 2020 7:35 pm

Thank you very for your help
im arrived to this stage, im blocked in this situation

/Downloads/yambo-master$ make all
for target in yambo ypp a2y p2y yambo_ph ypp_ph yambo_rt ypp_rt yambo_nl ypp_nl yambo_kerr ; do rm -f "/home/chemam/Downloads/yambo-master/bin/$target" ; make $target; if test ! -f "/home/chemam/Downloads/yambo-master/bin/$target" ; then echo "$target build failed"; break;fi ; done
make[1]: Entering directory '/home/chemam/Downloads/yambo-master'

>>>[Making external_c]<<<
<command-line>:0:15: warning: ISO C99 requires whitespace after the macro name
make[2]: Entering directory '/home/chemam/Downloads/yambo-master/src/external_c'
ar: `u' modifier ignored since `D' is the default (see `U')
ar: creating libexternal_c.a
make[2]: Leaving directory '/home/chemam/Downloads/yambo-master/src/external_c'

>>>[Making modules]<<<
<command-line>:0:12: warning: ISO C99 requires whitespace after the macro name
make[2]: Entering directory '/home/chemam/Downloads/yambo-master/src/modules'
mod_xc_functionals.f90(31): error #7013: This module file was not generated by any release of this compiler. [XC_F90_LIB_M]
use xc_f90_lib_m
-----^
mod_xc_functionals.f90(84): error #7013: This module file was not generated by any release of this compiler. [LIBXC_FUNCS_M]
use libxc_funcs_m, ONLY: XC_LDA_X, XC_LDA_C_PW
---------^
mod_xc_functionals.f90(84): error #6580: Name in only-list does not exist. [XC_LDA_X]
use libxc_funcs_m, ONLY: XC_LDA_X, XC_LDA_C_PW
------------------------------^
mod_xc_functionals.f90(84): error #6580: Name in only-list does not exist. [XC_LDA_C_PW]
use libxc_funcs_m, ONLY: XC_LDA_X, XC_LDA_C_PW
----------------------------------------^
mod_xc_functionals.f90(43): error #6683: A kind type parameter must be a compile-time constant. [SP]
real(SP), public:: GS_exx_FRACTION, GS_exx_SCREENING
------^
mod_xc_functionals.f90(44): error #6683: A kind type parameter must be a compile-time constant. [SP]
real(SP), public:: E_xc_val=0.0
------^
mod_xc_functionals.f90(45): error #6683: A kind type parameter must be a compile-time constant. [SP]
real(SP), public, allocatable:: magn(:,:)
------^
mod_xc_functionals.f90(46): error #6683: A kind type parameter must be a compile-time constant. [SP]
real(SP), public, allocatable:: F_xc(:,:,:)
------^
mod_xc_functionals.f90(47): error #6683: A kind type parameter must be a compile-time constant. [SP]
real(SP), public, allocatable:: V_xc(:,:)
------^
mod_xc_functionals.f90(48): error #6683: A kind type parameter must be a compile-time constant. [SP]
real(SP), public, allocatable:: E_xc(:)
------^
mod_xc_functionals.f90(52): error #6562: A data initialization-expr is not valid for this object. [CURRENT_XC_STRING]
character(lchlen) :: current_xc_string = ' '
----------------------^
mod_xc_functionals.f90(61): error #6683: A kind type parameter must be a compile-time constant. [SP]
real(SP) :: exx_fraction
--------^
mod_xc_functionals.f90(62): error #6683: A kind type parameter must be a compile-time constant. [SP]
real(SP) :: exx_screening
--------^
mod_xc_functionals.f90(63): error #8237: The character length in a component declaration shall either be a colon, be an initialization expression, or be a specification expression. [NAME]
character(lchlen) :: name
------------------------^
mod_xc_functionals.f90(64): error #6457: This derived type name has not been declared. [XC_F90_POINTER_T]
type(xc_f90_pointer_t) :: conf
--------^
mod_xc_functionals.f90(65): error #6457: This derived type name has not been declared. [XC_F90_POINTER_T]
type(xc_f90_pointer_t) :: info
--------^
mod_xc_functionals.f90(128): error #7013: This module file was not generated by any release of this compiler. [XC_F90_TYPES_M]
use xc_f90_types_m
---------^
mod_xc_functionals.f90(135): error #6457: This derived type name has not been declared. [XC_F90_POINTER_T]
type(xc_f90_pointer_t) :: p,info
----------^
mod_xc_functionals.f90(156): error #7013: This module file was not generated by any release of this compiler. [XC_F90_LIB_M]
use xc_f90_lib_m, ONLY:xc_f90_hyb_gga_xc_hse_set_par,&
---------^
mod_xc_functionals.f90(162): error #6683: A kind type parameter must be a compile-time constant. [SP]
real(SP), intent(in) :: exx_frac, exx_screen
----------^
mod_xc_functionals.f90(164): error #6683: A kind type parameter must be a compile-time constant. [XC_F90_KIND]
real(xc_f90_kind) :: exx_frac_, exx_screen_
----------^
mod_xc_functionals.f90(30): error #6580: Name in only-list does not exist. [SP]
use pars, ONLY:SP,lchlen
---------------------^
mod_xc_functionals.f90(52): error #6404: This name does not have a type, and must have an explicit type. [LCHLEN]
character(lchlen) :: current_xc_string = ' '
-----------^
mod_xc_functionals.f90(30): error #6580: Name in only-list does not exist. [LCHLEN]
use pars, ONLY:SP,lchlen
------------------------^
mod_xc_functionals.f90(52): error #6841: An automatic object must not appear in the specification part of a module. [CURRENT_XC_STRING]
character(lchlen) :: current_xc_string = ' '
----------------------^
mod_xc_functionals.f90(140): error #6404: This name does not have a type, and must have an explicit type. [P]
call xc_f90_func_init(p,info,f(ixc)%id,nsp)
-----------------------------^
mod_xc_functionals.f90(140): error #6404: This name does not have a type, and must have an explicit type. [INFO]
call xc_f90_func_init(p,info,f(ixc)%id,nsp)
-------------------------------^
mod_xc_functionals.f90(142): error #6404: This name does not have a type, and must have an explicit type. [XC_F90_INFO_FAMILY]
f(ixc)%family=xc_f90_info_family(info)
---------------------^
mod_xc_functionals.f90(143): error #6404: This name does not have a type, and must have an explicit type. [XC_F90_INFO_KIND]
f(ixc)%kind=xc_f90_info_kind(info)
-------------------^
mod_xc_functionals.f90(203): catastrophic error: Too many errors, exiting
compilation aborted for mod_xc_functionals.f90 (code 1)
Makefile:166: recipe for target 'mod_xc_functionals.o' failed
make[2]: *** [mod_xc_functionals.o] Error 1
make[2]: Leaving directory '/home/chemam/Downloads/yambo-master/src/modules'
Makefile:202: recipe for target 'yambo' failed
make[1]: *** [yambo] Error 2
make[1]: Leaving directory '/home/chemam/Downloads/yambo-master'
yambo build failed

in attachement the config.log
Best regard and salutations
You do not have the required permissions to view the files attached to this post.

andrea.ferretti
Posts: 206
Joined: Fri Jan 31, 2014 11:13 am

Re: compilation error in yambo 4.5.2

Post by andrea.ferretti » Thu Sep 10, 2020 10:12 pm

Dear

a message like this
mod_xc_functionals.f90(84): error #7013: This module file was not generated by any release of this compiler.
typically means that the version of libxc you are using has been compiled with a different fortran compiler wrt the one you are using to compile yambo.
At variance with other languages, in Fortran when modules are used (use statement) a module file needs to be accessible to the compiler (eg via the -I<dir> option).
Such mod file needs to be generated by the same compiler... Here it is not the case (it is easy to mess up such pairing when using pre-compiled libraries).

Take care
Andrea
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it

Post Reply