aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/run_benches.sh
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-11-26 17:07:59 +0100
committerCyril SIX <cyril.six@kalray.eu>2019-11-26 17:07:59 +0100
commitdef114623f2d03ea7838900b531f7b3beec5a7a0 (patch)
tree471dd8fbba496c87368e1f92a8db284bcfe8ea54 /test/monniaux/run_benches.sh
parente2341e779ca6bf734b9ed103156949db588fbbdc (diff)
downloadcompcert-kvx-def114623f2d03ea7838900b531f7b3beec5a7a0.tar.gz
compcert-kvx-def114623f2d03ea7838900b531f7b3beec5a7a0.zip
run-benches.sh adapting to number of CPU cores
Diffstat (limited to 'test/monniaux/run_benches.sh')
-rwxr-xr-xtest/monniaux/run_benches.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/monniaux/run_benches.sh b/test/monniaux/run_benches.sh
index 60eec865..2b2e28d6 100755
--- a/test/monniaux/run_benches.sh
+++ b/test/monniaux/run_benches.sh
@@ -1,13 +1,16 @@
source benches.sh
+cores=$(grep -c ^processor /proc/cpuinfo)
+processes=$((cores/4))
+
rm -f commands.txt
for bench in $benches; do
echo "(cd $bench && echo \"Running $bench..\" &&\
make -j4 run > /dev/null && echo \"$bench DONE\")" >> commands.txt
done
-cat commands.txt | xargs -n1 -I{} -P6 bash -c '{}'
+cat commands.txt | xargs -n1 -I{} -P$processes bash -c '{}'
##
# Gather all the CSV files