Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28451 Discussions

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

RAGHU__DIXIT
Beginner
1,056 Views
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 
0 Kudos
2 Replies
Arjen_Markus
Honored Contributor I
1,056 Views

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.

0 Kudos
mecej4
Honored Contributor III
1,056 Views

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.

0 Kudos
Reply