Skip to content

Commit

Permalink
OpenMP: Add OpenMP link flag for Cray compiler. (kokkos#7341)
Browse files Browse the repository at this point in the history
* OpenMP: Add OpenMP link flag for Cray compiler.

* Remove unnecessary spaces.

Co-authored-by: Damien L-G <dalg24+github@gmail.com>

* Add OpenMP flag for CrayClang.

* Set Kokkos compiler Id to CrayClang.

---------

Co-authored-by: Rahulkumar Gayatri <rgayatri@lbl.gov>
Co-authored-by: Damien L-G <dalg24+github@gmail.com>
  • Loading branch information
3 people authored Sep 27, 2024
1 parent fa09fa8 commit ef426e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cmake/kokkos_arch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,12 @@ IF(KOKKOS_ARCH_INTEL_PVC)
CHECK_MULTIPLE_INTEL_ARCH()
ENDIF()

IF (KOKKOS_ENABLE_OPENMP)
COMPILER_SPECIFIC_LINK_OPTIONS(
CrayClang -fopenmp
)
ENDIF()

IF (KOKKOS_ENABLE_OPENMPTARGET)
SET(CLANG_CUDA_ARCH ${KOKKOS_CUDA_ARCH_FLAG})
IF (CLANG_CUDA_ARCH)
Expand Down
1 change: 1 addition & 0 deletions cmake/kokkos_compiler_id.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ IF(KOKKOS_CXX_COMPILER_ID STREQUAL Clang)
OUTPUT_STRIP_TRAILING_WHITESPACE)
IF (INTERNAL_HAVE_CRAY_COMPILER) #not actually Clang
SET(KOKKOS_CLANG_IS_CRAY TRUE)
SET(KOKKOS_CXX_COMPILER_ID CrayClang)
ENDIF()
# The clang based Intel compiler reports as Clang to most versions of CMake
EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version
Expand Down
2 changes: 1 addition & 1 deletion cmake/kokkos_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ FUNCTION(kokkos_link_tpl TARGET)
ENDFUNCTION()

FUNCTION(COMPILER_SPECIFIC_OPTIONS_HELPER)
SET(COMPILERS NVIDIA NVHPC DEFAULT Cray Intel Clang AppleClang IntelLLVM GNU HIPCC Fujitsu MSVC)
SET(COMPILERS NVIDIA NVHPC DEFAULT Cray Intel Clang AppleClang IntelLLVM GNU HIPCC Fujitsu MSVC CrayClang)
CMAKE_PARSE_ARGUMENTS(
PARSE
"LINK_OPTIONS;COMPILE_OPTIONS;COMPILE_DEFINITIONS;LINK_LIBRARIES"
Expand Down

0 comments on commit ef426e8

Please sign in to comment.