-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_sorting
executable file
·50 lines (41 loc) · 1005 Bytes
/
run_sorting
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
#!/bin/bash
set -euxo pipefail
# Prep
(
(
cd ceno/examples
cargo build --release --example=quadratic_sorting
)
(
cd ceno
cargo build --release --bin e2e
)
mkdir --parents sorting-output/ceno
mkdir --parents sorting-output/sp1
)
(
cd sorting/program
cargo prove build
)
export MAX=12000
# export MAX="$((1 << 14))"
for N in $(shuf --input-range=1-${MAX}); do
for system in $(shuf --echo ceno sp1); do
output="sorting-output/${N}-$(date --iso-8601=ns --utc)/${system}"
mkdir --parents "${output}"
./run_${system}_sorting "${N}" "${output}"
done
done
output="output_time"
(
cd sorting/script
# export RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f"
# export RUSTFLAGS="-C target-cpu=native"
export RUST_LOG=info
# cargo clean
cargo build --release --bin sorting
/usr/bin/time --verbose --output="${output}" -- cargo run --release -- --n=$N --prove
echo "RUSTFLAGS=\'${RUSTFLAGS:-}\'"
echo "N=\'${N}'"
cat "${output}"
)