-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-inputs
executable file
·58 lines (51 loc) · 2.14 KB
/
generate-inputs
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
#!/bin/bash
ROOT=$(git rev-parse --show-toplevel)
if [[ ! -f $ROOT/inputs/words256.txt ]]; then
echo "[INFO] Generating 'words256.txt'...";
ff=$ROOT/inputs/words64.txt;
cat $ff $ff $ff $ff > $ROOT/inputs/words256.txt;
fi
# if [[ ! -f $ROOT/inputs/words64-shuffled.txt ]]; then
# echo "[INFO] Generating 'words64-shuffled.txt'...";
# inf=$ROOT/inputs/words64.txt;
# outf=$ROOT/inputs/words64-shuffled.txt;
# make -C mpl shuf.mlton.bin;
# mpl/bin/shuf.mlton.bin $inf -o $outf;
# fi
if [[ ! -f $ROOT/inputs/words256-shuffled.txt ]]; then
echo "[INFO] Generating 'words256-shuffled.txt'...";
inf=$ROOT/inputs/words256.txt;
outf=$ROOT/inputs/words256-shuffled.txt;
make -C mpl shuf.mlton.bin;
mpl/bin/shuf.mlton.bin $inf -o $outf;
fi
echo "[INFO] Generating graphs..."
TMP=$(mktemp -d)
( \
cd $TMP \
&& git clone https://github.com/cmuparlay/pbbsbench \
&& cd pbbsbench \
&& git submodule update --init --recursive \
&& cd testData/geometryData \
&& make randPoints \
&& echo "[INFO] randPoints -s 1000000 $ROOT/inputs/uniform-circle-1M" \
&& ./randPoints -s 1000000 $ROOT/inputs/uniform-circle-1M \
&& echo "[INFO] randPoints -s 20000000 $ROOT/inputs/uniform-circle-20M" \
&& ./randPoints -s 20000000 $ROOT/inputs/uniform-circle-20M \
&& cd ../graphData \
&& make rMatGraph \
&& echo "[INFO] rMatGraph -s 15210 -o -j 10000000 $ROOT/inputs/rmat-10M-symm" \
&& ./rMatGraph -s 15210 -o -j 10000000 $ROOT/inputs/rmat-10M-symm \
&& cd $ROOT \
&& make -C mpl graphio.mlton.bin \
&& echo "[INFO] mpl/bin/graphio.mlton.bin inputs/rmat-10M-symm -outfile inputs/rmat-10M-symm-bin" \
&& mpl/bin/graphio.mlton.bin $ROOT/inputs/rmat-10M-symm -outfile $ROOT/inputs/rmat-10M-symm-bin \
&& cd $TMP/pbbsbench/testData/graphData \
&& echo "[INFO] rMatGraph -s 15210 -o -j 1000000 $ROOT/inputs/rmat-1M-symm" \
&& ./rMatGraph -s 15210 -o -j 1000000 $ROOT/inputs/rmat-1M-symm \
&& cd $ROOT \
&& make -C mpl graphio.mlton.bin \
&& echo "[INFO] mpl/bin/graphio.mlton.bin inputs/rmat-1M-symm -outfile inputs/rmat-1M-symm-bin" \
&& mpl/bin/graphio.mlton.bin $ROOT/inputs/rmat-1M-symm -outfile $ROOT/inputs/rmat-1M-symm-bin
)
rm -rf $TMP