run_m 430 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. if [ $# != 4 ]; then
  3. echo "Usage: $0 g lgr lgc m" >&2
  4. exit 1
  5. fi
  6. g=$1
  7. lgr=$2
  8. lgc=$3
  9. m=$4
  10. n=$((g<<lgr))
  11. h=$((n-m))
  12. gdir="g${g}_lgr${lgr}_lgc${lgc}_n${n}"
  13. mdir="m${m}_h${h}"
  14. mkdir -p ${gdir}/${mdir}
  15. for k in {01..40}; do
  16. now=`date`
  17. echo "${now}: $h $m $lgr $k $g $lgc 100000 10" >> run.log
  18. stdbuf -o 0 ./target/release/cuckoo_simulation $h $m $lgr $k $g $lgc 100000 10 > ${gdir}/${mdir}/k${k}.out 2>&1 &
  19. done
  20. wait