Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

why does "-openmp" result different files for an OpenMP-free Fortran code?

$
0
0

Hi,

Sorry for the awkward title.

Basically, I have a piece of Fortran source code which contains no OpenMP directives (Its OpenMP-free). The compiler commands "ifort -openmp -c foo.f" and "ifort -c foo.f" produced different objects. Actually, the commands "ifort -openmp -S" and "ifort -S" could generate different assembly files. I was puzzled. Because the source code is OpenMP-free, the "-openmp" option should be expected to have no effect at all.

Moreover, if this code is compiled without an "-openmp" option (since it's completely OpenMP-free), and an analysis of the final binary with Inspector XE would reveal a data race in the beginning of the source file, e.g. subroutine foo(a, b, n). This subroutine has only local variables (no common blocks). I'm really confused...

Because this code is proprietary, I cannot post it here. Sorry!

Can anyone comment on this, or do you have the same experience?


Viewing all articles
Browse latest Browse all 2583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>