Skip to content

Commit

Permalink
Try running shorter tests in some cases to prevent timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
rhornung67 committed Aug 15, 2024
1 parent 55c5228 commit 4948225
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
strategy:
matrix:
shared:
## ====================================
## Shared library build generated undefined symbol errors that are not
## understood -RDH
## - args:
## BUILD_SHARED_LIBS=On
## CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=On
Expand All @@ -59,6 +62,7 @@ jobs:
ENABLE_WARNINGS_AS_ERRORS=Off
BLT_CXX_STD=c++17
CMAKE_BUILD_TYPE=Release
PERFSUITE_RUN_SHORT_TEST=On
${{ matrix.shared.args }}
run-build: true
build-args: '--parallel 16'
Expand Down
18 changes: 13 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ else()
cmake_minimum_required(VERSION 3.20)
endif()

option(ENABLE_RAJA_SEQUENTIAL "Run sequential variants of RAJA kernels. Disable
this, and all other variants, to run _only_ base variants." On)
option(ENABLE_KOKKOS "Include Kokkos implementations of the kernels in the RAJA Perfsuite" Off)

#
# Note: the BLT build system is inheritted by RAJA and is initialized by RAJA
#
Expand All @@ -41,6 +37,13 @@ include(blt/SetupBLT.cmake)
# Define RAJA PERFSUITE settings...
#

option(PERFSUITE_RUN_SHORT_TEST "Run kernels only once for tests" Off)

option(ENABLE_RAJAPERF_SEQUENTIAL "Run sequential variants of RAJA kernels. Disable
this, and all other variants, to run _only_ base variants." On)

option(ENABLE_KOKKOS "Include Kokkos implementations of the kernels in the RAJA Perfsuite" Off)

cmake_dependent_option(RAJA_PERFSUITE_ENABLE_TESTS "Enable RAJA Perf Suite Tests" On "ENABLE_TESTS" Off)

if (ENABLE_TESTS)
Expand Down Expand Up @@ -129,9 +132,14 @@ include_directories(${RAJA_INCLUDE_DIRS})

set(CAMP_ENABLE_TESTS Off CACHE BOOL "")

if (ENABLE_RAJA_SEQUENTIAL)
if (ENABLE_RAJAPERF_SEQUENTIAL)
add_definitions(-DRUN_RAJA_SEQ)
endif ()

if (PERFSUITE_RUN_SHORT_TEST)
add_definitions(-DRUN_RAJAPERF_SHORT_TEST)
endif()

if (ENABLE_OPENMP)
add_definitions(-DRUN_OPENMP)
endif ()
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FROM ghcr.io/llnl/radiuss:gcc-12-ubuntu-22.04 AS gcc12_debug
ENV GTEST_COLOR=1
COPY . /home/raja/workspace
WORKDIR /home/raja/workspace/build
RUN cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DRAJA_ENABLE_WARNINGS=On -DRAJA_ENABLE_WARNINGS_AS_ERRORS=On -DENABLE_OPENMP=On .. && \
RUN cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DRAJA_ENABLE_WARNINGS=On -DRAJA_ENABLE_WARNINGS_AS_ERRORS=On -DENABLE_OPENMP=On -DPERFSUITE_RUN_SHORT_TEST=On .. && \
make -j 6 &&\
ctest -T test --output-on-failure

Expand Down Expand Up @@ -63,7 +63,7 @@ FROM ghcr.io/llnl/radiuss:clang-14-ubuntu-22.04 AS clang14_debug
ENV GTEST_COLOR=1
COPY . /home/raja/workspace
WORKDIR /home/raja/workspace/build
RUN cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENMP=On .. && \
RUN cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENMP=On -DPERFSUITE_RUN_SHORT_TEST=On .. && \
make -j 6 &&\
ctest -T test --output-on-failure

Expand Down
4 changes: 4 additions & 0 deletions test/test-raja-perf-suite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ TEST(ShortSuiteTest, Basic)
std::vector< std::string > sargv{};
sargv.emplace_back(std::string("dummy ")); // for executable name
sargv.emplace_back(std::string("--checkrun"));
#if defined(RUN_RAJAPERF_SHORT_TEST)
sargv.emplace_back(std::string("1"));
#else
sargv.emplace_back(std::string("3"));
#endif
sargv.emplace_back(std::string("--show-progress"));
sargv.emplace_back(std::string("--disable-warmup"));

Expand Down

0 comments on commit 4948225

Please sign in to comment.