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

The flags "-openmp" and "-tcheck" can't be used together, but what good are they apart?

ymost
New Contributor I
752 Views
Hi,

I have a very simple program that uses OpenMP. I want to analyze it with the Intel Thread Checker, which I have installed. The only problem is, the compilation flag "-openmp" cannot be used together with the flag "-tcheck". When I use them together I get the warning: "thread checking compilation disables optimization", and the "-openmp" flag is ignored. I just couldn't believe this, because without the "-openmp" flag the program is not parallel, and so there is no need to use the Thread Checker. If I compile it only with the "-openmp" flag and without the "-tcheck" flag, the program works fine with several parallel threads, but I can't analyze it with the Thread Checker.
Can anyone tell what's going on here?

BTW, I'm using Intel Fortran Compiler version 11.0, build 20080930, and Intel Thread Checker version 3.1.

Thanks
0 Kudos
1 Reply
TimP
Honored Contributor III
752 Views
As the message tries to tell you without too much verbosity, -tcheck only enables a syntax checking mode, which actually takes longer than a serial run. If you want to check a production threaded build of a "very simple program," you can try the dynamic instrumentation mode of thread checker. That is even slower running than the -tcheck mode.
There was an 11.0 build which didn't include the OpenMP debug library which is required for -tcheck. I think it was earlier than the one you mentioned.
If you make a dynamic linked OpenMP build with -g but not -tcheck, and it doesn't use the debug library by default, you could set the debug library in LD_PRELOAD.
You didn't say anything about using OpenMP syntax features which Thread Checker doesn't support under -tcheck, so I'm assuming that's not the objection.
I may not have understood your objection entirely.

0 Kudos
Reply