summaryrefslogtreecommitdiff
path: root/extract_percent_diff.sh
blob: cd6e37ecf4263151c6fdc16f5e8cdc5fb7160d7f (plain)
1
2
3
4
5
6
7
8
9
10
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