Add bench6 test to run full mini-apps
This commit is contained in:
parent
1f71bc8e90
commit
9b373fb16c
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021-2022 Barcelona Supercomputing Center (BSC)
|
||||
# Copyright (c) 2021-2025 Barcelona Supercomputing Center (BSC)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
set(OVNI_TEST_SOURCE_DIR "${CMAKE_SOURCE_DIR}/test")
|
||||
@ -9,3 +9,4 @@ include(macros.cmake)
|
||||
add_subdirectory(unit)
|
||||
add_subdirectory(emu)
|
||||
add_subdirectory(rt)
|
||||
add_subdirectory(bench)
|
||||
|
||||
11
test/bench/CMakeLists.txt
Normal file
11
test/bench/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2025 Barcelona Supercomputing Center (BSC)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if(ENABLE_ALL_TESTS)
|
||||
message(STATUS "Enabling bench tests")
|
||||
else()
|
||||
message(STATUS "Disabling bench tests as ENABLE_ALL_TEST not set")
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_subdirectory(openmp)
|
||||
38
test/bench/openmp/CMakeLists.txt
Normal file
38
test/bench/openmp/CMakeLists.txt
Normal file
@ -0,0 +1,38 @@
|
||||
# Copyright (c) 2025 Barcelona Supercomputing Center (BSC)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
check_c_compiler_flag("-fopenmp=libompv" OPENMPV_COMPILER_FOUND)
|
||||
check_linker_flag(C "-fopenmp=libompv" OPENMPV_LINKER_FOUND)
|
||||
cmake_path(GET CMAKE_C_COMPILER PARENT_PATH CMAKE_C_COMPILER_PATH)
|
||||
|
||||
if(NOT OPENMPV_COMPILER_FOUND OR NOT OPENMPV_LINKER_FOUND)
|
||||
if(ENABLE_ALL_TESTS)
|
||||
message(FATAL_ERROR "Compiler doesn't support -fopenmp=libompv flag, cannot enable OpenMP-V RT tests")
|
||||
else()
|
||||
message(STATUS "Compiler doesn't support -fopenmp=libompv flag, disabling OpenMP-V RT tests")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package(Nosv)
|
||||
|
||||
if(NOT NOSV_FOUND)
|
||||
if(ENABLE_ALL_TESTS)
|
||||
message(FATAL_ERROR "nOS-V not found, cannot enable OpenMP-V RT tests")
|
||||
else()
|
||||
message(STATUS "nOS-V not found, disabling OpenMP-V RT tests")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Enabling libompv bench tests")
|
||||
|
||||
function(openmp_bench_test)
|
||||
ovni_test(${ARGN} SORT)
|
||||
set_property(TEST "${OVNI_TEST_NAME}" APPEND PROPERTY
|
||||
ENVIRONMENT "OMP_OVNI=1")
|
||||
set_property(TEST "${OVNI_TEST_NAME}" APPEND PROPERTY
|
||||
ENVIRONMENT "NOSV_CONFIG_OVERRIDE=instrumentation.version=ovni,ovni.level=3")
|
||||
endfunction()
|
||||
|
||||
openmp_bench_test(dummy.c NAME heat DRIVER heat.sh)
|
||||
1
test/bench/openmp/dummy.c
Normal file
1
test/bench/openmp/dummy.c
Normal file
@ -0,0 +1 @@
|
||||
int main(void) { return 0; }
|
||||
10
test/bench/openmp/heat.sh
Normal file
10
test/bench/openmp/heat.sh
Normal file
@ -0,0 +1,10 @@
|
||||
export NOSV_APPID=1
|
||||
export NOSV_CONFIG_OVERRIDE=instrumentation.version=ovni,ovni.level=2
|
||||
#export OMP_NUM_THREADS=1
|
||||
export OMP_OVNI=1
|
||||
|
||||
b6_heat_ompv
|
||||
|
||||
ovnisort ovni
|
||||
ovnitop ovni
|
||||
ovniemu -b ovni
|
||||
Loading…
x
Reference in New Issue
Block a user