[Q-e-developers] Compilation problems with xx.f90

Ari P Seitsonen Ari.P.Seitsonen at iki.fi
Wed Feb 8 22:08:04 CET 2017


Hello Developers,

   Adding somewhat to the earlier comments: I tried with 'gfortran' and 
specifying different standards. Depending on which one you choose (95, 
2003, 2008, 2008ts) you get a collection of different errors, warning 
(tabs, "real*8") etc. Here the site which was commented earlier by 
Oliviero, compiled with '-std=2003':

-----------------------------------------------------------------
exx.f90:1712:29:

      prhoc(1:nrxxs*jblock) => rhoc(:,:)
                              1
Error: Fortran 2008: Rank remapping target is not rank 1 at (1)
exx.f90:1713:27:

      pvc(1:nrxxs*jblock) => vc(:,:)
                            1
Error: Fortran 2008: Rank remapping target is not rank 1 at (1)
-----------------------------------------------------------------

   So this is using a feature from the FORTRAN 2008 standard. Of course not 
all compilers might not like this, so one should decide which level of the 
standard one fixes to (or, tries to make a temporary workaround for the 
compilers that cannot handle the feature).

   I agree with Paolo, having superhypermega new features from newest 
standards or proposals is dangerous, but at some point one has to move on.

   If further testing on the standards/features is wanted I can carry on.

     Greetings,

        apsi

PS Paolo, still after your "lines too long"-fix at 5:40 pm today I 
obtained; apparently gfortran v5.4.0 cuts at column 132 by default, can 
of course be removed with option '-ffree-line-length-none':

-----------------------------------------------------------------
mpif90 -O3 -g                     -x f95-cpp-input -D__FFTW3 -D__MPI  -I/home/seitsonen/usr/code/qe/src/SVN-trunk/RUNNING//include -I../../iotk/src -I../../Modules -I../../FFTXlib -I../../LAXlib -c exx.f90
exx.f90:1001:132:

                                 psic_all_nc(ir,ipol)=psic_all_nc(ir,ipol)+conjg(d_spin(jpol,ipol,isym))* temppsic_all_nc(rir(ir,isym),jpol)
                                                                                                                                     1
Error: Line truncated at (1) [-Werror=line-truncation]
exx.f90:1001:132:

                                 psic_all_nc(ir,ipol)=psic_all_nc(ir,ipol)+conjg(d_spin(jpol,ipol,isym))* temppsic_all_nc(rir(ir,isym),jpol)
                                                                                                                                     1
Error: Invalid form of array reference at (1)
exx.f90:1856:132:

                        rhoc(ir,jbnd-jstart+1) = ( conjg(exxtemp(ir,jbnd-jblock_start+1))*temppsic_nc(ir,1,ii) + conjg(exxtemp(nrxxs+ir,jbnd-jblock_start+1))*temppsic_nc(ir,2,ii) )/omega
                                                                                                                                     1
Error: Line truncated at (1) [-Werror=line-truncation]
exx.f90:1856:132:

                        rhoc(ir,jbnd-jstart+1) = ( conjg(exxtemp(ir,jbnd-jblock_start+1))*temppsic_nc(ir,1,ii) + conjg(exxtemp(nrxxs+ir,jbnd-jblock_start+1))*temppsic_nc(ir,2,ii) )/omega
                                                                                                                                     1
Error: Invalid form of array reference at (1)
exx.f90:1897:132:

                     CALL addusxx_g(exx_fft, rhoc(:,jbnd-jstart+1), xkq, xkp, 'c', becphi_c=becxx(ikq)%k(:,jbnd),becpsi_c=becpsi%k(:,ibnd))
                                                                                                                                     1
Error: Line truncated at (1) [-Werror=line-truncation]
exx.f90:1897:132:

                     CALL addusxx_g(exx_fft, rhoc(:,jbnd-jstart+1), xkq, xkp, 'c', becphi_c=becxx(ikq)%k(:,jbnd),becpsi_c=becpsi%k(:,ibnd))
                                                                                                                                     1
Error: Invalid form of array reference at (1)
exx.f90:2563:132: Error: Line truncated at (1) [-Werror=line-truncation]
exx.f90:2563:120: Error: Missing ‘)’ in statement at or before (1)
exx.f90:2565:132: Error: Line truncated at (1) [-Werror=line-truncation]
exx.f90:2565:122: Error: Missing ‘)’ in statement at or before (1)
exx.f90:2889:132:

                        CALL addusxx_g(exx_fft, rhoc(:,ibnd-ibnd_inner_start+1), xkq, xkp, 'c', becphi_c=becxx(ikq)%k(:,ibnd),becpsi_c=becpsi%k(:,jbnd))
                                                                                                                                     1
Error: Line truncated at (1) [-Werror=line-truncation]
exx.f90:2889:124:

                        CALL addusxx_g(exx_fft, rhoc(:,ibnd-ibnd_inner_start+1), xkq, xkp, 'c', becphi_c=becxx(ikq)%k(:,ibnd),becpsi_c=becpsi%k(:,jbnd))
                                                                                                                             1
Error: Missing keyword name in actual argument list at (1)
exx.f90:2898:132:

                        vc = vc + coulomb_fac(ig,iq,ikk) * dble(rhoc(exx_fft%nlt(ig),ibnd-ibnd_inner_start+1) * conjg(rhoc(exx_fft%nlt(ig),ibnd-ibnd_inner_start+1)))
                                                                                                                                     1
Error: Line truncated at (1) [-Werror=line-truncation]
exx.f90:2898:132:

                        vc = vc + coulomb_fac(ig,iq,ikk) * dble(rhoc(exx_fft%nlt(ig),ibnd-ibnd_inner_start+1) * conjg(rhoc(exx_fft%nlt(ig),ibnd-ibnd_inner_start+1)))
                                                                                                                                     1
Error: Invalid form of array reference at (1)
f951: some warnings being treated as errors

-----------------------------------------------------------------

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
   Ari Paavo Seitsonen / Ari.P.Seitsonen at iki.fi / http://www.iki.fi/~apsi/
     Ecole Normale Supérieure (ENS), Département de Chimie, Paris
     Mobile (F) : +33 789 37 24 25    (CH) : +41 79 71 90 935


On Wed, 8 Feb 2017, Paolo Giannozzi wrote:

> Hi Oliviero
>
> the first error you mention is a line too long (hidden by
> preprocessing) and should be fixed (I'll do it). The second, I don't
> know, it must be some new feature, I'll inquire with the guys at Nersc
> who added it. In general: g95 used to be a great compiler, but it is
> unmaintained since 5+ years and slowly fading into obsolescence. I am
> strongly against too quick adoption of new language features or new
> versions of libraries, but from time to time we have to move on.
>
> Paolo
>
> On Wed, Feb 8, 2017 at 2:28 PM, Oliviero Andreussi
> <oliviero.andreussi at usi.ch> wrote:
>> Dear all,
>>
>> sorry if this has been already pointed out by others, I run into some compilations issues with exx.f90 when trying to compile pw.x on my mac laptop, using g95. First I had a stupid (but never seen before) issue with lines being truncated, in particular when the compiler-time modification of the lines was used, e.g.
>>
>> Warning (115): Line 1487 of exx.f90 is being truncated
>> In file exx.f90:1487
>>
>> dp,kind=DP))
>>      1
>> Error: Syntax error in argument list at (1)
>>
>> While this is probably something easy to fix (I am sure there is also some setting I can specify to overcome the problem, instead of adding continuation characters by hand in the problematic lines), I found that the most recent commit introduces what g95 sees as an error in pointer assignment
>>
>> In file exx.f90:1710
>>
>>     prhoc(1:nrxxs*jblock) => rhoc(:,:)
>>     1
>> Error: Pointer assignment to non-POINTER at (1)
>> In file exx.f90:1711
>>
>>     pvc(1:nrxxs*jblock) => vc(:,:)
>>     1
>> Error: Pointer assignment to non-POINTER at (1)
>>
>> If the problems are in my compiling set up, I would really appreciate the help of the experts.
>>
>> Best,
>>
>> Oliviero Andreussi
>> --
>> Senior Postdoctoral Researcher
>> École Polytechnique Fédérale de Lausanne (EPFL) and
>> Università della Svizzera Italiana (USI) of Lugano
>> USI Campus, Via G. Buffi 17, 6904 Lugano, Switzerland
>> Emails: oliviero.andreussi @ epfl.ch -or- usi.ch
>> Tel: +41-(0)58-666-4810 / Skype: olivieroandreussi
>> Web: https://sites.google.com/site/olivieroandreussi
>>
>>
>> _______________________________________________
>> Q-e-developers mailing list
>> Q-e-developers at qe-forge.org
>> http://qe-forge.org/mailman/listinfo/q-e-developers
>
>
>
> -- 
> Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
> Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
> Phone +39-0432-558216, fax +39-0432-558222
>
> _______________________________________________
> Q-e-developers mailing list
> Q-e-developers at qe-forge.org
> http://qe-forge.org/mailman/listinfo/q-e-developers


More information about the developers mailing list