Skip to content

Commit

Permalink
I tried to assemble a sensible package of benchmakrks (see run_all.sh).
Browse files Browse the repository at this point in the history
  • Loading branch information
tnowotny committed Jul 31, 2018
1 parent 825728b commit 8c6da48
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 21 deletions.
4 changes: 2 additions & 2 deletions scripts/benchmarking/COBAHH_linearscaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
uSpkmon = intfrombool[use_spikemon]
run = intfrombool[do_run]
if device == 'genn':
with open('benchmarks_COBAHH.txt', 'a') as f:
with open('benchmarks_COBAHH_linearscaling.txt', 'a') as f:
data = [neurons, synapses, dev, threads, uSpkmon, run, run_it_for, took]
f.write('\t'.join('%s' % d for d in data) + '\t')
with open('GeNNworkspace/test_output/test.time', 'r') as bf:
Expand All @@ -147,7 +147,7 @@
line = '\t'.join('%s' % item for item in line.split(' ')) + '\n'
f.write(line)
elif not debugmode:
with open('benchmarks_COBAHH_cpp.txt', 'a') as f:
with open('benchmarks_COBAHH_linearscaling_cpp.txt', 'a') as f:
data = [neurons, synapses, dev, threads, uSpkmon, run, run_it_for, took]
f.write('\t'.join('%s' % d for d in data) + '\n')
else:
Expand Down
4 changes: 2 additions & 2 deletions scripts/benchmarking/COBAHH_no_synapses.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
uSpkmon = intfrombool[use_spikemon]
run = intfrombool[do_run]
if device == 'genn':
with open('benchmarks_COBAHH.txt', 'a') as f:
with open('benchmarks_COBAHH_no_synapses.txt', 'a') as f:
data = [neurons, synapses, dev, threads, uSpkmon, run, run_it_for, took]
f.write('\t'.join('%s' % d for d in data) + '\t')
with open('GeNNworkspace/test_output/test.time', 'r') as bf:
Expand All @@ -141,7 +141,7 @@
line = '\t'.join('%s' % item for item in line.split(' ')) + '\n'
f.write(line)
elif not debugmode:
with open('benchmarks_COBAHH_cpp.txt', 'a') as f:
with open('benchmarks_COBAHH_no_synapses_cpp.txt', 'a') as f:
data = [neurons, synapses, dev, threads, uSpkmon, run, run_it_for, took]
f.write('\t'.join('%s' % d for d in data) + '\n')
else:
Expand Down
11 changes: 11 additions & 0 deletions scripts/benchmarking/run_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /bin/bash
bash run_benchmarks_genn.sh Mbody_example.py
bash run_benchmarks_genn.sh COBAHH_linearscaling.py
bash run_benchmarks_genn.sh COBAHH_MON.py
bash run_benchmarks_genn.sh COBAHH_no_synapses.py
bash run_benchmarks_genn.sh COBAHH.py
bash run_benchmarks.sh Mbody_example.py
bash run_benchmarks.sh COBAHH_linearscaling.py
bash run_benchmarks.sh COBAHH_MON.py
bash run_benchmarks.sh COBAHH_no_synapses.py
bash run_benchmarks.sh COBAHH.py
32 changes: 21 additions & 11 deletions scripts/benchmarking/run_benchmarks.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
#!/bin/bash -e

if [ "$1" = "COBAHH_MON.py" ]; then
mon=0.1;
else
mon="";
fi

for spikemon in "true"; do
for threads in 1 2 4 8 16; do
for scaling in 0.05 0.1 0.25 0.5 1 2 4 8 16 32; do
time=1;
for repeat in 1 2 3 4 5; do
echo Repeat $repeat
python $1 $scaling cpp_standalone $threads $spikemon true $time
python $1 $scaling cpp_standalone $threads $spikemon true $time $mon
rm -r output
done
done
done
done

# The really long runs (don't run with GeNN CPU-only, etc.)
for spikemon in "true" "false"; do
for threads in 8 16; do
for scaling in 64 128 256 512; do
time=1;
for repeat in 1 2 3; do
echo Repeat $repeat
python $1 $scaling cpp_standalone $threads $spikemon true $time
rm -r output
# The really long runs (don't run with low # of threads, etc.)

if [ "$1" = "Mbody_example.py" ]; then
for spikemon in "true"; do
for threads in 8 16; do
for scaling in 64 128 256 512; do
time=1;
for repeat in 1 2 3; do
echo Repeat $repeat
python $1 $scaling cpp_standalone $threads $spikemon true $time $mon
rm -r output
done
done
done
done
done
fi

20 changes: 14 additions & 6 deletions scripts/benchmarking/run_benchmarks_genn.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
#!/bin/bash -e

if [ "$1" = "COBAHH_MON.py" ]; then
mon=0.1;
else
mon="";
fi

for spikemon in "true"; do
for threads in 0 -1; do
for scaling in 0.05 0.1 0.25 0.5 1 2 4 8 16 32; do
time=1;
for repeat in 1 2 3 4 5; do
echo Repeat $repeat
python $1 $scaling genn $threads $spikemon true $time
python $1 $scaling genn $threads $spikemon true $time $mon
rm -r GeNNworkspace
done
done
done
done

# The really long runs (don't run with GeNN CPU-only, etc.)
for spikemon in "true"; do
for scaling in 64 128 256 512; do
time=1;
if [ "$1" = "Mbody_example.py" ]; then
for spikemon in "true"; do
for scaling in 64 128 256 512; do
time=1;
for repeat in 1 2 3; do
echo Repeat $repeat
python $1 $scaling genn 0 $spikemon true $time
python $1 $scaling genn 0 $spikemon true $time $mon
rm -r GeNNworkspace
done
done
done
done
fi

0 comments on commit 8c6da48

Please sign in to comment.