compilation error!

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
vasp84
Posts: 20
Joined: Wed Feb 10, 2016 12:56 am

Re: compilation error!

Post by vasp84 » Wed Feb 10, 2016 7:04 pm

Daniele, I would agree with you for every new post, but when we have a long discussion like what we have right now it does not make any sense to keep saying "Dear".... . I really thank your time and help and others as well but this is the way we do here in the US and no one has complained about it before. And it has nothing to do with politeness at all!!

Jaret Qi,
ASU
Jaret Qi
Ph.D candidate
NMSU-USA

vasp84
Posts: 20
Joined: Wed Feb 10, 2016 12:56 am

Re: compilation error!

Post by vasp84 » Wed Feb 10, 2016 7:06 pm

andrea marini wrote:Hi. From the log I do not understand where the compilations stops.

What is the error message?

Andrea
I have already posted the error at the first beginning of the post, I still have the same error every time.

Jaret,
ASU
Jaret Qi
Ph.D candidate
NMSU-USA

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

Re: compilation error!

Post by Daniele Varsano » Wed Feb 10, 2016 7:29 pm

Dear Jaret,
I really thank your time and help and others as well
OK, good to know. It is not always granted.

Now, it is not easy to understand what is going on. Your config.log file indicated you are using gfortran, while in the error message you posted it looks intel compiler is in use.
mod_fragments.F ifort: ...
Next the error indicate:
This module file was not generated by any release of this compiler.
that some modules were compiled with a different compiler.
This was the reason I suggested you a make clean_all in order to delete the previous compiled modules. Note that a simple make clean does not do the job.
Try to do the make clean_all and next configure explicitly indicating the compilers and precompiler (actually it could be a precompiler problem as
it complains on the .f90 file) something like:

Code: Select all

  FC=ifort \
  F77=ifort \
  CC=icc \
  PFC=mpiifort \
  CPP='icc -E' 
   
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/

vasp84
Posts: 20
Joined: Wed Feb 10, 2016 12:56 am

Re: compilation error!

Post by vasp84 » Thu Feb 11, 2016 6:47 am

Dear Dr. Varsano,
Thank you for your help and patience. After I unzip yambo file, this what I did:
but I got the error:
./configure\
> FC=ifort \
> F77=ifort \
> F77=ifort \
> F77=ifort \
> F77=ifort \
> CC=icc \
> CC=icc \
> PFC=mpiifort \
> CPP='icc -E'
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for gcc... icc
checking whether the C compiler works... no
Jaret Qi
Ph.D candidate
NMSU-USA

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

Re: compilation error!

Post by Daniele Varsano » Thu Feb 11, 2016 8:23 am

Dear Jaret,

let's try to start from the beginning.
Try to a do just ./configure without specifying anything and make yambo

Next post the error again and the two config.log files, the one present in the main directory and the on present in the ./lib/libxc directory.

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: 214
Joined: Fri Jan 31, 2014 11:13 am

Re: compilation error!

Post by andrea.ferretti » Thu Feb 11, 2016 9:14 am

Dear Jaret,

Is your icc compiler working?
Have you check the installation of your compilers?
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

vasp84
Posts: 20
Joined: Wed Feb 10, 2016 12:56 am

Re: compilation error!

Post by vasp84 » Thu Feb 11, 2016 7:32 pm

Dear Andrea,
I think my compilers are working since I was able to compile quantum espresso and abinit.
Dear Daniele,
I have done what you told me but the same error, I am attaching the two config.log files.

Thank you for your time!
You do not have the required permissions to view the files attached to this post.
Jaret Qi
Ph.D candidate
NMSU-USA

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

Re: compilation error!

Post by andrea.ferretti » Fri Feb 12, 2016 10:41 am

Dear Jarek,

from you config.log it seems you are using serial gnu compilers (fortran, gcc), while I am not sure about the parallel ones.
In particular, your mpif90 complains as follows:

Code: Select all

configure:9038: mpif90 -o conftest -O3 -mtune=native    conftest.f90 -g -O2 >&5
ifort: command line warning #10159: invalid argument for option '-m' 
ifort: command line warning #10120: overriding '-O3' with '-O2'
if you type:

Code: Select all

mpif90 -v 
you should be able to detect whether mpif90 was configured to work with fortran or ifort (the second option seems to be the case).
If this is the problem, make sure to have a clear gnu or intel environment before starting the configuration process.

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

vasp84
Posts: 20
Joined: Wed Feb 10, 2016 12:56 am

Re: compilation error!

Post by vasp84 » Fri Feb 12, 2016 7:14 pm

Thank you Andrea for your time and help!

andrea.ferretti wrote:
from you config.log it seems you are using serial gnu compilers (fortran, gcc), while I am not sure about the parallel ones.
I do have parallel compilers on the machine, otherwise how come I use abinit and quantum espresso and siesta on parallel?
andrea.ferretti wrote:

Code: Select all

mpif90 -v 
I've got: ifort version 12.1.4
andrea.ferretti wrote: If this is the problem, make sure to have a clear gnu or intel environment before starting the configuration process.
How to do so?
Jaret Qi
Ph.D candidate
NMSU-USA

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

Re: compilation error!

Post by andrea.ferretti » Sat Feb 13, 2016 4:03 pm

Dear Jaret,

I know you have parallel compilers from your config.log. My doubt was about your parallel compilers being compatible with your serial ones (gfortran + gcc).
Indeed, your mpif90 is build on top of ifort, which causes the problem.

In a standard installation, you should have available to configure a set of compatible compilers (either gnu or intel or whatever else). The usual way to do so is to set proper unix environment variables (either in your .bashrc/.cshrc or managing them e.g. via the module scripts). In case you are not familiar with this, ask your sys admin.

Now: since you have a working parallel espresso, it would be important to know if that has been built on top of the intel compilers (have a look at espresso/make.sys and check the F90, F77, CC variables). If the answer is ifort,ifort,icc, then you have a working intel parallel environment.
This is of course compatible also with yambo.

What you need to do is the following:

* every time you build f90 software switching from one compiler to another, revert to pristine distribution:
make clean_all

* try with ./configure FC=ifort CC=icc
does it work ?
take your time to look at yambo/config/report
and yambo/config/setup

if all looks fine go ahead-> make yambo
if not post config.log and the two files above

* if the above did not work try with
./configure FC=ifort CC=icc CPP="icc -E"

the more flags you specify the more difficult it is going to be...

hope it helps
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