Skip to content

Commit

Permalink
Update documentation, pass through variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tamiko committed Feb 8, 2022
1 parent 695f6cc commit 26f3675
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 11 deletions.
11 changes: 7 additions & 4 deletions cmake/macros/macro_deal_ii_add_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,20 @@
# - Complete path to the numdiff binary.
#
# TEST_TIME_LIMIT
# - specifying the maximal wall clock time in seconds a test is allowed
# to run
# - Specifies the maximal wall clock time in seconds a test is allowed
# to run.
#
# TEST_MPI_RANK_LIMIT
# - Specifies the maximal number of MPI ranks that can be used. If a
# test variant configures a larger number of MPI ranks (via
# .mpirun=N. in the output file) than this limit the test will be
# dropped. The special value 0 enforces no limit. Defaults to 0.

# TEST_THREAD_LIMIT
# - Specifies the maximal number of worker threads that can be used by
# the threading backend. Defaults to 3.
# - Specifies the maximal number of worker threads that can should be
# used by the threading backend. Note that individual tests might
# exceed this limit by calling MultithreadInfo::set_thread_limit(), or
# by manually creating additional threads. Defaults to 3.
#
# Usage:
# DEAL_II_ADD_TEST(category test_name comparison_file)
Expand Down
6 changes: 4 additions & 2 deletions cmake/macros/macro_deal_ii_pickup_tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@
# .mpirun=N. in the output file) than this limit the test will be
# dropped. The special value 0 enforces no limit. Defaults to 0.
# TEST_THREAD_LIMIT
# - Specifies the maximal number of worker threads that can be used
# by the threading backend. Defaults to 3.
# - Specifies the maximal number of worker threads that can should be
# used by the threading backend. Note that individual tests might
# exceed this limit by calling MultithreadInfo::set_thread_limit(),
# or by manually creating additional threads. Defaults to 3.
#
# TEST_PICKUP_REGEX
# - A regular expression to select only a subset of tests during setup.
Expand Down
3 changes: 2 additions & 1 deletion doc/developers/testsuite.html
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,8 @@ <h2>Submitting test results</h2>
- Additional options that will be passed directly to make (or ninja).
</pre>

Furthermore, the variables TEST_TIME_LIMIT and TEST_PICKUP_REGEX (as
Furthermore, the variables TEST_TIME_LIMIT, TEST_MPI_RANK_LIMIT,
TEST_THREAD_LIMIT and TEST_PICKUP_REGEX (as
described <a href="#setupbuild">above</a>), DIFF_DIR, and NUMDIFF_DIR
can also be set and will be handed automatically down
to <code>cmake</code>. For more details on the different tracks, see
Expand Down
16 changes: 14 additions & 2 deletions doc/users/testsuite.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,20 @@ <h3>Advanced configuration</h3>
- pointing to a valid "numdiff" executable

TEST_TIME_LIMIT
- specifying the maximal wall clock time in seconds a test is allowed
to run</pre>
- Specifies the maximal wall clock time in seconds a test is allowed
to run.

TEST_MPI_RANK_LIMIT
- Specifies the maximal number of MPI ranks that can be used. If a
test variant configures a larger number of MPI ranks (via
.mpirun=N. in the output file) than this limit the test will be
dropped. The special value 0 enforces no limit. Defaults to 0.

TEST_THREAD_LIMIT
- Specifies the maximal number of worker threads that can should be used
by the threading backend. Note that individual tests might exceed this
limit by calling MultithreadInfo::set_thread_limit(), or by manually
creating additional threads. Defaults to 3.</pre>
<hr />
<div class="right">
<a href="http://validator.w3.org/check?uri=referer" target="_top">
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfile.cmake "")
#
# Always undefine the following variables in the setup_tests target:
#
FOREACH(_var DIFF_DIR NUMDIFF_DIR TEST_PICKUP_REGEX TEST_TIME_LIMIT)
FOREACH(_var DIFF_DIR NUMDIFF_DIR TEST_PICKUP_REGEX TEST_TIME_LIMIT TEST_MPI_RANK_LIMIT TEST_THREAD_LIMIT)
LIST(APPEND _options "-U${_var}")
IF(NOT "${${_var}}" STREQUAL "")
LIST(APPEND _options "-D${_var}=${${_var}}")
Expand Down
2 changes: 1 addition & 1 deletion tests/setup_testsubproject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FIND_PACKAGE(deal.II 9.2.0 REQUIRED HINTS ${DEAL_II_DIR})
SET(CMAKE_BUILD_TYPE ${DEAL_II_BUILD_TYPE} CACHE STRING "" FORCE)
DEAL_II_INITIALIZE_CACHED_VARIABLES()

FOREACH(_var DIFF_DIR NUMDIFF_DIR TEST_PICKUP_REGEX TEST_TIME_LIMIT)
FOREACH(_var DIFF_DIR NUMDIFF_DIR TEST_PICKUP_REGEX TEST_TIME_LIMIT TEST_MPI_RANK_LIMIT TEST_THREAD_LIMIT)
SET_IF_EMPTY(${_var} "$ENV{${_var}}")
SET(${_var} "${${_var}}" CACHE STRING "" FORCE)
ENDFOREACH()
Expand Down

0 comments on commit 26f3675

Please sign in to comment.