From fc6d032d7f9cc0df662d44c1b3b12741a424d8b6 Mon Sep 17 00:00:00 2001 From: Tom Lin Date: Tue, 23 Mar 2021 18:16:42 +0000 Subject: [PATCH] Use model name as exe prefix Drop C++17 requirement for OMP --- OMP.cmake | 2 -- ci-test-compile.sh | 9 ++++++--- register_models.cmake | 6 ++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/OMP.cmake b/OMP.cmake index 776c9b2..c8dde9f 100644 --- a/OMP.cmake +++ b/OMP.cmake @@ -99,8 +99,6 @@ register_flag_optional(OFFLOAD_APPEND_LINK_FLAG macro(setup) - set(CMAKE_CXX_STANDARD 17) - find_package(OpenMP REQUIRED) register_link_library(OpenMP::OpenMP_CXX) diff --git a/ci-test-compile.sh b/ci-test-compile.sh index 7a1b836..46046c4 100755 --- a/ci-test-compile.sh +++ b/ci-test-compile.sh @@ -50,13 +50,16 @@ run_build() { -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DMODEL="$model" $flags &>>"$log" + local model_lower=$(echo "$model" | awk '{print tolower($0)}') + local cmake_code=$? - "$CMAKE_BIN" --build "$build" --target babelstream -j "$(nproc)" &>>"$log" + "$CMAKE_BIN" --build "$build" -j "$(nproc)" &>>"$log" local cmake_code=$? set -e - local bin="./$build/babelstream" + local bin="./$build/$model_lower-stream" + echo "Checking for final executable: $bin" if [[ -f "$bin" ]]; then echo "$(tput setaf 2)[PASS!]($model->$build)$(tput sgr0): -DMODEL=$model $flags" # shellcheck disable=SC2002 @@ -119,7 +122,7 @@ build_gcc() { if [ "$MODEL" = "all" ] || [ "$MODEL" = "OMP" ]; then # sanity check that it at least runs echo "Sanity checking GCC OMP build..." - "./$BUILD_DIR/OMP_$name/babelstream" -s 1048576 -n 10 + "./$BUILD_DIR/OMP_$name/omp-stream" -s 1048576 -n 10 fi # some distributions like Ubuntu bionic implements std par with TBB, so conditionally link it here diff --git a/register_models.cmake b/register_models.cmake index 300315e..a4f7a94 100644 --- a/register_models.cmake +++ b/register_models.cmake @@ -136,5 +136,11 @@ macro(load_model MODEL) include(${MODEL_FILE}) list(APPEND IMPL_SOURCES ${IMPL_${MODEL_UPPER}_SOURCES}) list(APPEND IMPL_DEFINITIONS ${IMPL_${MODEL_UPPER}_DEFINITIONS}) + + string(TOLOWER ${MODEL} MODEL_LOWER) + set(EXE_NAME ${MODEL_LOWER}-stream) + + else () + message(FATAL_ERROR "Unsupported model: ${MODEL}") endif () endmacro() \ No newline at end of file