From 758d2c78f007e9bc83f5f39900226fee0f71fa92 Mon Sep 17 00:00:00 2001 From: Yiltan Temucin Date: Fri, 6 Dec 2024 14:02:56 -0600 Subject: [PATCH] Added timeout to unit tests [ROCm/rocshmem commit: 98c164d72e1a73169fdb9026b71dd2676984bffe] --- projects/rocshmem/scripts/unit_tests/driver.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/rocshmem/scripts/unit_tests/driver.sh b/projects/rocshmem/scripts/unit_tests/driver.sh index e101fe2b9a..30541d36ad 100755 --- a/projects/rocshmem/scripts/unit_tests/driver.sh +++ b/projects/rocshmem/scripts/unit_tests/driver.sh @@ -28,12 +28,13 @@ binary_name=$1 mode=$2 timestamp=$(date "+%Y-%m-%d-%H:%M:%S") log_file="unit_tests_${timestamp}.log" +mpi_timeout=$((20 * 60)) # 20 minutes in seconds # Function to execute mpirun command function run_mpirun { local np=$1 local gtest_filter=$2 - cmd_str="mpirun -np $np $binary_name --gtest_filter=$gtest_filter >> $log_file 2>&1" + cmd_str="mpirun -np $np --timeout $mpi_timeout $binary_name --gtest_filter=$gtest_filter >> $log_file 2>&1" echo $cmd_str eval $cmd_str