Skip to content

Commit fc6d032

Browse files
committed
Use model name as exe prefix
Drop C++17 requirement for OMP
1 parent 14aefec commit fc6d032

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

OMP.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ register_flag_optional(OFFLOAD_APPEND_LINK_FLAG
9999

100100

101101
macro(setup)
102-
set(CMAKE_CXX_STANDARD 17)
103-
104102
find_package(OpenMP REQUIRED)
105103
register_link_library(OpenMP::OpenMP_CXX)
106104

ci-test-compile.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,16 @@ run_build() {
5050
-DCMAKE_BUILD_TYPE=Release \
5151
-DCMAKE_VERBOSE_MAKEFILE=ON \
5252
-DMODEL="$model" $flags &>>"$log"
53+
local model_lower=$(echo "$model" | awk '{print tolower($0)}')
54+
5355
local cmake_code=$?
5456

55-
"$CMAKE_BIN" --build "$build" --target babelstream -j "$(nproc)" &>>"$log"
57+
"$CMAKE_BIN" --build "$build" -j "$(nproc)" &>>"$log"
5658
local cmake_code=$?
5759
set -e
5860

59-
local bin="./$build/babelstream"
61+
local bin="./$build/$model_lower-stream"
62+
echo "Checking for final executable: $bin"
6063
if [[ -f "$bin" ]]; then
6164
echo "$(tput setaf 2)[PASS!]($model->$build)$(tput sgr0): -DMODEL=$model $flags"
6265
# shellcheck disable=SC2002
@@ -119,7 +122,7 @@ build_gcc() {
119122
if [ "$MODEL" = "all" ] || [ "$MODEL" = "OMP" ]; then
120123
# sanity check that it at least runs
121124
echo "Sanity checking GCC OMP build..."
122-
"./$BUILD_DIR/OMP_$name/babelstream" -s 1048576 -n 10
125+
"./$BUILD_DIR/OMP_$name/omp-stream" -s 1048576 -n 10
123126
fi
124127

125128
# some distributions like Ubuntu bionic implements std par with TBB, so conditionally link it here

register_models.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,11 @@ macro(load_model MODEL)
136136
include(${MODEL_FILE})
137137
list(APPEND IMPL_SOURCES ${IMPL_${MODEL_UPPER}_SOURCES})
138138
list(APPEND IMPL_DEFINITIONS ${IMPL_${MODEL_UPPER}_DEFINITIONS})
139+
140+
string(TOLOWER ${MODEL} MODEL_LOWER)
141+
set(EXE_NAME ${MODEL_LOWER}-stream)
142+
143+
else ()
144+
message(FATAL_ERROR "Unsupported model: ${MODEL}")
139145
endif ()
140146
endmacro()

0 commit comments

Comments
 (0)