From f90b2aff40e24901cf2146f46b052bd42cf0a160 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Mon, 27 Apr 2015 14:33:09 +0200 Subject: The realisation that fullcompMT respects $num_cores --- fullcomp.sh | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/fullcomp.sh b/fullcomp.sh index bb4f59a..88ad0a3 100755 --- a/fullcomp.sh +++ b/fullcomp.sh @@ -1,36 +1,2 @@ #!/usr/bin/env bash -BINARIES="./gluon ./neutrino ./randino ./charm" - -if [[ ! -e competitions ]]; then - mkdir competitions || exit 1 -fi - -find competitions -type f -delete - -for p1 in $BINARIES; do - for p2 in $BINARIES; do - if [[ $p1 == $p2 ]]; then - continue - fi - printf "%s\n%s\n" $p1 $p2 >competition.txt - ./competition.py $@ - status=$? - if [[ $status != 0 ]]; then - echo "$p1 - $p2 : ERROR $status (0-0)" - continue - fi - p1pretty=$(echo "$p1" | sed 's/[^a-zA-Z0-9 ]//g') - p2pretty=$(echo "$p2" | sed 's/[^a-zA-Z0-9 ]//g') - complogfile="competitions/game_${p1pretty}_vs_${p2pretty}.txt" - lastline=$(tail -n1 $complogfile) - if [[ "$lastline" == "P1 won" ]]; then - echo "$p1 - $p2 : WIN - LOSS (3-1)" - elif [[ "$lastline" == "P2 won" ]]; then - echo "$p1 - $p2 : LOSS - WIN (1-3)" - elif [[ "$lastline" == "Tie" ]]; then - echo "$p1 - $p1 : TIE (1-1)" - fi - done -done - -./fullcompstats.py +env num_cores=1 ./fullcompMT.sh $@ -- cgit v1.2.3-54-g00ecf