Skip to content

Commit 5f96331

Browse files
committed
Updated Mlucas script for AutoPrimeNet 1.1.
1 parent 7acaab0 commit 5f96331

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mlucas.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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"
502502
done
503503
echo -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 }')
507504
args=()
508505
for 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
516513
done
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 }')
517517
echo -e "\nStarting AutoPrimeNet\n"
518-
nohup python3 -OO ../autoprimenet.py "${args[@]}" >>'autoprimenet.out' &
518+
nohup python3 -OO ../autoprimenet.py >>'autoprimenet.out' &
519519
sleep $((${#RUNS[*]} * 4))
520520
for 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 || (
550550
pgrep -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
)
555555
EOF
556556
chmod +x jobs.sh

0 commit comments

Comments
 (0)