Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a couple of fixes for XL on power9 #1108

Merged
merged 1 commit into from
Aug 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/compilerEnv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ macro(dbsSetupCxx)
include(unix-g++)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
include(windows-cl)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "XLClang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "XLCLang")
include(unix-xl)
else()
# missing CMAKE_CXX_COMPILER_ID? - try to match the compiler path+name to a string.
if("${my_cxx_compiler}" MATCHES "pgCC" OR "${my_cxx_compiler}" MATCHES "pgc[+][+]")
Expand Down
4 changes: 2 additions & 2 deletions config/unix-xl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(NOT CXX_FLAGS_INITIALIZED)
if(EXISTS /usr/gapps)
# ATS-2
string(APPEND CMAKE_C_FLAGS " --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1")
elseif(EXISTS /projects/opt/ppc64le/ibm)
elseif(EXISTS /projects/opt/ppc64le/ibm AND NOT $ENV{CXX} MATCHES "-F")
# Darwin power9 - extract version from module environment.
string(REPLACE ":" ";" modules $ENV{LOADEDMODULES})
foreach(module ${modules})
Expand All @@ -43,7 +43,7 @@ if(NOT CXX_FLAGS_INITIALIZED)
${xlc_version})
elseif(${module} MATCHES "^cuda")
if(NOT DEFINED cuda_version)
string(REGEX REPLACE "[^0-9]*([0-9]+).([0-9]+)" "\\1.\\2" cuda_version ${module})
string(REGEX REPLACE "[^0-9]*([0-9]+).([0-9]+).*" "\\1.\\2" cuda_version ${module})
endif()
endif()
endforeach()
Expand Down