@@ -501,9 +501,6 @@ for j in "${!threads[@]}"; do
501501 ln -s " mlucas.${CORES: +${CORES[MAX]} c.}${threads[j]} t.$j .cfg" " mlucas.$j .cfg"
502502done
503503echo -e " \nRegistering computer with PrimeNet\n"
504- total=$(( TOTAL_PHYSICAL_MEM >> 10 ))
505- python3 -OO ../autoprimenet.py -t 0 -T " $TYPE " -u " $USERID " --num-workers ${# RUNS[*]} -m -H " $COMPUTER " --cpu-model=" ${CPU[0]} " --frequency=" $( if [[ -n $CPU_FREQ ]]; then printf " %.0f" " ${CPU_FREQ/ ./ $decimal_point } " ; else echo " 1000" ; fi) " --memory=$total --max-memory=" $( echo $total | awk ' { printf "%d", $1 * 0.9 }' ) " --cores=" $CPU_CORES " --hyperthreads=" $HP " --l1=$(( CPU_CACHE_SIZES[1 ] ? CPU_CACHE_SIZES[1 ] >> 10 : 8 )) --l2=$(( CPU_CACHE_SIZES[2 ] ? CPU_CACHE_SIZES[2 ] >> 10 : 512 )) --l3=$(( CPU_CACHE_SIZES[3 ] >> 10 ))
506- maxalloc=$( echo ${# RUNS[*]} | awk ' { printf "%g", 90 / $1 }' )
507504args=()
508505for i in " ${! RUNS[@]} " ; do
509506 dir=" run$i "
@@ -514,8 +511,11 @@ for i in "${!RUNS[@]}"; do
514511 args+=(-D " $dir " )
515512 popd > /dev/null
516513done
514+ total=$(( TOTAL_PHYSICAL_MEM >> 10 ))
515+ python3 -OO ../autoprimenet.py -t 0 -T " $TYPE " -u " $USERID " --num-workers ${# RUNS[*]} " ${args[@]} " -m -H " $COMPUTER " --cpu-model=" ${CPU[0]} " --frequency=" $( if [[ -n $CPU_FREQ ]]; then printf " %.0f" " ${CPU_FREQ/ ./ $decimal_point } " ; else echo " 1000" ; fi) " --memory=$total --max-memory=" $( echo $total | awk ' { printf "%d", $1 * 0.9 }' ) " --cores=" $CPU_CORES " --hyperthreads=" $HP " --l1=$(( CPU_CACHE_SIZES[1 ] ? CPU_CACHE_SIZES[1 ] >> 10 : 8 )) --l2=$(( CPU_CACHE_SIZES[2 ] ? CPU_CACHE_SIZES[2 ] >> 10 : 512 )) --l3=$(( CPU_CACHE_SIZES[3 ] >> 10 ))
516+ maxalloc=$( echo ${# RUNS[*]} | awk ' { printf "%g", 90 / $1 }' )
517517echo -e " \nStarting AutoPrimeNet\n"
518- nohup python3 -OO ../autoprimenet.py " ${args[@]} " >> ' autoprimenet.out' &
518+ nohup python3 -OO ../autoprimenet.py >> ' autoprimenet.out' &
519519sleep $(( ${# RUNS[*]} * 4 ))
520520for i in " ${! RUNS[@]} " ; do
521521 printf " \nWorker/CPU Core %'d: (-core argument: %s)\n" $(( i + 1 )) " ${RUNS[i]} "
@@ -550,7 +550,7 @@ pgrep -x Mlucas >/dev/null || (
550550pgrep -f '^python3 -OO \.\./autoprimenet\.py' >/dev/null || (
551551 echo -e "\nStarting AutoPrimeNet\n"
552552 set -x
553- exec nohup python3 -OO ../autoprimenet.py ${args[@]} >>'autoprimenet.out' &
553+ exec nohup python3 -OO ../autoprimenet.py >>'autoprimenet.out' &
554554)
555555EOF
556556chmod +x jobs.sh
0 commit comments