When using either the C or C++ toolchain, the complimentary compiler is
not properly identified, rather /usr/bin/g{cc,++} is, which may cause
configuration problems. this patch fixes this issue.
ALCF strongly recommends the use of -O3 unless there is clear evidence
that higher optimization has a (positive) effect on the quality of the
code generation from XL. we find that XL frequently generates no faster
and even slower code with -O4 and -O5 unless the code is specifically
designed to be optimized for BGQ.
Fixes #1283
Change-Id: If32a507c6394e23106555741bdefbc0d554c3765
# xl.ndebug is appropriate for production calculations. For debugging,
# use xl to add back error checks and assertions
set(CMAKE_C_COMPILER /bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r)
-set(CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" CACHE STRING "Compiler optimization flags")
+set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
+set(CMAKE_CXX_COMPILER /bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r)
+set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
mark_as_advanced(CMAKE_XL_CreateExportList) # No idea what spams this
set(CMAKE_SYSTEM_NAME BlueGeneQ-static CACHE STRING "Cross-compiling for BlueGene/Q" FORCE)
# xl.ndebug is appropriate for production calculations. For debugging,
# use xl to add back error checks and assertions
+set(CMAKE_C_COMPILER /bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r)
+set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
set(CMAKE_CXX_COMPILER /bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r)
-set(CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG" CACHE STRING "Compiler optimization flags")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
mark_as_advanced(CMAKE_XL_CreateExportList) # No idea what spams this