MantisBT - CMake
View Issue Details
0013469CMakeCMakepublic2012-08-14 05:282016-06-10 14:31
Stefan Eilemann 
Kitware Robot 
normalmajoralways
closedmoved 
PPC64LinuxSLES 10 / 2.6.16
CMake-2-8 
 
0013469: OpenMP flags enable IPA optimization for IBM xlC compiler
FindOpenMP sets '-qsmp' which turns on IPA, even in debug builds where it is extremely inconvenient.

Our temporary workaround is to switch it off again: https://github.com/Eyescale/CMake/commit/fbe0c8a87a1ba5fe683beeb697ecebaab26fd730 [^]

I'm new to xlC, but '-qsmp=noomp' looks better?
Compile simple test program in debug with:

  find_package(OpenMP REQUIRED)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")


And observer ipa process running, or examine optimized program in debugger.
No tags attached.
Issue History
2012-08-14 05:28Stefan EilemannNew Issue
2012-08-14 09:23Brad KingNote Added: 0030635
2012-08-14 09:36Stefan EilemannNote Added: 0030636
2012-08-14 09:37Stefan EilemannNote Edited: 0030636bug_revision_view_page.php?bugnote_id=30636#r772
2012-08-14 09:54Brad KingNote Added: 0030639
2012-08-14 09:57Stefan EilemannNote Added: 0030640
2012-08-14 10:02Stefan EilemannNote Added: 0030641
2012-08-14 10:05Brad KingNote Added: 0030642
2012-08-14 10:05Brad KingStatusnew => backlog
2012-08-14 14:08Stefan EilemannNote Added: 0030648
2012-08-15 04:09Stefan EilemannNote Added: 0030663
2016-06-10 14:28Kitware RobotNote Added: 0042104
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0030635)
Brad King   
2012-08-14 09:23   
According to the documentation of xlc on AIX the "-qsmp" option does not automatically imply "omp":

$ xlc -qversion
IBM XL C/C++ for AIX, V11.1 (5724-X13)
Version: 11.01.0000.0001
$ xlc
...
 -qsmp[=<suboptions_list>] | -qnosmp
  ...
  omp | noomp
    Enables strict OpenMP compliance. Only OpenMP
    parallelization pragmas are recognized.
    Default: noomp
  ...
  Specifying -qsmp without suboptions is equivalent
  to -qsmp=auto:explicit:opt:noomp:norec_locks:
  nonested_par:schedule=runtime:nostackcheck:threshold=100:ostls
...


What version of the compiler are you using? What do the docs say on the Linux version?
(0030636)
Stefan Eilemann   
2012-08-14 09:36   
(edited on: 2012-08-14 09:37)
IBM XL C/C++ Advanced Edition for Blue Gene/P, V9.0

The docs are the same. I couldn't quite figure out who actually activates ipa. Re-reading it looks like '-qmsp=noomp' would only enable OpenMP?

(0030639)
Brad King   
2012-08-14 09:54   
In release builds folks probably still want "-qsmp".

Can you just add "-qnoipa" when you don't want IPA?
(0030640)
Stefan Eilemann   
2012-08-14 09:57   
No, that didn't work. Same goes for -qnooptimize
(0030641)
Stefan Eilemann   
2012-08-14 10:02   
My feeling is that there is something broken with the way OpenMP is integrated. IPA is supposed only to be enabled by -O4/O5, but with -qsmp I see the xlc frontend running for a running for a reasonable amount of time, and the ipa takes over for a long time. One of our unit test didn't finish compiling within an hour.

If I find the time later to play around with the options, I'll update this ticket. I was hoping somebody else did figure this out already...
(0030642)
Brad King   
2012-08-14 10:05   
I wonder how "-qsmp=noomp" helps. It's already listed as the default in the docs.

Please bring this up with the compiler vendor first to find out the right flags.
(0030648)
Stefan Eilemann   
2012-08-14 14:08   
Yes, noomp is *one* of the default flags. I suspect that another one enables. I'll try to get feedback from IBM, but there is no guarantee this will happen.
(0030663)
Stefan Eilemann   
2012-08-15 04:09   
Ok, after hacking around a bit it seems that OpenMP and debug are mutually exclusive, since I can't figure out how to get OpenMP without ipa. Will try to get info from IBM.
(0042104)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.