Diagnostic 7866: The statement following this DEC loop optimization directive must be an iterative do-stmt, a vector assignment, an OMP do-directive or a parallel-do-directive, or an OMP simd-directive or a do-simd-directive

Diagnostic 7866: The statement following this DEC loop optimization directive must be an iterative do-stmt, a vector assignment, an OMP do-directive or a parallel-do-directive, or an OMP simd-directive or a do-simd-directive.

This diagnostic is issued when an Intel loop directive such as !DIR$ UNROLL or !DIR$ NOVECTOR is not directly followed by an iterative loop, an array assignment, or another directive that applies to loops. For example:

!DIR$ NOUNROLL
print *, "Hello"

For more information, please read the Intel Fortran Language Reference section on Directive Enhanced Compilation > General Compiler Directives > Rules for General Directives that Affect DO Loops. If you need further assistance, please ask in our User Forums (Linux, OS X, Windows).

For more complete information about compiler optimizations, see our Optimization Notice.

4 comments

Top
sblionel's picture

Please ask for help in our user forum at https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x  You will need to provide some source code for context.

I'm trying to vectorize complex(16) array copy in Fortran. The code is as simple as

            A=B 

If I do it without any directives, I have a message

remark: loop was not vectorized: not inner loop

So I decided to put the directive simd, like

            !dir$ simd
            A=B

Then I get this warning.

warning #7866: The statement following this DEC loop optimization directive must be an iterative do-stmt, a vector assignment, an OMP pdo-directive, or an OMP parallel-do-directive.

I am getting this warning on the 2nd of two !dir$ prefetch directives when the following statement is an iterative do-stmt.
 

While compiling the numerical model, I am getting

sed '/^ *$/d' rascnv2.i >rascnv2.f ; rm rascnv2.i
mpif90 -r8 -O2 -DLINUX -WB -w95 -zero -Vaxlib -convert big_endian -c rascnv2.f
rascnv2.f(332): warning #7866: The statement following this DEC loop optimization directive must be an iterative do-stmt, a vector assignment, an OMP pdo-directive, or an OMP parallel-do-directive.
!DEC$ NOVECTOR
--------------^
rascnv2.f(335): warning #7866: The statement following this DEC loop optimization directive must be an iterative do-stmt, a vector assignment, an OMP pdo-directive, or an OMP parallel-do-directive.
CDIR$ IVDEP

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.