Page 1 of 1

mod_xc_functionals.f90(157): error #6580

Posted: Sat Jul 24, 2021 3:28 am
by burkzdemir
Dear developers,

I am getting the following error during make all for the version 5.0.3. What could be the problem?

mod_xc_functionals.f90(156): error #6580: Name in only-list does not exist or is not accessible. [XC_F90_HYB_GGA_XC_HSE_SET_PAR]
use xc_f90_lib_m, ONLY:xc_f90_hyb_gga_xc_hse_set_par,&
----------------------------^
mod_xc_functionals.f90(157): error #6580: Name in only-list does not exist or is not accessible. [XC_F90_HYB_GGA_XC_PBEH_SET_PAR]
& xc_f90_hyb_gga_xc_pbeh_set_par,&
----------------------------^
compilation aborted for mod_xc_functionals.f90 (code 1)
make[2]: *** [mod_xc_functionals.o] Error 1
make[2]: Leaving directory `/mnt/ufs18/home-001/chowd2rCMICH/burak/yambo-5.0.3/src/modules'
make[1]: *** [yambo] Error 2
make[1]: Leaving directory `/mnt/ufs18/home-001/chowd2rCMICH/burak/yambo-5.0.3'
yambo build failed

Re: mod_xc_functionals.f90(157): error #6580

Posted: Sun Jul 25, 2021 10:22 am
by andrea.ferretti
Dear Burak,

this kind of messages originates from a module (libxc in this case) not being properly compiled or present, resulting in an error when compiling other files using that module...
Basically, here the compilation problem is probably located at the level of libxc.

This can be due to multiple causes:
* the libxc*mod files are present but compiled by another compiler/version.
SOLUTION: do a proper cleaning (make distclean), reconfigure, and recompile
* you have compiled using a lot of parallelism (eg make -j yambo ), which may result in some pieces of yambo being compiled before of some required module (libxc here).
SOLUTION: use make -j2 yambo or make -j4 yambo
* you are using an external version of libxc that is not compiled using the same compiler or working.
SOLUTION: use a proper version of the external lib or compile internally
* you are using the internally compiled version of libxc, which actually failed to compile.
SOLUTION: you need to inspect why the compilation of libxc failed; sometimes it is possible to change the options passed to yambo configure to get it working; alternatively one can compile libxc by hand and link it externally (worst case scenario... usually not required)

hope this helps
Andrea

Re: mod_xc_functionals.f90(157): error #6580

Posted: Sun Jul 25, 2021 3:17 pm
by burkzdemir
Dear Andrea,

Thank you! I complied with internal libxc. But, now I am getting the following error.

>>>[Linking yambo]<<<
make[2]: Entering directory `/mnt/ufs18/home-001/chowd2rCMICH/burak/yambo-5.0.3/driver'
cd /mnt/home/chowd2rCMICH/burak/yambo-5.0.3/driver; /mnt/home/chowd2rCMICH/burak/yambo-5.0.3/sbin/moduledep.sh yambo.o > /mnt/home/chowd2rCMICH/burak/yambo-5.0.3/driver/make.dep
make[2]: Leaving directory `/mnt/ufs18/home-001/chowd2rCMICH/burak/yambo-5.0.3/driver'
make[2]: Entering directory `/mnt/ufs18/home-001/chowd2rCMICH/burak/yambo-5.0.3/driver'
yambo.F
ld: driver.o: in function `main':
driver.c:(.text+0x0): multiple definition of `main'; /opt/software/iccifort/2019.5.281/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin/for_main.o:for_main.c:(.text+0x0): first defined here
ld: /opt/software/iccifort/2019.5.281/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin/for_main.o: in function `main':
for_main.c:(.text+0x2e): undefined reference to `MAIN__'
make[2]: *** [yambo] Error 1
make[2]: Leaving directory `/mnt/ufs18/home-001/chowd2rCMICH/burak/yambo-5.0.3/driver'
make[1]: *** [yambo] Error 2
make[1]: Leaving directory `/mnt/ufs18/home-001/chowd2rCMICH/burak/yambo-5.0.3'
yambo build failed

Re: mod_xc_functionals.f90(157): error #6580

Posted: Mon Jul 26, 2021 1:56 am
by burkzdemir
I solved the problem with ./configure FC=ifort F77=ifort --enable-int-linalg --with-libxc-libdir=/mnt/home/chowd2rCMICH/burak/yambo-5.0.3/lib/libxc

Re: mod_xc_functionals.f90(157): error #6580

Posted: Mon Jul 26, 2021 11:39 am
by andrea.ferretti
Dear Burak,

great !
My impression is that the problem related to multiple main was due to missing compiler flags.
Nevertheless, good to see it solved.

BTW1: if I recall it properly, ifort 2018 and 2019 led to problematic yambo executables at the time.
In case you are observing issues, I would consider switching to >2020 intel compilers