-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathrcr
More file actions
executable file
·66 lines (55 loc) · 1.44 KB
/
rcr
File metadata and controls
executable file
·66 lines (55 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# exit at the first error
set -o errexit
srcdir=src
scriptdir=scripts
cd $scriptdir
# Make the data
datadir=data-rcr
wipedata=1
if [[ -d $datadir && -f $datadir/alldata.dat && -f $datadir/alldata-mt-2.dat
&& -f $datadir/alldata-mt-4.dat && -f $datadir/alldata-mt-8.dat ]]; then
read -p "All data appears to be present, reuse it (not recommended)? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "OK, reusing existing data"
wipedata=0 # do dangerous stuff
fi
fi
if [[ $wipedata -ne 0 ]]; then
# Clean everything and regenerate
echo "Wiping any existing data"
# Compile programs
cd ../$srcdir
make clean
make main
make main-mt
cd ../$scriptdir
if [ ! -L main-mt ]; then
ln -s ../src/main-mt .
fi
if [ ! -L main ]; then
ln -s ../src/main .
fi
# generate the data
rm -rf $datadir
mkdir $datadir
python experiments-rcr.py
fi
# Make the figures
figdir=figs-rcr
if [ -d $figdir ]; then
rm -f $figdir/*.pdf $figdir/*.svg
else
mkdir $figdir
fi
python snarf-rcr-svg.py
python snarf-rcr-pdf.py
echo "All done. Look at scripts/figs-rcr/index.html."
echo "Now making a tarball that you can send me if you want..."
lscpu > $figdir/lscpu.txt
cat /proc/cpuinfo > $figdir/cpuinfo.txt
cd ..
tar cf rcr.tgz $scriptdir/$figdir
echo "If you got this far, I would love to see the output."
echo "Help out by sending ./rcr.tgz to [email protected]"