Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

#pragma omp without omp option turned on change compiler behaviour

epitalon
Beginner
269 Views
Hello all,

when I add a #pragma omp before a for loop in one function into a file for which the openMP option is turned off, the Intel compiler stops auto-vectorizing an unrelated for loop in an unrelated function.!??!

Actually, there is a random bug, because when I compile the file a second type, it sometimes compiles right.

I use the Compiler Integration Package v11.0.759.2005 in Visual Studio 2005.

Options used are :
/c /O2 /Ob1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "_VC80_UPGRADE=0x0710" /GF /EHsc /MT /GS /Gy /fp:fast /Fo".\Release/" /W3 /nologo /Qwd1125

I would like to have a more reliable compiler version. Could anyone here give me some advice on how to get that ?

Thanks,
Jean-Marie Epitalon
0 Kudos
2 Replies
TimP
Honored Contributor III
269 Views
Within the term of your license or renewal, all updates are available to you at https://registrationcenter.intel.com.
If the function in question is affected by your request for maximum aggressive inter-procedural optimization, an omp directive on its caller may have an effect. This would be expected, where loop interchanges are required to enable vectorization, as the omp parallel forces the designated loop to remain the outer loop. In such a case, nesting your loops correctly so as to place the vectorizable loop inside is likely to be necessary in order to gain combined vector and parallel performance.

0 Kudos
epitalon
Beginner
269 Views
This seems to be an error in the message output rather than in the compilation itself.
However, I downloaded the latest version of the compiler to make sure everything is correct.

0 Kudos
Reply