summaryrefslogtreecommitdiff
path: root/export_to_csv.sh
diff options
context:
space:
mode:
authorConnor Moore <connor@hhmoore.ca>2026-02-04 23:58:05 -0500
committerConnor Moore <connor@hhmoore.ca>2026-02-04 23:58:05 -0500
commitec3c5a4856629d626236d9b12e3077c46e907b8f (patch)
tree28453220c6cf837ebd1ffd7b3528d443dc08ebb5 /export_to_csv.sh
parente771927d4b8c5b32acf28774161c5d2b0c4f32bf (diff)
Added compiler comparison to report. Restructured plots. Added
automation for concatenating results into one big csv.
Diffstat (limited to 'export_to_csv.sh')
-rwxr-xr-xexport_to_csv.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/export_to_csv.sh b/export_to_csv.sh
new file mode 100755
index 0000000..5dd01dc
--- /dev/null
+++ b/export_to_csv.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+rm -f results/results.csv
+
+for file in $(ls results/*.out); do
+ COMPILER=$(echo $file | cut -d / -f 2 | cut -d _ -f 1)
+ RUN_SIZE=$(echo $file | cut -d / -f 2 | cut -d _ -f 2)
+ RUN_PARL=$(echo $file | cut -d / -f 2 | cut -d _ -f 3)
+ RUN_FLAG=$(echo $file | cut -d / -f 2 | cut -d _ -f 4 | cut -d . -f 1)
+
+ # Get each row of result
+ tail -n +4 $file | while read -r line; do
+ CLEANED_DATA=$(echo $line | tr -s ' ', ',')
+ if [ $RUN_SIZE == "short" ]; then
+ echo $COMPILER,$RUN_FLAG,$RUN_PARL,$CLEANED_DATA >> results/results.csv
+ else
+ CLEANED_DATA=$(echo $CLEANED_DATA | awk -F, -v OFS=, '{$1 = $1 ",-1.00000000E+00,-1.00000000E+00";print}')
+ echo $COMPILER,$RUN_FLAG,$RUN_PARL,$CLEANED_DATA >> results/results.csv
+ fi
+ done
+done