Fortran error #8093: A do-variable within a DO body shall not appear in a variable definition context

Fortran error #8093: A do-variable within a DO body shall not appear in a variable definition context

DO M=1,8

    DO N=1,8

        DO I=1,3

            INTERVAL=0

            DO J=1,3

            INTERVAL = INTERVAL+CMAT(I,J)*BU(J,N)

            END DO

            KUU(M,N)= KUU(M,N)+BU(I,M)*INTERVAL*DJACB

        END DO

    END DO

END DO

 

 

i am facing an error when i complied following fortan code 

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The code that you show is only a fragment. Within that fragment there doesn't appear to be a reason for the compiler to complain, but as we do not see any of the declarations and the like, it is difficult to pinpoint the error. Please post a more complete, compilable fragment that allows us to reproduce the problem. Also, the compiler's error message should come with the line number of the offending line of code. This is missing from your post, so we are left to guess at it.

The small code fragment contains only INTERVAL as a possible DO index variable. Check if there was a DO INTERVAL = ... statement earlier in the program source. If so, and the corresponding END DO statement (or labeled terminal statement of the loop) was left out, that loop would still be active and trigger the error message that you showed.

As Arjen said, we need to see more details.

Leave a Comment

Please sign in to add a comment. Not a member? Join today