I am compiling the same OpenMP program using both gcc(4.5.3) and icc(13.1.1 20130313), with debug options: (-g, O3) and with corresponding OMP flags (-fopenmp and -openmp) . My code includes some omp_locks and I want to analyze it with VTune Amplifier Wait and Locks analysis.
My idea is that since locks are present, thread transitions are expected (as yellow lines). This happens when I analyze the icc binary. However the analysis on the gcc one simply does not show any transition. The reason I use gcc is because the speedup achieved so far is higher than of the icc version (after solving all data races with Intel Inspector).
My question is:
- is there any special debug flag that I forgot?
Thanks for your help!