From be2ef2ee4c656fd834199d6a70df90716c9c8b19 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Wed, 5 Dec 2018 20:14:49 +0000 Subject: Launch only 3 at a time --- test-k.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test-k.sh b/test-k.sh index f8256f9..9001047 100755 --- a/test-k.sh +++ b/test-k.sh @@ -1,6 +1,17 @@ #!/bin/bash for p in $(seq 3 2 31);do - for q in $(seq 1 2 11);do + for q in $(seq 1 2 5);do ((python3 evaluate.py -p $p -q $q -r;echo "p: $p | q: $q";) >> ~/pq-vals.txt) & + pid=$! + done + while kill -0 $pid;do + sleep 5 + done + for q in $(seq 7 2 11);do + ((python3 evaluate.py -p $p -q $q -r;echo "p: $p | q: $q";) >> ~/pq-vals.txt) & + pid=$! + done + while ps -p $pid > /dev/null;do + sleep 5 done done -- cgit v1.2.3-54-g00ecf