From c68fac2cfc7c3915217de40b3025b34a4f95a3ec Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Thu, 23 Mar 2023 14:26:53 -0700 Subject: [PATCH] tests: Add "run threads" optional parameter to weekly.sh Adds a third argument to the weekly.sh script, allowing for a different number of "run threads" (maximum number of tests that can be run at once) and "compile threads" (threads to allocate to the running of gem5). This is useful for cases where a high number of compilation threads is wanted (e.g., 50 or so), but that number of tests running at once is undesirable. Change-Id: Ifd67c5826c6f3602db1546a8a48e615cb03ba820 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69241 Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce Tested-by: kokoro --- tests/weekly.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/weekly.sh b/tests/weekly.sh index f9d3e4bc04..d07cc8b2a6 100755 --- a/tests/weekly.sh +++ b/tests/weekly.sh @@ -39,15 +39,24 @@ docker_mem_limit="24g" # branch) tag="latest" -# We assume the first two arguments are the number of threads followed by the -# GPU ISA to test. These default to 1 and GCN3_X86 is no argument is given. +# We assume the first three arguments are the number of threads to use for +# compilation followed by the GPU ISA to test, and finally, the number of +# "run threads", the maximum number of tests to be run at once. By default the +# number of compile threads 1 and the GPU ISA is GCN3_X86. The number of +# "run threads" is equal to the number of compile threads by default. threads=1 gpu_isa=GCN3_X86 +run_threads=1 if [[ $# -eq 1 ]]; then threads=$1 + run_threads=${threads} elif [[ $# -eq 2 ]]; then threads=$1 gpu_isa=$2 +elif [[ $# -eq 3 ]]; then + threads=$1 + gpu_isa=$2 + run_threads=$3 else if [[ $# -gt 0 ]]; then echo "Invalid number of arguments: $#" @@ -64,7 +73,7 @@ fi docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \ "${gem5_root}"/tests --memory="${docker_mem_limit}" --rm \ gcr.io/gem5-test/ubuntu-22.04_all-dependencies:${tag} \ - ./main.py run --length very-long -j${threads} -t${threads} -vv + ./main.py run --length very-long -j${threads} -t${run_threads} -vv mkdir -p tests/testing-results