# to run
#
# TEST_MPI_RANK_LIMIT
-# - specifying the maximal number of MPI ranks that can be used. If a
+# - 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.
+# 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.
#
# Usage:
# DEAL_II_ADD_TEST(category test_name comparison_file)
#
ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/output
- COMMAND sh ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
+ COMMAND TEST_THREAD_LIMIT=${TEST_THREAD_LIMIT}
+ sh ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
run "${_test_full}" ${_run_args}
COMMAND ${PERL_EXECUTABLE}
-pi ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/normalize.pl
# TEST_LIBRARIES
# TEST_LIBRARIES_DEBUG
# TEST_LIBRARIES_RELEASE
-# - specifying additional libraries (and targets) to link against.
+# - Specify additional libraries (and targets) to link against.
#
# TEST_TARGET or
# TEST_TARGET_DEBUG and TEST_TARGET_RELEASE
-# - specifying a test target to be executed for a parameter run.
+# - Specifies a test target to be executed for a parameter run.
#
# TEST_TIME_LIMIT
# - Specifies the maximal wall clock time in seconds a test is
# allowed to run. Defaults to 600.
# TEST_MPI_RANK_LIMIT
-# - specifying the maximal number of MPI ranks that can be used. If a
+# - 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.
+# 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.
#
# TEST_PICKUP_REGEX
# - A regular expression to select only a subset of tests during setup.
SET_IF_EMPTY(TEST_MPI_RANK_LIMIT "$ENV{TEST_MPI_RANK_LIMIT}")
SET_IF_EMPTY(TEST_MPI_RANK_LIMIT 0)
+ SET_IF_EMPTY(TEST_THREAD_LIMIT "$ENV{TEST_THREAD_LIMIT}")
+ SET_IF_EMPTY(TEST_THREAD_LIMIT 3)
+
#
# ... and finally pick up tests:
#
# Ensure uniform sorting for pathname expansion
export LC_ALL=C
-# Prevent OpenMP from creating additional threads
-export OMP_NUM_THREADS=2
-# Allow oversubscription for MPI (needed for Openmpi@3.0)
-export OMPI_MCA_rmaps_base_oversubscribe=1
case $STAGE in
run)
# failing_output
##
+ # Limit the deal.II thread pool to TEST_THREAD_LIMIT threads.
+ export DEAL_II_NUM_THREADS="${TEST_THREAD_LIMIT}"
+
+ # Limit the OpenMP pool to two threads.
+ export OMP_NUM_THREADS="2"
+
+ # Allow oversubscription for MPI (needed for Openmpi@3.0)
+ export OMPI_MCA_rmaps_base_oversubscribe=1
+
rm -f failing_output
rm -f output
rm -f stdout