updated readme and makeplot to use parameter from command line

master
leonnicolas 5 years ago
parent fe213d6403
commit b2762ea49b

@ -1,2 +1,19 @@
# benchmark-openMP
some benchamarks with openMP in C
## compile
make to compile
##usage
then
```bash
./collect_data.sh <num> <outdata.txt>
```
to run program with 1 to num threads
you can specify reps per iteration and iterations in collect\_data.sh
run
```bash
./make_plots.py <indata.txt> <outplot.png>
```
to make plot

@ -2,13 +2,22 @@
import matplotlib.pylab as plt
import csv
import sys
if len(sys.argv) == 2:
infile = sys.argv[1]
else:
infile = 'data.txt'
if len(sys.argv) == 3:
outfile = sys.argv[2]
else:
outfile = 'plot.png'
x_values = []
y_values = []
y_err = []
with open('data.txt') as FILE:
with open(infile) as FILE:
data = csv.reader(FILE, delimiter='\t')
for row in data:
x_values.append(float(row[4]))
@ -16,4 +25,4 @@ with open('data.txt') as FILE:
y_err.append(float(row[1]))
print(x_values)
plt.errorbar(x_values,y_values,yerr=y_err, fmt='.')
plt.savefig('plot.png')
plt.savefig(outfile)

Loading…
Cancel
Save