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

Different behaviour on code compiled with /Qopenmp option but with no omp directives

Juan_Senent
Beginner
580 Views
Hi,

I recently upgraded to version 11.1 of the IVF compiler. I noticed that if I compile the same code with and without the /Qopenmp option the results can sometimes be different even if I'm not using any omp directive in the code. I have been assuming that the result would be the same, is that correct?

In summary, if no omp directives are used, can the /Qopenmp option affect the outcome?

Thanks,

Juan
0 Kudos
1 Reply
Steven_L_Intel1
Employee
580 Views
Yes, absolutely. One big difference is that with /Qopenmp, all local variables are allocated on the stack by default, whereas without it, arrays are statically allocated. If your program references uninitialized array elements, you can see a difference.
0 Kudos
Reply