From 995730fc6ca675cf1671ba1752947367f221974d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 7 Nov 2018 00:41:16 +0100 Subject: Add option to disable plot generation --- bench/perf_monitoring/run.sh | 22 ++++++++++++++++------ bench/perf_monitoring/runall.sh | 9 +++++++++ 2 files changed, 25 insertions(+), 6 deletions(-) (limited to 'bench') diff --git a/bench/perf_monitoring/run.sh b/bench/perf_monitoring/run.sh index 20871668e..4e8f73c7f 100755 --- a/bench/perf_monitoring/run.sh +++ b/bench/perf_monitoring/run.sh @@ -14,22 +14,30 @@ # Options: # -up : enforce the recomputation of existing data, and keep best results as a merging strategy # -s : recompute selected changesets only and keep bests +# -np : no plotting of results, just generate the data bench=$1 settings_file=$2 -if echo "$*" | grep '\-up' > /dev/null; then +if [[ "$*" =~ '-up' ]]; then update=true else update=false fi -if echo "$*" | grep '\-s' > /dev/null; then +if [[ "$*" =~ '-s' ]]; then selected=true else selected=false fi +if [[ "$*" =~ '-np' ]]; then + do_plot=false +else + do_plot=true +fi + + WORKING_DIR=${PREFIX:?"default"} if [ -z "$PREFIX" ]; then @@ -42,9 +50,9 @@ mkdir -p $WORKING_DIR global_args="$*" -if [ $selected == true ]; then +if $selected ; then echo "Recompute selected changesets only and keep bests" -elif [ $update == true ]; then +elif $update ; then echo "(Re-)Compute all changesets and keep bests" else echo "Skip previously computed changesets" @@ -111,7 +119,7 @@ function test_current fi # echo $update et $selected et $rev_found because $rev et "$global_args" # echo $count_rev et $count_ref - if [ $update == true ] || [ $count_rev != $count_ref ] || ([ $selected == true ] && [ $rev_found == true ]); then + if $update || [ $count_rev != $count_ref ] || ( $selected && $rev_found ); then echo "RUN: $CXX -O3 -DNDEBUG -march=native $CXX_FLAGS -I eigen_src $bench.cpp -DSCALAR=$scalar -o $name" if $CXX -O3 -DNDEBUG -march=native $CXX_FLAGS -I eigen_src $bench.cpp -DSCALAR=$scalar -o $name; then curr=`./$name $settings_file` @@ -165,8 +173,10 @@ echo "Complex:" cat $WORKING_DIR_PREFIX"c""$bench.out" echo "" +if $do_plot ; then + ./make_plot.sh $WORKING_DIR_PREFIX"s"$bench $bench $settings_file ./make_plot.sh $WORKING_DIR_PREFIX"d"$bench $bench $settings_file ./make_plot.sh $WORKING_DIR_PREFIX"c"$bench $bench $settings_file - +fi diff --git a/bench/perf_monitoring/runall.sh b/bench/perf_monitoring/runall.sh index de108541d..cdbe48eb8 100755 --- a/bench/perf_monitoring/runall.sh +++ b/bench/perf_monitoring/runall.sh @@ -10,6 +10,13 @@ # Options: # -up : enforce the recomputation of existing data, and keep best results as a merging strategy # -s : recompute selected changesets only and keep bests +# -np : no plotting of results, just generate the data + +if [[ "$*" =~ '-np' ]]; then + do_plot=false +else + do_plot=true +fi ./run.sh gemm gemm_settings.txt $* ./run.sh lazy_gemm lazy_gemm_settings.txt $* @@ -21,6 +28,7 @@ ./run.sh trmv_lot gemv_square_settings.txt $* ./run.sh llt gemm_square_settings.txt $* +if $do_plot ; then # generate html file @@ -61,3 +69,4 @@ print_tr trmv_lot 'L · LT = A   (Cholesky,potrf)' cat resources/footer.html >> $htmlfile fi +fi -- cgit v1.2.3