From 394fe0c07646e3aef8e0e776fe80ffdce33683f8 Mon Sep 17 00:00:00 2001 From: aurianer Date: Fri, 18 Oct 2024 18:00:45 +0200 Subject: [PATCH] Add a plot strong script which launches all the plots --- scripts/plot_strong.sh | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 scripts/plot_strong.sh diff --git a/scripts/plot_strong.sh b/scripts/plot_strong.sh new file mode 100755 index 0000000000..7eed674584 --- /dev/null +++ b/scripts/plot_strong.sh @@ -0,0 +1,80 @@ +#!/bin/bash -l + +set -eu + +#################################################################################################### +# Variables to modify: +debug=0 +python_venv_path="" +# Path where to find the benchmarks data as the root of z/ and d/ (since they are appended later) +# (list containing several paths if we want to compare data on the same plots) +base_paths=( + "" \ + "" \ + ) +# Path where you want your plotting results +out_path="" +#################################################################################################### + +if [[ -z $out_path ]] || [[ -z ${base_paths[0]} ]]; then + echo "You need to set the variables in the beginning of the script" + exit 1 +fi + +if [[ ! -z "$python_venv_path" ]]; then + source $python_venv_path/bin/activate +fi + +complex_paths=(${base_paths[@]/%//z}) +double_paths=(${base_paths[@]/%//d}) +out_path_complex=${out_path/%//z} +out_path_double=${out_path/%//d} + +args_base="--distinguish-dir" +args_double="$args_base --out-path ${out_path_double}" +args_complex="$args_base --out-path ${out_path_complex}" + +idx=0 +for path in "${base_paths[@]}"; do + args_complex+=" --path ${complex_paths[$idx]}" + args_double+=" --path ${double_paths[$idx]}" + idx=$((idx+1)) +done + +if [[ "$debug" == 1 ]]; then + BOLD=$(tput bold) + NORMAL=$(tput sgr0) + echo "${BOLD}double_paths list:${NORMAL} ${double_paths[@]}" + echo "${BOLD}complex_paths list:${NORMAL} ${complex_paths[@]}" + echo "${BOLD}double_args:${NORMAL} $args_double" + echo "${BOLD}complex_args:${NORMAL} $args_complex" +else + set -x + # double + ./plot_chol_strong.py $args_double & + ./plot_band2trid_strong.py $args_double & + ./plot_hegst_strong.py $args_double & + ./plot_trmm_strong.py $args_double & + ./plot_bt_band2trid_strong.py $args_double & + ./plot_evp_strong.py $args_double & + ./plot_red2band_strong.py $args_double & + ./plot_trsm_strong.py $args_double & + ./plot_bt_red2band_strong.py $args_double & + ./plot_gevp_strong.py $args_double & + ./plot_tridiag_solver_strong.py $args_double & + + # complex & + ./plot_chol_strong.py $args_complex & + ./plot_band2trid_strong.py $args_complex & + ./plot_hegst_strong.py $args_complex & + ./plot_trmm_strong.py $args_complex & + ./plot_bt_band2trid_strong.py $args_complex & + ./plot_evp_strong.py $args_complex & + ./plot_red2band_strong.py $args_complex & + ./plot_trsm_strong.py $args_complex & + ./plot_bt_red2band_strong.py $args_complex & + ./plot_gevp_strong.py $args_complex & + ./plot_tridiag_solver_strong.py $args_complex & + + wait +fi