Skip to content

Commit

Permalink
Provide a couple of fixes for XL on power9
Browse files Browse the repository at this point in the history
+ Allows CI to run on Darwin Power9 for XL.
  • Loading branch information
KineticTheory committed Aug 14, 2021
1 parent a659254 commit 7e1951d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit 7e1951d

Please sign in to comment.