Wannier90-1.2 doesnt compile with gfort4.1

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
User avatar
torrent
Posts: 127
Joined: Fri Aug 14, 2009 7:40 pm

Wannier90-1.2 doesnt compile with gfort4.1

Post by torrent » Tue May 04, 2010 5:47 pm

Hi everybody,

I just tried to compile my 6.1.2 branch...
... and I cannot compile the new wannier90 1.2.

I'm using gfortran 4.1 ; I know, I know, this version of the compiler is not recommended and obsolete but this is the one installed by our support...

The error I got is the following:

Code: Select all

In file transport.F90:1446
     real(kind=dp),allocatable,dimension(:,:),intent(out)   :: signatures                                                                        1
Error: ALLOCATABLE attribute conflicts with DUMMY attribute at (1)


If I understand correctly, the problem is the simultaneous use of allocatable and intent attributes. In other words, the compiler refuses a dummy argument with the allocatable attribute.
If I remember correctly, gfortran 4.1 is not Fortran2003 compliant.
And this "allocatable dummy argument" is probably a Fortran2003 feature, isn't it ?

Or, we decided (in Autrans) that Abinit has to be Fortran90 compatible; so, we have here a problem: if one of the plugins is not compatible with Fortran90, Abinit looses this characteristic...

OK, so what should we do:
1- abandon the Fortran90 constraint ?
2- patch every non Fortran90 compliant plugin ?
3- ???

Can someone propose a solution, in order for me to compile the code with gfortran 4.1 (and --enable-wannier90) ?

Thanks in advance,

Marc
Marc Torrent
CEA - Bruyères-le-Chatel
France

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: Wannier90-1.2 doesnt compile with gfort4.1

Post by gmatteo » Tue May 04, 2010 6:05 pm

Hi Marc,

What about using a pointer without intent?
Any F90 compliant compiler should compile the routine.

Yep, allocatable dummy argument is a Fortran2003 feature.

BTW: I think that a possible transition to F95 or F2003 should be discussed in the
forthcoming abinit workshop. However a preliminary discussion can be already
started in the private section of the forum

I'm not 100% sure that the most important compilers fully support F2003
but at least we should try to migrate to F95 as several libraries (e.g. etsf-io)
rely on f95 constructs.

Matteo

User avatar
torrent
Posts: 127
Joined: Fri Aug 14, 2009 7:40 pm

Re: Wannier90-1.2 doesnt compile with gfort4.1

Post by torrent » Tue May 04, 2010 6:44 pm

Hi Matteo,

Yes, you're right (that was also my idea).
But I'm not the author of wannier90...
Yann: is it possible to provide a patch, or something like that ?

Marc
Marc Torrent
CEA - Bruyères-le-Chatel
France

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Wannier90-1.2 doesnt compile with gfort4.1

Post by pouillon » Wed May 05, 2010 12:17 pm

Don't waste energy on downgrading Wannier90 for gofrtran 4.1. When you compile Abinit, you'll get a "not implemented error".

Abinit can be compiled by gfortran >= 4.2.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

User avatar
torrent
Posts: 127
Joined: Fri Aug 14, 2009 7:40 pm

Re: Wannier90-1.2 doesnt compile with gfort4.1

Post by torrent » Wed May 05, 2010 1:29 pm

This means that we cannot use wannier90 on our workstations...
We have the last version of RedHat Entreprise (v5 update 3) and this is still gcc4.1.3...
This is the case on our workstations but also on our HPC (Genci network)...
This is a shame (and only due to the wannier90 upgrade).

Marc
Marc Torrent
CEA - Bruyères-le-Chatel
France

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Wannier90-1.2 doesnt compile with gfort4.1

Post by pouillon » Thu May 06, 2010 5:54 pm

Do you mean that you're able to compile abinit with gfortran 4.1?
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

User avatar
torrent
Posts: 127
Joined: Fri Aug 14, 2009 7:40 pm

Re: Wannier90-1.2 doesnt compile with gfort4.1

Post by torrent » Fri May 07, 2010 11:13 am

Hi Yann,

Yes, indeed !
I compile Abinit with gfort4.1 for years...
(and also all the CEA members or french GENCi users).
My problem is that the new 6.1.2 is no more compatible with this compiler due to wannier90.

Marc
Marc Torrent
CEA - Bruyères-le-Chatel
France

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Wannier90-1.2 doesnt compile with gfort4.1

Post by pouillon » Fri May 07, 2010 11:44 am

I never succeeded compiling abinit with gfortran 4.1. Maybe it's because I'm using most of the advanced options. :?:

I'm currently involved in a project where we are creating Debian packages for Abinit and its dependencies. I agreed with the developers of Wannier90 to do it on top of Wannier90 1.2, and the package is almost ready now. That's why I updated and patched the version present in Abinit.

I see two possible solutions:
  • create an additional patch for Wannier90 in Abinit;
  • talk with the developers of Wannier90.

By the way, thank you for signalling this. It allowed me to improve the quality of the Debian package. :)
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Locked