diff options
| author | Connor Moore <connor@hhmoore.ca> | 2026-04-10 03:21:57 -0400 |
|---|---|---|
| committer | Connor Moore <connor@hhmoore.ca> | 2026-04-10 03:21:57 -0400 |
| commit | ef8165dc661d0fc6bf01f9d138fdcc8595eea272 (patch) | |
| tree | 31f3eb6fabac91186f5da3d1ab5ec2f7595c7b25 /extract_percent_diff.sh | |
| parent | 3d9865a95064589a94285a1c77db36f4a38e0c13 (diff) | |
Added reference comparison with GNAT and script for extracing percent differences. Also plot them.HEADmaster
Diffstat (limited to 'extract_percent_diff.sh')
| -rwxr-xr-x | extract_percent_diff.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/extract_percent_diff.sh b/extract_percent_diff.sh new file mode 100755 index 0000000..cd6e37e --- /dev/null +++ b/extract_percent_diff.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Get the percent difference between GNAT benchmark and MC calculation +# Defined as (GNAT - MC)/GNAT * 100 + +dx=$(cat flux.out | awk '{print $1}') +mc=$(cat flux.out | awk '{print $2}') +ref=$(cat test.ref | awk '{print $2}') + +paste <(echo "$dx") <(paste <(echo "$mc") <(echo "$ref") | awk '{print ($2 - $1)/$2*100}') > diff.out + |
