Problem w/ libxc in compilation
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
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
-
- Posts: 23
- Joined: Mon Aug 17, 2015 5:56 am
Problem w/ libxc in compilation
Dear Developers and Users,
Hello,
I am trying to install Yambo-4-0-1-rev.89 on Mac OS.X Yosemite version 10.10.4. with gcc47 and fortran on my laptop.
It does configure OK, but when I try to make interfaces I get the error message below:
.
.
Error: Unclassifiable statement at (1)
libxc.f90:107.7:
end function xc_f90_ ## info_number
1
Error: Expecting END INTERFACE statement at (1)
libxc.f90:109.28:
integer function xc_f90_ ## info_kind(info)
1
Internal Error at (1):
insert_bbt(): Duplicate key found!
make[4]: *** [libxc_la-libxc.lo] Error 1
make[3]: *** [install] Error 2
make[2]: *** [install-recursive] Error 1
make[1]: *** [package-ready-stamp] Error 2
make: *** [libs] Error 2
I noticed that others have encountered the same problem. I did try to use "make clean_all" before ./configure. I also have specified my path correctly.
It seems there is some problem with livxc or the preprocessor which I do not know how to solve.
You could find config.log, attached.
I really appreciate if you could help me solve this.
Thank you,
Zahra Taghipour
PhD student at University of New Mexico, USA
Hello,
I am trying to install Yambo-4-0-1-rev.89 on Mac OS.X Yosemite version 10.10.4. with gcc47 and fortran on my laptop.
It does configure OK, but when I try to make interfaces I get the error message below:
.
.
Error: Unclassifiable statement at (1)
libxc.f90:107.7:
end function xc_f90_ ## info_number
1
Error: Expecting END INTERFACE statement at (1)
libxc.f90:109.28:
integer function xc_f90_ ## info_kind(info)
1
Internal Error at (1):
insert_bbt(): Duplicate key found!
make[4]: *** [libxc_la-libxc.lo] Error 1
make[3]: *** [install] Error 2
make[2]: *** [install-recursive] Error 1
make[1]: *** [package-ready-stamp] Error 2
make: *** [libs] Error 2
I noticed that others have encountered the same problem. I did try to use "make clean_all" before ./configure. I also have specified my path correctly.
It seems there is some problem with livxc or the preprocessor which I do not know how to solve.
You could find config.log, attached.
I really appreciate if you could help me solve this.
Thank you,
Zahra Taghipour
PhD student at University of New Mexico, USA
You do not have the required permissions to view the files attached to this post.
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: Problem w/ libxc in compilation
Dear Zahra,
I think the problem is related to the C precompiled not being able to deal with
the concatenation operator (##).
In order to sort it out, you need to specify some flags to the configure command.
In particular, in my case (OSX 10.9.5) a set of flags like the following seem to work:
take care
Andrea
I think the problem is related to the C precompiled not being able to deal with
the concatenation operator (##).
In order to sort it out, you need to specify some flags to the configure command.
In particular, in my case (OSX 10.9.5) a set of flags like the following seem to work:
Code: Select all
./configure \
CPP="cpp-4.2 -E" \
CPPFLAGS="-P -ansi" \
FCCPP="cpp-4.2 -E" \
--enable-iotk \
[...]
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
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
-
- Posts: 23
- Joined: Mon Aug 17, 2015 5:56 am
Re: Problem w/ libxc in compilation
Andrea,
Thank you for your response.
Unfortunately, I still get the same error. I have tested all different flags and Variables for defining my compilers, though.
I also tried to MAKE YAMBO in Quantum Espresso folder! I get the error : " *** F90 is not defined; please define F90 or edit make.sys"! Although, I specify F90 as FORTRAN clearly!
The errors I get both in MAKE YAMBO seem to be related to F90, which I do not have any idea how to fix!
I would really appreciate any help on this.
Thank You,
Zahra
Research Assistant,
UNM, USA
Thank you for your response.
Unfortunately, I still get the same error. I have tested all different flags and Variables for defining my compilers, though.
I also tried to MAKE YAMBO in Quantum Espresso folder! I get the error : " *** F90 is not defined; please define F90 or edit make.sys"! Although, I specify F90 as FORTRAN clearly!
The errors I get both in MAKE YAMBO seem to be related to F90, which I do not have any idea how to fix!
I would really appreciate any help on this.
Thank You,
Zahra
Research Assistant,
UNM, USA
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: Problem w/ libxc in compilation
Hi Zahra,
some suggestions:
* the compilation of yambo through quantum espresso is somehow more difficult since it has more
constraints. In a difficult case I would definitely go for a self-standing compilation of yambo
* whenever you try a different set of compilation flags, remember to do a make clean_all
(and, if the problems is with libxc, check that lib/libxc just contains Makefile.loc;
if the libxc tar ball has already been expanded, showing up ad lib/libxc/libxc_xxx, configuration
flags are not updated and so the same error appears... all of this is avoided by making clean_all)
* proceed systematically and post relevant config.log files if you need further support
Andrea
some suggestions:
* the compilation of yambo through quantum espresso is somehow more difficult since it has more
constraints. In a difficult case I would definitely go for a self-standing compilation of yambo
* whenever you try a different set of compilation flags, remember to do a make clean_all
(and, if the problems is with libxc, check that lib/libxc just contains Makefile.loc;
if the libxc tar ball has already been expanded, showing up ad lib/libxc/libxc_xxx, configuration
flags are not updated and so the same error appears... all of this is avoided by making clean_all)
* proceed systematically and post relevant config.log files if you need further support
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
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
-
- Posts: 23
- Joined: Mon Aug 17, 2015 5:56 am
Re: Problem w/ libxc in compilation
Andrea,
I did ./Configure with the compilation flags you had posted, again. But, this time I used CPP="cpp-mp-4.5 -E" and FCCPP="cpp-mp-4.5 -E" instead, and it worked like a charm!!
Thank you so much for your help.
Zahra
I did ./Configure with the compilation flags you had posted, again. But, this time I used CPP="cpp-mp-4.5 -E" and FCCPP="cpp-mp-4.5 -E" instead, and it worked like a charm!!

Thank you so much for your help.
Zahra
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: Problem w/ libxc in compilation
great, enjoy!
Andrea
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
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
-
- Posts: 23
- Joined: Mon Aug 17, 2015 5:56 am
Re: Problem w/ libxc in compilation
Andrea,
Hello,
Since I managed to compile Yambo, I realized all of my input files have been built "Serial" and I was unable to run my codes in parallel.
So, I ran " make clean_all" and re_compile again. Now I continuously receive this error:
{
Fatal Error: Cannot read module file 'netcdf.mod' opened at (1), because it was created by a different version of GNU Fortran
make[1]: *** [mod_pars.o] Error 1
make: *** [yambo] Error 2
}
The error seems clear. But I do not know how to solve it.
I have attached the "config.log", just in case.
I would really appreciate if you could help me on this.
Yours,
Zahra
Hello,
Since I managed to compile Yambo, I realized all of my input files have been built "Serial" and I was unable to run my codes in parallel.
So, I ran " make clean_all" and re_compile again. Now I continuously receive this error:
{
Fatal Error: Cannot read module file 'netcdf.mod' opened at (1), because it was created by a different version of GNU Fortran
make[1]: *** [mod_pars.o] Error 1
make: *** [yambo] Error 2
}
The error seems clear. But I do not know how to solve it.
I have attached the "config.log", just in case.
I would really appreciate if you could help me on this.
Yours,
Zahra
You do not have the required permissions to view the files attached to this post.
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: Problem w/ libxc in compilation
Dear Zahra,
the error you get
means that you are trying to use .mod files from the netcdf library that have been compiled using a different compiler (or version of the compiler)
according to your config.log file, you have configured using these flags
the error you get is probably related to the use of the netcdf lib installed in /opt/local.
If you simply drop both --with-netcdf-lib and --with-netcdf-include yambo will compile its own copy of netcdf, sorting out the problem.
Otherwise, you need to specify a netcdf library that has been compiled (i) with fortran support and (ii) using the same fortran compiler you are using
Andrea
the error you get
Code: Select all
Fatal Error: Cannot read module file 'netcdf.mod' opened at (1), because it was created by a different version of GNU Fortran
according to your config.log file, you have configured using these flags
Code: Select all
./configure CPP=cpp-mp-4.7 -E FCCPP=cpp-mp-4.7 -E CPPFLAGS=-P -ansi --enable-iotk --with-netcdf-lib=/opt/local/lib --with-netcdf-include=/opt/local/include
If you simply drop both --with-netcdf-lib and --with-netcdf-include yambo will compile its own copy of netcdf, sorting out the problem.
Otherwise, you need to specify a netcdf library that has been compiled (i) with fortran support and (ii) using the same fortran compiler you are using
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
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
-
- Posts: 23
- Joined: Mon Aug 17, 2015 5:56 am
Re: Problem w/ libxc in compilation
Andrea,
Thank you for the response.
In fact, I added the "--with-netcdf-lib/include" lines after I got this error!
I thought I'd better install the NETCDF myself and introduce its LIB_PATH. However, I still get the same error.
I checked my compiler using " fortran -v". It seems I got gcc47 at the moment. I do not know where this discrepency comes from regarding different compilers!
Moreover, I have checked "nc-config --fc" and it is empty! (" "). So, I do not know which fortran compiler NETCDF is using!:/
Is there any specific way that I could re_install and compile all of them with the same/known compiler?!
Best,
Zahra
Thank you for the response.
In fact, I added the "--with-netcdf-lib/include" lines after I got this error!
I thought I'd better install the NETCDF myself and introduce its LIB_PATH. However, I still get the same error.
I checked my compiler using " fortran -v". It seems I got gcc47 at the moment. I do not know where this discrepency comes from regarding different compilers!
Moreover, I have checked "nc-config --fc" and it is empty! (" "). So, I do not know which fortran compiler NETCDF is using!:/
Is there any specific way that I could re_install and compile all of them with the same/known compiler?!
Best,
Zahra
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: Problem w/ libxc in compilation
Hi Zahra,
if you added --with-netcdf-lib/include *after* you got the error (meaning before you were using the internal netcdf),
I think it means that your yambo source tree has not been properly cleaned.
I would suggest to start from scratch, make clean_all, check no libnetcdf* files are in yambo/lib and
no *.mod files are in yambo/include...
then, if you compile by using the internal netcdf lib (i.e. no netcdf flags specified what-so-ever), the code should not complain...
Andrea
if you added --with-netcdf-lib/include *after* you got the error (meaning before you were using the internal netcdf),
I think it means that your yambo source tree has not been properly cleaned.
I would suggest to start from scratch, make clean_all, check no libnetcdf* files are in yambo/lib and
no *.mod files are in yambo/include...
then, if you compile by using the internal netcdf lib (i.e. no netcdf flags specified what-so-ever), the code should not complain...
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
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