Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Ifort compiler error - do-variable within a DO body shall not appear in a variable definition context

$
0
0

Hello,

            I have inherited this code and when I try to compile it I get the following error. Being a newbie to Fortran 90 I would appreciate any help

When I compile this code I get the message - do-variable within a DO body shall not appear in a variable definition context. I presume this code did compile with pgf90 (that is what the author of the code told me) but I am not sure why it does not compile with ifort.

Regards,

Ashwin.

do i=1,nz-1
         dh=aklev(i+1)-aklev(i)
         if (abs(dh-dz).gt.eps) then
            print*,'Aklev: Vertical grid must be equally spaced... Stop'
            print*,(aklev(i),i=1,nz)
            stop
         endif
         dh=aklay(i+1)-aklay(i)
         if (abs(dh-dz).gt.eps) then
            print*,'Aklay: Vertical grid must be equally spaced... Stop'
            print*,(aklay(i),i=1,nz)
            stop
         endif
      enddo

 


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>