From 00d0bc15ba2964c43218e1bc053d62137b6f6a81 Mon Sep 17 00:00:00 2001 From: Keichi Takahashi Date: Mon, 14 Feb 2022 13:37:50 +0900 Subject: [PATCH 1/7] Fix a bug in the CMake script where override flags are ignored --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6769952..54034ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ message(STATUS "Default ${CMAKE_BUILD_TYPE} flags are `${DEFAULT_${BUILD_TYPE}_F # setup common build flag defaults if there are no overrides if (NOT DEFINED ${BUILD_TYPE}_FLAGS) set(ACTUAL_${BUILD_TYPE}_FLAGS ${DEFAULT_${BUILD_TYPE}_FLAGS}) -elseif () +else () set(ACTUAL_${BUILD_TYPE}_FLAGS ${${BUILD_TYPE}_FLAGS}) endif () From 7b8a561f58f543ae80a3a9a06dfd27156c667698 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Wed, 27 Apr 2022 12:20:10 +0100 Subject: [PATCH 2/7] Update preferred Citation in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df95582..e4c2a15 100644 --- a/README.md +++ b/README.md @@ -163,11 +163,11 @@ Pull Requests should be made against the `develop` branch. Please cite BabelStream via this reference: -Deakin T, Price J, Martineau M, McIntosh-Smith S. GPU-STREAM v2.0: Benchmarking the achievable memory bandwidth of many-core processors across diverse parallel programming models. 2016. Paper presented at P^3MA Workshop at ISC High Performance, Frankfurt, Germany. DOI: 10.1007/978- 3-319-46079-6_34 +Deakin T, Price J, Martineau M, McIntosh-Smith S. Evaluating attainable memory bandwidth of parallel programming models via BabelStream. International Journal of Computational Science and Engineering. Special issue. Vol. 17, No. 3, pp. 247–262. 2018. DOI: 10.1504/IJCSE.2018.095847 ### Other BabelStream publications -* Deakin T, Price J, Martineau M, McIntosh-Smith S. Evaluating attainable memory bandwidth of parallel programming models via BabelStream. International Journal of Computational Science and Engineering. Special issue. Vol. 17, No. 3, pp. 247–262. 2018.DOI: 10.1504/IJCSE.2018.095847 +* Deakin T, Price J, Martineau M, McIntosh-Smith S. GPU-STREAM v2.0: Benchmarking the achievable memory bandwidth of many-core processors across diverse parallel programming models. 2016. Paper presented at P^3MA Workshop at ISC High Performance, Frankfurt, Germany. DOI: 10.1007/978- 3-319-46079-6_34 * Deakin T, McIntosh-Smith S. GPU-STREAM: Benchmarking the achievable memory bandwidth of Graphics Processing Units. 2015. Poster session presented at IEEE/ACM SuperComputing, Austin, United States. You can view the [Poster and Extended Abstract](http://sc15.supercomputing.org/sites/all/themes/SC15images/tech_poster/tech_poster_pages/post150.html). From 7c3f7c9220368fc610a3a069734d51683d4f72e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 12 Jun 2022 09:10:22 +0000 Subject: [PATCH 3/7] Bump crossbeam-utils from 0.8.5 to 0.8.8 in /src/rust/rust-stream Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.5 to 0.8.8. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.5...crossbeam-utils-0.8.8) --- updated-dependencies: - dependency-name: crossbeam-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src/rust/rust-stream/Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rust/rust-stream/Cargo.lock b/src/rust/rust-stream/Cargo.lock index 5f225f0..cb86dab 100644 --- a/src/rust/rust-stream/Cargo.lock +++ b/src/rust/rust-stream/Cargo.lock @@ -136,9 +136,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if", "lazy_static", @@ -426,7 +426,7 @@ dependencies = [ [[package]] name = "rust-stream" -version = "3.4.0" +version = "4.0.0" dependencies = [ "colour", "core_affinity", From 6945cbcec71be6ad09b2ea2a319169ab3dd99cf0 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Tue, 16 Aug 2022 15:43:22 +0000 Subject: [PATCH 4/7] Fix RAJA CUDA build RAJA looses the source directory, so need to remind it where the BabelStream source is to make sure it treats the source as CUDA NB: The RAJA CUDA build might be broken at this time. See https://github.com/LLNL/RAJA/issues/1296 Workaround below worked for us https://github.com/LLNL/RAJA/pull/1302 --- src/raja/model.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raja/model.cmake b/src/raja/model.cmake index 7e5f284..4da4af6 100644 --- a/src/raja/model.cmake +++ b/src/raja/model.cmake @@ -84,8 +84,8 @@ macro(setup) if (ENABLE_CUDA) # RAJA needs the codebase to be compiled with nvcc, so we tell cmake to treat sources as *.cu enable_language(CUDA) - set_source_files_properties(RAJAStream.cpp PROPERTIES LANGUAGE CUDA) - set_source_files_properties(main.cpp PROPERTIES LANGUAGE CUDA) + set_source_files_properties(src/raja/RAJAStream.cpp PROPERTIES LANGUAGE CUDA) + set_source_files_properties(src/main.cpp PROPERTIES LANGUAGE CUDA) endif () From 1b679996fcb0cdab2db00c2f9e326ea0cd4faa5a Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Tue, 16 Aug 2022 15:45:11 +0000 Subject: [PATCH 5/7] update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 903cb02..854d1f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ All notable changes to this project will be documented in this file. ## Unreleased -- None +### Changed +- RAJA CUDA CMake build issues resolved. ## [v4.0] - 2021-12-22 From 1d8e383a29f7a3fc98cdfd5b8082a3366c62675c Mon Sep 17 00:00:00 2001 From: Rob Jones <62852815+robj0nes@users.noreply.github.com> Date: Mon, 12 Sep 2022 10:58:47 +0100 Subject: [PATCH 6/7] In-package Kokkos builds Updating kokkos/model.cmake to allow for in-package builds (eg. Spack) --- src/kokkos/model.cmake | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/kokkos/model.cmake b/src/kokkos/model.cmake index 445991d..a95fdba 100644 --- a/src/kokkos/model.cmake +++ b/src/kokkos/model.cmake @@ -1,16 +1,17 @@ - register_flag_optional(CMAKE_CXX_COMPILER "Any CXX compiler that is supported by CMake detection and RAJA. See https://github.com/kokkos/kokkos#primary-tested-compilers-on-x86-are" "c++") -register_flag_required(KOKKOS_IN_TREE +register_flag_optional(KOKKOS_IN_TREE "Absolute path to the *source* distribution directory of Kokkos. Remember to append Kokkos specific flags as well, for example: - -DKOKKOS_IN_TREE=... -DKokkos_ENABLE_OPENMP=ON -DKokkos_ARCH_ZEN=ON ... + See https://github.com/kokkos/kokkos/blob/master/BUILD.md for all available options" "") - See https://github.com/kokkos/kokkos/blob/master/BUILD.md for all available options") +register_flag_optional(KOKKOS_IN_PACKAGE + "Use if Kokkos is part of a package dependency: + Path to package R-Path containing Kokkos libs" "") # compiler vendor and arch specific flags set(KOKKOS_FLAGS_CPU_INTEL -qopt-streaming-stores=always) @@ -20,13 +21,18 @@ macro(setup) set(CMAKE_CXX_STANDARD 14) cmake_policy(SET CMP0074 NEW) #see https://github.com/kokkos/kokkos/blob/master/BUILD.md - message(STATUS "Building using in-tree Kokkos source at `${KOKKOS_IN_TREE}`") if (EXISTS "${KOKKOS_IN_TREE}") + message(STATUS "Building using in-tree Kokkos source at `${KOKKOS_IN_TREE}`") add_subdirectory(${KOKKOS_IN_TREE} ${CMAKE_BINARY_DIR}/kokkos) register_link_library(Kokkos::kokkos) - else () - message(FATAL_ERROR "`${KOKKOS_IN_TREE}` does not exist") + elseif (EXISTS "${KOKKOS_IN_PACKAGE}") + message(STATUS "Building using packaged Kokkos at `${KOKKOS_IN_PACKAGE}`") + set (Kokkos_DIR "${KOKKOS_IN_PACKAGE}/lib64/cmake/Kokkos") + find_package(Kokkos REQUIRED) + register_link_library(Kokkos::kokkos) + else() + message(FATAL_ERROR "Neither `${KOKKOS_IN_TREE}`, or `${KOKKOS_IN_PACKAGE}` exists") endif () register_append_compiler_and_arch_specific_cxx_flags( @@ -36,5 +42,3 @@ macro(setup) ) endmacro() - - From 407d6701dfb01d8ac3262cac2cc4dbcf4f2b590e Mon Sep 17 00:00:00 2001 From: Rob Jones <62852815+robj0nes@users.noreply.github.com> Date: Thu, 15 Sep 2022 11:32:23 +0100 Subject: [PATCH 7/7] In-package linking to RAJA Introduced RAJA_IN_PACKAGE to allow for linking to an in-package dependency of RAJA (eg. Spack) --- src/raja/model.cmake | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/raja/model.cmake b/src/raja/model.cmake index 4da4af6..b1e7750 100644 --- a/src/raja/model.cmake +++ b/src/raja/model.cmake @@ -1,18 +1,19 @@ - register_flag_optional(CMAKE_CXX_COMPILER "Any CXX compiler that is supported by CMake detection and RAJA. See https://raja.readthedocs.io/en/main/getting_started.html#build-and-install" "c++") -register_flag_required(RAJA_IN_TREE +register_flag_optional(RAJA_IN_TREE "Absolute path to the *source* distribution directory of RAJA. Make sure to use the release version of RAJA or clone RAJA recursively with submodules. Remember to append RAJA specific flags as well, for example: - -DRAJA_IN_TREE=... -DENABLE_OPENMP=ON -DENABLE_CUDA=ON ... - See https://github.com/LLNL/RAJA/blob/08cbbafd2d21589ebf341f7275c229412d0fe903/CMakeLists.txt#L44 for all available options -") +" "") + +register_flag_optional(RAJA_IN_PACKAGE + "Use if Raja is part of a package dependency: + Path to installation" "") register_flag_optional(TARGET "Target offload device, implemented values are CPU, NVIDIA" @@ -76,8 +77,14 @@ macro(setup) register_link_library(RAJA) # RAJA's cmake screws with where the binary will end up, resetting it here: set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) + + elseif (EXISTS "${RAJA_IN_PACKAGE}") + message(STATUS "Building using packaged Raja at `${RAJA_IN_PACKAGE}`") + find_package(RAJA REQUIRED) + register_link_library(RAJA) + else () - message(FATAL_ERROR "`${RAJA_IN_TREE}` does not exist") + message(FATAL_ERROR "Neither `${RAJA_IN_TREE}` or `${RAJA_IN_PACKAGE}` exists") endif ()