From def114623f2d03ea7838900b531f7b3beec5a7a0 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Tue, 26 Nov 2019 17:07:59 +0100 Subject: run-benches.sh adapting to number of CPU cores --- test/monniaux/run_benches.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test') 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 -- cgit