diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index efdc38131..74cad0049 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,36 +8,21 @@ variables: BUILD_ROOT: ${CI_PROJECT_DIR} stages: - - l_build - - q_allocate_resources - - q_build - - q_release_resources + - allocate + - build + - release #### # Template -.srun_build_script: +.build_script: script: #Use pre-existing allocation if any - - JOBID=$(squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A) + - JOBID=$(if [[ "$SYS_TYPE" == "toss_3_x86_64_ib" ]]; then squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A; fi) - ASSIGN_ID=$(if [[ -n "${JOBID}" ]]; then echo "--jobid=${JOBID}"; fi) - - EXEC_PREFIX="srun -p pdebug ${ASSIGN_ID} -t 10 -N 1 --mpibind=off" #BUILD + TEST - echo -e "section_start:$(date +%s):build_and_test\r\e[0K Build and test ${CI_PROJECT_NAME}" - - ${EXEC_PREFIX} .gitlab/build_and_test.sh - - echo -e "section_end:$(date +%s):build_and_test\r\e[0K" - artifacts: - reports: - junit: build/junit.xml - - -.build_blueos_3_ppc64le_ib_p9_script: - script: - - EXEC_PREFIX="lalloc 1 -W 10 -q pdebug" - #BUILD + TEST - - echo -e "section_start:$(date +%s):build_and_test\r\e[0K - Build and test ${CI_PROJECT_NAME}" - - ${EXEC_PREFIX} .gitlab/build_and_test.sh + - ${ALLOC_COMMAND} .gitlab/build_and_test.sh - echo -e "section_end:$(date +%s):build_and_test\r\e[0K" artifacts: reports: diff --git a/.gitlab/build_lassen.yml b/.gitlab/build_lassen.yml index 0cd35459e..3096cc79a 100644 --- a/.gitlab/build_lassen.yml +++ b/.gitlab/build_lassen.yml @@ -20,33 +20,35 @@ #### # Template .build_on_lassen: - stage: l_build - extends: [.build_blueos_3_ppc64le_ib_p9_script, .on_lassen] + stage: build + variables: + ALLOC_COMMAND: "lalloc 1 -W 10 -q pdebug" + extends: [.build_script, .on_lassen] needs: [] #### # Build jobs -clang_upstream_link_with_nvcc (lassen): +lassen-clang_upstream_link_with_nvcc: variables: HOST_CONFIG: "clang@upstream_link_with_nvcc.cmake" extends: [.build_on_lassen, .with_cuda] -clang_upstream_nvcc_c++17 (lassen): +lassen-clang_upstream_nvcc_c++17: variables: HOST_CONFIG: "clang@upstream_nvcc_c++17.cmake" extends: [.build_on_lassen, .with_cuda] -clang_upstream_nvcc_c++17_no_separable (lassen): +lassen-clang_upstream_nvcc_c++17_no_separable: variables: HOST_CONFIG: "clang@upstream_nvcc_c++17_no_separable.cmake" extends: [.build_on_lassen, .with_cuda] -clang_upstream_nvcc_xlf (lassen): +lassen-clang_upstream_nvcc_xlf: variables: HOST_CONFIG: "clang@upstream_nvcc_xlf.cmake" extends: [.build_on_lassen, .with_cuda] -pgi_20.4_nvcc (lassen): +lassen-pgi_20.4_nvcc: variables: HOST_CONFIG: "pgi@20.4_nvcc.cmake" extends: [.build_on_lassen, .with_cuda] diff --git a/.gitlab/build_quartz.yml b/.gitlab/build_quartz.yml index f9cc757d4..e93d1610e 100644 --- a/.gitlab/build_quartz.yml +++ b/.gitlab/build_quartz.yml @@ -13,23 +13,23 @@ #### # In pre-build phase, allocate a node for builds -allocate_resources_build_quartz: +quartz_allocate: variables: GIT_STRATEGY: none extends: [.on_quartz] - stage: q_allocate_resources + stage: allocate script: - - salloc -p pdebug -N 1 -c 36 -t 30 --no-shell --job-name=${PROJECT_ALLOC_NAME} --mpibind=off + - salloc -p pdebug -N 1 -t 10 --no-shell --job-name=${PROJECT_ALLOC_NAME} --mpibind=off needs: [] #### # In post-build phase, deallocate resources # Note : make sure this is run even on build phase failure -release_resources_build_quartz: +quartz_release: variables: GIT_STRATEGY: none extends: [.on_quartz] - stage: q_release_resources + stage: release script: - export JOBID=$(squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A) - if [[ -n "${JOBID}" ]]; then scancel ${JOBID}; fi @@ -37,27 +37,29 @@ release_resources_build_quartz: #### # Template .build_on_quartz: - stage: q_build - extends: [.srun_build_script, .on_quartz] + stage: build + variables: + ALLOC_COMMAND: "srun -p pdebug -t 30 -N 1 ${ASSIGN_ID}" + extends: [.build_script, .on_quartz] #### # Build jobs -clang_4_0_0_libcxx (quartz): +quartz-clang_4_0_0_libcxx: variables: HOST_CONFIG: "clang@4.0.0-libcxx.cmake" extends: [.build_on_quartz] -clang_6_0_0_static_analysis (quartz): +quartz-clang_6_0_0_static_analysis: variables: HOST_CONFIG: "clang@6.0.0-static-analysis.cmake" extends: [.build_on_quartz] -gcc_8_3_1 (quartz): +quartz-gcc_8_3_1: variables: HOST_CONFIG: "gcc@8.3.1.cmake" extends: [.build_on_quartz] -pgi_20_1 (quartz): +quartz-pgi_20_1: variables: HOST_CONFIG: "pgi@20.1.cmake" extends: [.build_on_quartz] diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 14045ab33..7bb9847bb 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -9,9 +9,20 @@ The project release numbers follow [Semantic Versioning](http://semver.org/spec/ ## [Unreleased] - Release date yyyy-mm-dd +## [Version 0.4.1] - Release date 2021-07-20 + +### Added +- Added compilation of HIP with clang using ``ENABLE_CLANG_HIP`` and ``BLT_CLANG_HIP_ARCH`` + +### Changed +- XL: Use compiler flag `-std=c++14` instead of `-std=c++1y` when `BLT_CXX_STD` is set to `c++14` + +### Fixed +- Simpified the clang-format version regex that was causing hangs on some version strings. + ## [Version 0.4.0] - Release date 2021-04-09 -## Added +### Added - Added variable ``BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE`` for filtering link directories implicitly added by CMake. See the following example host-config: ``host-configs/llnl/blueos_3_ppc64le_ib_p9/clang@upstream_nvcc_c++17.cmake`` @@ -202,7 +213,8 @@ The project release numbers follow [Semantic Versioning](http://semver.org/spec/ -[Unreleased]: https://github.com/LLNL/blt/compare/v0.4.0...develop +[Unreleased]: https://github.com/LLNL/blt/compare/v0.4.1...develop +[Version 0.4.1]: https://github.com/LLNL/blt/compare/v0.4.0...v0.4.1 [Version 0.4.0]: https://github.com/LLNL/blt/compare/v0.3.6...v0.4.0 [Version 0.3.6]: https://github.com/LLNL/blt/compare/v0.3.5...v0.3.6 [Version 0.3.5]: https://github.com/LLNL/blt/compare/v0.3.0...v0.3.5 diff --git a/SetupBLT.cmake b/SetupBLT.cmake index 322bde168..6402d4dd1 100644 --- a/SetupBLT.cmake +++ b/SetupBLT.cmake @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (BSD-3-Clause) if (NOT BLT_LOADED) - set(BLT_VERSION "0.4.0" CACHE STRING "") + set(BLT_VERSION "0.4.1" CACHE STRING "") mark_as_advanced(BLT_VERSION) message(STATUS "BLT Version: ${BLT_VERSION}") diff --git a/cmake/BLTMacros.cmake b/cmake/BLTMacros.cmake index 5fd6be7e3..e41d12837 100644 --- a/cmake/BLTMacros.cmake +++ b/cmake/BLTMacros.cmake @@ -644,7 +644,7 @@ macro(blt_add_library) set(_lib_type "STATIC") endif() - if (ENABLE_HIP) + if (ENABLE_HIP AND NOT ENABLE_CLANG_HIP) blt_add_hip_library(NAME ${arg_NAME} SOURCES ${arg_SOURCES} HEADERS ${arg_HEADERS} @@ -775,7 +775,7 @@ macro(blt_add_executable) message(FATAL_ERROR "blt_add_executable(NAME ${arg_NAME} ...) given with no sources") endif() - if (ENABLE_HIP) + if (ENABLE_HIP AND NOT ENABLE_CLANG_HIP) blt_add_hip_executable(NAME ${arg_NAME} SOURCES ${arg_SOURCES} HEADERS ${arg_HEADERS} diff --git a/cmake/BLTOptions.cmake b/cmake/BLTOptions.cmake index edd1e5168..fd9cef252 100644 --- a/cmake/BLTOptions.cmake +++ b/cmake/BLTOptions.cmake @@ -53,11 +53,17 @@ option(ENABLE_FORTRAN "Enables Fortran compiler support" ${_fortran_already option(ENABLE_MPI "Enables MPI support" OFF) option(ENABLE_OPENMP "Enables OpenMP compiler support" OFF) option(ENABLE_CUDA "Enable CUDA support" OFF) -option(ENABLE_CLANG_CUDA "Enable Clang's native CUDA support" OFF) +cmake_dependent_option(ENABLE_CLANG_CUDA "Enable Clang's native CUDA support" OFF + "ENABLE_CUDA" OFF) mark_as_advanced(ENABLE_CLANG_CUDA) set(BLT_CLANG_CUDA_ARCH "sm_30" CACHE STRING "Compute architecture to use when generating CUDA code with Clang") mark_as_advanced(BLT_CLANG_CUDA_ARCH) option(ENABLE_HIP "Enable HIP support" OFF) +cmake_dependent_option(ENABLE_CLANG_HIP "Enable Clang's native HIP support" OFF + "ENABLE_HIP" OFF) +mark_as_advanced(ENABLE_CLANG_HIP) +set(BLT_CLANG_HIP_ARCH "gfx906" CACHE STRING "AMDGPU ISA target to use when generating HIP code with Clang" ) +mark_as_advanced(BLT_CLANG_HIP_ARCH) option(ENABLE_HCC "Enable HCC support" OFF) set(BLT_ROCM_ARCH "gfx900" CACHE STRING "gfx architecture to use when generating ROCm code") diff --git a/cmake/SetupCodeChecks.cmake b/cmake/SetupCodeChecks.cmake index 8e3facda9..9eb09c991 100644 --- a/cmake/SetupCodeChecks.cmake +++ b/cmake/SetupCodeChecks.cmake @@ -684,7 +684,8 @@ macro(blt_add_clangformat_target) OUTPUT_VARIABLE _version_str OUTPUT_STRIP_TRAILING_WHITESPACE) # The version number is the last token - can contain non-numeric - string(REGEX MATCH "([0-9a-zA-Z\\-]+(\\.)?)+$" _clangformat_version ${_version_str}) + string(REGEX MATCH "([0-9a-zA-Z\\-]+\\.[0-9a-zA-Z\\-]+\\.?[0-9a-zA-Z\\-]?)" + _clangformat_version ${_version_str}) # The user may only specify a part of the version (e.g. just the maj ver) # so check for substring string(FIND "${_clangformat_version}" ${BLT_REQUIRED_CLANGFORMAT_VERSION} VERSION_POS) diff --git a/cmake/SetupCompilerOptions.cmake b/cmake/SetupCompilerOptions.cmake index db38469bd..9f3453106 100644 --- a/cmake/SetupCompilerOptions.cmake +++ b/cmake/SetupCompilerOptions.cmake @@ -268,7 +268,7 @@ if (BLT_CXX_STD) blt_append_custom_compiler_flag( FLAGS_VAR CMAKE_CXX_FLAGS DEFAULT " " - XL "-std=c++1y" + XL "-std=c++14" PGI "--c++14") elseif( BLT_CXX_STD STREQUAL c++17) # Error out on what does not support C++17 diff --git a/cmake/thirdparty/SetupHIP.cmake b/cmake/thirdparty/SetupHIP.cmake index 5437fb580..cc4c7e8f0 100644 --- a/cmake/thirdparty/SetupHIP.cmake +++ b/cmake/thirdparty/SetupHIP.cmake @@ -15,24 +15,108 @@ find_package(HIP REQUIRED) message(STATUS "HIP version: ${HIP_VERSION_STRING}") message(STATUS "HIP platform: ${HIP_PLATFORM}") -if("${HIP_PLATFORM}" STREQUAL "hcc" OR "${HIP_PLATFORM}" STREQUAL "amd") - set(HIP_RUNTIME_DEFINE "__HIP_PLATFORM_HCC__") -elseif("${HIP_PLATFORM}" STREQUAL "nvcc") - set(HIP_RUNTIME_DEFINE "__HIP_PLATFORM_NVCC__") +set(HIP_RUNTIME_INCLUDE_DIRS "${HIP_ROOT_DIR}/include") +if(${HIP_PLATFORM} STREQUAL "hcc") + set(HIP_RUNTIME_DEFINES "-D__HIP_PLATFORM_HCC__") + find_library(HIP_RUNTIME_LIBRARIES NAMES hip_hcc libhip_hcc + PATHS ${HIP_ROOT_DIR}/lib + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH) + set(HIP_RUNTIME_LIBRARIES "${HIP_ROOT_DIR}/lib/libhip_hcc.so") +elseif(${HIP_PLATFORM} STREQUAL "clang" OR ${HIP_PLATFORM} STREQUAL "amd") + set(HIP_RUNTIME_DEFINES "-D__HIP_PLATFORM_HCC__;-D__HIP_ROCclr__;-D__HIP_PLATFORM_AMD__") + find_library(HIP_RUNTIME_LIBRARIES NAMES amdhip64 libamdhip64 + PATHS ${HIP_ROOT_DIR}/lib + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH) +elseif(${HIP_PLATFORM} STREQUAL "nvcc" OR ${HIP_PLATFORM} STREQUAL "nvidia") + set(HIP_RUNTIME_DEFINES "-D__HIP_PLATFORM_NVCC__;-D__HIP_PLATFORM_NVIDIA__") + if (${CMAKE_VERSION} VERSION_LESS "3.17.0") + find_package(CUDA) + find_library(HIP_RUNTIME_LIBRARIES NAMES cudart libcudart + PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH) + set(HIP_RUNTIME_INCLUDE_DIRS "${HIP_RUNTIME_INCLUDE_DIRS};${CUDA_INCLUDE_DIRS}") + else() + find_package(CUDAToolkit) + find_library(HIP_RUNTIME_LIBRARIES NAMES cudart libcudart + PATHS ${CUDAToolkit_LIBRARY_DIR} + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH) + set(HIP_RUNTIME_INCLUDE_DIRS "${HIP_RUNTIME_INCLUDE_DIRS};${CUDAToolkit_INCLUDE_DIR}") + endif() endif() + if ( IS_DIRECTORY "${HIP_ROOT_DIR}/hcc/include" ) # this path only exists on older rocm installs - set(HIP_RUNTIME_INCLUDE_DIRS "${HIP_ROOT_DIR}/include;${HIP_ROOT_DIR}/hcc/include" CACHE STRING "") + set(HIP_RUNTIME_INCLUDE_DIRS "${HIP_ROOT_DIR}/include;${HIP_ROOT_DIR}/hcc/include" CACHE STRING "") else() - set(HIP_RUNTIME_INCLUDE_DIRS "${HIP_ROOT_DIR}/include" CACHE STRING "") + set(HIP_RUNTIME_INCLUDE_DIRS "${HIP_ROOT_DIR}/include" CACHE STRING "") endif() -set(HIP_RUNTIME_COMPILE_FLAGS "${HIP_RUNTIME_COMPILE_FLAGS};-D${HIP_RUNTIME_DEFINE};-Wno-unused-parameter") +set(HIP_RUNTIME_COMPILE_FLAGS "${HIP_RUNTIME_COMPILE_FLAGS};-Wno-unused-parameter") + +set(_hip_compile_flags " ") +if (ENABLE_CLANG_HIP) + if (NOT (${HIP_PLATFORM} STREQUAL "clang")) + message(FATAL_ERROR "ENABLE_CLANG_HIP requires HIP_PLATFORM=clang") + endif() + set(_hip_compile_flags -x;hip) + # Using clang HIP, we need to construct a few CPP defines and compiler flags + foreach(_arch ${BLT_CLANG_HIP_ARCH}) + string(TOUPPER ${_arch} _UPARCH) + string(TOLOWER ${_arch} _lowarch) + list(APPEND _hip_compile_flags "--offload-arch=${_lowarch}") + set(_hip_compile_defines "${HIP_RUNTIME_DEFINES};-D__HIP_ARCH_${_UPARCH}__=1") + endforeach(_arch) + + # We need to pass rocm path as well, for certain bitcode libraries. + # First see if we were given it, then see if it exists in the environment. + # If not, don't try to guess but print a warning and hope the compiler knows where it is. + if (NOT ROCM_PATH) + find_path(ROCM_PATH + bin/rocminfo + ENV ROCM_DIR + ENV ROCM_PATH + ${HIP_ROOT_DIR}/../ + ${ROCM_ROOT_DIR} + /opt/rocm) + endif() + + if(DEFINED ROCM_PATH) + list(APPEND _hip_compile_flags "--rocm-path=${ROCM_PATH}") + else() + message(WARN "ROCM_PATH not set or found! This is typically required for Clang HIP Compilation") + endif() + + message(STATUS "Clang HIP Enabled. Clang flags for HIP compilation: ${_hip_compile_flags}") + message(STATUS "Defines for HIP compilation: ${_hip_compile_defines}") + + blt_import_library(NAME hip + DEFINES ${_hip_compile_defines} + COMPILE_FLAGS ${_hip_compile_flags} + DEPENDS_ON ${HIP_RUNTIME_LIBRARIES}) +else() # depend on 'hip', if you need to use hip # headers, link to hip libs, and need to run your source # through a hip compiler (hipcc) # This is currently used only as an indicator for blt_add_hip* -- FindHIP/hipcc will handle resolution # of all required HIP-related includes/libraries/flags. -blt_import_library(NAME hip) + blt_import_library(NAME hip) +endif() + # depend on 'hip_runtime', if you only need to use hip # headers or link to hip libs, but don't need to run your source @@ -41,5 +125,6 @@ blt_import_library(NAME hip_runtime INCLUDES ${HIP_RUNTIME_INCLUDE_DIRS} DEFINES ${HIP_RUNTIME_DEFINES} COMPILE_FLAGS ${HIP_RUNTIME_COMPILE_FLAGS} + DEPENDS_ON ${HIP_RUNTIME_LIBRARIES} TREAT_INCLUDES_AS_SYSTEM ON EXPORTABLE ${BLT_EXPORT_THIRDPARTY}) diff --git a/cmake/thirdparty/SetupMPI.cmake b/cmake/thirdparty/SetupMPI.cmake index 812df35e0..c04e0b6ef 100644 --- a/cmake/thirdparty/SetupMPI.cmake +++ b/cmake/thirdparty/SetupMPI.cmake @@ -31,7 +31,13 @@ set(_mpi_includes ) set(_mpi_libraries ) set(_mpi_link_flags ) -message(STATUS "Enable FindMPI: ${ENABLE_FIND_MPI}") + +if(ENABLE_FIND_MPI) + message(STATUS "FindMPI Enabled (ENABLE_FIND_MPI == ON)") +else() + message(STATUS "FindMPI Disabled (ENABLE_FIND_MPI == OFF) ") +endif() + if (ENABLE_FIND_MPI) find_package(MPI REQUIRED) diff --git a/docs/_static/style.css b/docs/_static/style.css index 775d1a851..ebe26836b 100644 --- a/docs/_static/style.css +++ b/docs/_static/style.css @@ -33,5 +33,5 @@ } a img.logo { - scale: 75% + transform: scale(.75) } diff --git a/docs/tutorial/third_party_libraries.rst b/docs/tutorial/third_party_libraries.rst index e9f5255d3..761087ffb 100644 --- a/docs/tutorial/third_party_libraries.rst +++ b/docs/tutorial/third_party_libraries.rst @@ -81,8 +81,8 @@ searching for the include directories and then for the library itself. Finally blt_import_library(NAME lua TREAT_INCLUDES_AS_SYSTEM ON DEFINES HAVE_LUA=1 - INCLUDES ${LUA_LIBRARY} - LIBRARIES ${LUA_INCLUDE_DIR} + INCLUDES ${LUA_INCLUDE_DIR} + LIBRARIES ${LUA_LIBRARY} EXPORTABLE ON) Then ``lua`` is available to be used in the ``DEPENDS_ON`` list in the following @@ -114,10 +114,11 @@ new imported library's ``NAME`` in the rest of your project. .. code-block:: cmake - # FindLua.cmake takes in LUA_DIR, which the directory where Lua was installed to - # and fills variables: LUA_FOUND, LUA_LIBRARIES, and LUA_INCLUDE_DIR - find_package(Lua NO_DEFAULT_PATH - PATHS ${LUA_DIR}) + # FindLua.cmake takes in LUA_DIR as an environment variable, which is the directory + # where Lua was installed to and fills variables: LUA_FOUND, LUA_LIBRARIES, and LUA_INCLUDE_DIR + set(ENV{LUA_DIR} ${LUA_DIR}) + + find_package(Lua) if (NOT LUA_FOUND) MESSAGE(FATAL_ERROR "Could not find Lua in the provided LUA_DIR: ${LUA_DIR}") @@ -126,8 +127,8 @@ new imported library's ``NAME`` in the rest of your project. blt_import_library(NAME lua TREAT_INCLUDES_AS_SYSTEM ON DEFINES HAVE_LUA=1 - INCLUDES ${LUA_LIBRARIES} - LIBRARIES ${LUA_INCLUDE_DIR} + INCLUDES ${LUA_INCLUDE_DIR} + LIBRARIES ${LUA_LIBRARIES} EXPORTABLE ON) diff --git a/host-configs/llnl/toss_4_x86_64_ib_cray/cce@12.0.0_clang_hip.cmake b/host-configs/llnl/toss_4_x86_64_ib_cray/cce@12.0.0_clang_hip.cmake new file mode 100644 index 000000000..3c9f904c5 --- /dev/null +++ b/host-configs/llnl/toss_4_x86_64_ib_cray/cce@12.0.0_clang_hip.cmake @@ -0,0 +1,55 @@ +# Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and +# other BLT Project Developers. See the top-level LICENSE file for details +# +# SPDX-License-Identifier: (BSD-3-Clause) + +#------------------------------------------------------------------------------ +# Example host-config file for the rznevada cluster at LLNL +#------------------------------------------------------------------------------ +# This file provides CMake with paths / details for: +# C,C++, & Fortran compilers + MPI & HIP +# using tce wrappers, rather than HPE Cray PE compiler drivers +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# HPE Cray cce@12.0.0 compilers +#------------------------------------------------------------------------------ +# _blt_tutorial_compiler_config_start +set(CCE_HOME "/usr/tce/packages/cce-tce/cce-12.0.0") +set(CMAKE_C_COMPILER "${CCE_HOME}/bin/craycc" CACHE PATH "") +set(CMAKE_CXX_COMPILER "${CCE_HOME}/bin/crayCC" CACHE PATH "") + +# Fortran support +set(ENABLE_FORTRAN ON CACHE BOOL "") +set(CMAKE_Fortran_COMPILER "${CCE_HOME}/bin/crayftn" CACHE PATH "") +# _blt_tutorial_compiler_config_end + +#------------------------------------------------------------------------------ +# MPI Support +#------------------------------------------------------------------------------ +# _blt_tutorial_mpi_config_start +set(ENABLE_MPI ON CACHE BOOL "") + +set(MPI_HOME "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.5.6-cce-12.0.0/") +set(MPI_C_COMPILER "${MPI_HOME}/bin/mpicc" CACHE PATH "") + +set(MPI_CXX_COMPILER "${MPI_HOME}/bin/mpicxx" CACHE PATH "") + +set(MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpif90" CACHE PATH "") +# _blt_tutorial_mpi_config_end + +#------------------------------------------------------------------------------ +# HIP support +#------------------------------------------------------------------------------ +# _blt_tutorial_hip_config_start +set(ENABLE_HIP ON CACHE BOOL "") +set(ENABLE_CLANG_HIP ON CACHE BOOL "") + +set(ROCM_PATH "/opt/rocm-4.1.0/" CACHE PATH "") +set(HIP_PLATFORM "clang" CACHE STRIING "") + +set(BLT_CLANG_HIP_ARCH "gfx908" CACHE STRING "") + + +# _blt_tutorial_hip_config_end +