diff --git a/bin/patches/ovo.patch b/bin/patches/ovo.patch new file mode 100644 index 000000000..38b245225 --- /dev/null +++ b/bin/patches/ovo.patch @@ -0,0 +1,25 @@ +diff --git a/ovo.sh b/ovo.sh +index 2da7d7ca..0f83db48 100755 +--- a/ovo.sh ++++ b/ovo.sh +@@ -10,6 +10,8 @@ fclean() { for dir in $(find_tests_folder $@); do make --silent -C "$dir" clean; + frun() { + SYNC=$(make -v | head -n1 | awk '$NF >= 4 {print "--output-sync"}') + if [ -n "$SYNC" ]; then NPROC=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null); fi ++ # Set wide terminal width to prevent line wrapping in compiler timing output ++ export COLUMNS=1000 + export MAKEFLAGS="${MAKEFLAGS:--j${NPROC:-1} $SYNC}" + + for dir in $(find_tests_folder $@); do +@@ -24,9 +26,9 @@ frun() { + set +x + } &> "$nresult"/env.log + # Compile in parallel +- make --no-print-directory -C "$dir" exe 2>&1 | tee "$nresult"/compilation.log ++ COLUMNS=1000 make --no-print-directory -C "$dir" exe 2>&1 | tee "$nresult"/compilation.log + # But Run serially +- make -j1 --no-print-directory -C "$dir" run 2>&1 | tee "$nresult"/runtime.log ++ COLUMNS=1000 make -j1 --no-print-directory -C "$dir" run 2>&1 | tee "$nresult"/runtime.log + done + } + diff --git a/bin/patches/patch-control-file_23.0.txt b/bin/patches/patch-control-file_23.0.txt index 9bb9edd38..fb85b138c 100644 --- a/bin/patches/patch-control-file_23.0.txt +++ b/bin/patches/patch-control-file_23.0.txt @@ -12,4 +12,5 @@ rocprofiler-sdk: rocprofiler-sdk-otf2-url-fix.patch babelstream: babelstream-usm.patch llvm-project: ATD_ASO_full.patch UMT: umt.patch +OvO: ovo.patch rocm-xio: xio.patch diff --git a/bin/run_ovo.sh b/bin/run_ovo.sh index 8245a06ad..e9413a51a 100755 --- a/bin/run_ovo.sh +++ b/bin/run_ovo.sh @@ -1,11 +1,11 @@ #!/bin/bash # --- Start standard header to set AOMP environment variables ---- -realpath=`realpath $0` -thisdir=`dirname $realpath` +realpath=$(realpath "$0") +thisdir=$(dirname "$realpath") export AOMP_USE_CCACHE=0 -. $thisdir/aomp_common_vars +. "$thisdir"/aomp_common_vars # --- end standard header ---- # Setup AOMP variables @@ -15,7 +15,7 @@ FLANG=${FLANG:-flang} # Use function to set and test AOMP_GPU setaompgpu -AOMP_GPU=${AOMP_GPU:-`$AOMP/bin/mygpu`} +AOMP_GPU=${AOMP_GPU:-$("$AOMP"/bin/mygpu)} PATH=$AOMP/bin:$PATH CXX=clang++ FC=$FLANG @@ -25,7 +25,10 @@ OMP_TARGET_OFFLOAD=mandatory export AOMP AOMP_GPU PATH CXX FC FFLAGS CXXFLAGS OMP_TARGET_OFFLOAD -cd $AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME +# Apply OvO patch before running tests +patchrepo "$AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME" + +cd "$AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME" || exit rm -f ovo.run.log* HALF_THREADS=$(( AOMP_JOB_THREADS/2 )) echo "Using $HALF_THREADS threads for make." @@ -34,7 +37,7 @@ export MAKEFLAGS=-j$HALF_THREADS ./ovo.sh run ./ovo.sh report --summary -date=${BLOG_DATE:-`date '+%Y-%m-%d'`} +date=${BLOG_DATE:-$(date '+%Y-%m-%d')} if [ "$1" == "log" ]; then if [ "$2" != "" ]; then prefix=$2 @@ -43,6 +46,9 @@ if [ "$1" == "log" ]; then log="ovo.run.log.$date" fi echo "Log enabled: $log" - ./ovo.sh report --failed 2>&1 | tee $log - ./ovo.sh report --passed 2>&1 | tee -a $log + ./ovo.sh report --failed 2>&1 | tee "$log" + ./ovo.sh report --passed 2>&1 | tee -a "$log" fi + +# Remove patch after test execution +removepatch "$AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME"