diff options
author | Vasil Zlatanov <v@skozl.com> | 2018-12-05 20:14:49 +0000 |
---|---|---|
committer | Vasil Zlatanov <v@skozl.com> | 2018-12-05 20:14:49 +0000 |
commit | be2ef2ee4c656fd834199d6a70df90716c9c8b19 (patch) | |
tree | 0a21b29470edbe454b7bd0c8496a75c030b41165 | |
parent | 2d6f31646fa0c4f7af319187f2c4a5467ab4b1f5 (diff) | |
download | vz215_np1915-be2ef2ee4c656fd834199d6a70df90716c9c8b19.tar.gz vz215_np1915-be2ef2ee4c656fd834199d6a70df90716c9c8b19.tar.bz2 vz215_np1915-be2ef2ee4c656fd834199d6a70df90716c9c8b19.zip |
Launch only 3 at a time
-rwxr-xr-x | test-k.sh | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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 |