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

How to prevent optimisation of a specific loop?

zugvogel
Beginner
415 Views
Hello,
Can anyone tell me how to prevent a loop from being optimised?

EDIT: My mistake: a typing error in the code.
But I'm still interested to know: is there a directive that can be placed before the loop to prevent it from being optimised?
0 Kudos
2 Replies
Tim_Gallagher
New Contributor II
415 Views
Quoting - zugvogel
Hello,
Can anyone tell me how to prevent a loop from being optimised?

EDIT: My mistake: a typing error in the code.
But I'm still interested to know: is there a directive that can be placed before the loop to prevent it from being optimised?

You can put the NOUNROLL, NOVECTOR, NOSWP, NOPREFETCH, NOPARALLEL depending on what you're trying to prevent.

http://www.intel.com/software/products/compilers/docs/fmac/doc_files/source/extfile/lref_for/source_files/pgjcdor.htm

Tim
0 Kudos
zugvogel
Beginner
415 Views
That was exactly what I was looking for - thanks!
0 Kudos
Reply