Skip to content

Commit 3426c3a

Browse files
committed
Increased max FFT lengths to benchmark..
1 parent b75067b commit 3426c3a

File tree

4 files changed

+42
-37
lines changed

4 files changed

+42
-37
lines changed

cudalucas.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ nohup python3 -OO autoprimenet.py >>'autoprimenet.out' &
163163
sleep 1
164164
echo -e "\nOptimizing CUDALucas for your computer and GPU\nThis may take a while…\n"
165165
timeout -v 60 ./CUDALucas 2976221 || true
166-
./CUDALucas -cufftbench 1024 8192 5
167-
./CUDALucas -threadbench 1024 8192 5 0
166+
./CUDALucas -cufftbench 1024 12288 5
167+
./CUDALucas -threadbench 1024 12288 5 0
168168
echo -e "\nRunning self tests\nThis will take a while…\n"
169169
./CUDALucas -r 1
170170
# ./CUDALucas 6972593

cudalucas2.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ nohup python3 -OO autoprimenet.py -l "prime$N.ini" >>"autoprimenet$N.out" &
176176
sleep 1
177177
echo -e "\nOptimizing CUDALucas for your computer and GPU\nThis may take a while…\n"
178178
timeout -v 60 ./CUDALucas 2976221 || true
179-
./CUDALucas -cufftbench 1024 8192 5
180-
./CUDALucas -threadbench 1024 8192 5 0
179+
./CUDALucas -cufftbench 1024 12288 5
180+
./CUDALucas -threadbench 1024 12288 5 0
181181
echo -e "\nRunning self tests\nThis will take a while…\n"
182182
./CUDALucas -r 1
183183
# ./CUDALucas 6972593

gpuowl-bench.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ DEVICE=0
2424
MIN=1024
2525
# MIN=1
2626
# Maximum FFT length (in K)
27-
MAX=10240
27+
MAX=12288
2828
# MAX=32768
2929

3030
# GpuOwl -use option to show roundoff error (ROE)

mlucas.sh

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,14 @@ fi
6767
TIME=$(echo "$TIME" | awk '{ printf "%g", $1 * 60 }')
6868

6969
# Adapted from: https://github.com/tdulcet/Linux-System-Information/blob/master/info.sh
70-
. /etc/os-release
70+
echo
7171

72-
echo -e "\nLinux Distribution:\t\t${PRETTY_NAME:-$NAME-$VERSION}"
72+
if [[ -r /etc/os-release ]]; then
73+
. /etc/os-release
74+
elif [[ -r /usr/lib/os-release ]]; then
75+
. /usr/lib/os-release
76+
fi
77+
echo -e "Linux Distribution:\t\t${PRETTY_NAME:-$NAME-$VERSION}"
7378

7479
KERNEL=$(</proc/sys/kernel/osrelease) # uname -r
7580
echo -e "Linux Kernel:\t\t\t$KERNEL"
@@ -415,8 +420,8 @@ for i in "${!ITERS[@]}"; do
415420
done
416421
RUNS=(${ARGS[MAX]})
417422
threads=(${THREADS[MAX]})
418-
echo -e "\nBenchmark Summary\n"
419423
{
424+
echo -e "\nBenchmark Summary\n"
420425
echo -e "\tAdjusted msec/iter times (ms/iter) vs Actual iters/sec total throughput (iter/s) for each combination\n"
421426
{
422427
printf 'FFT\t'
@@ -454,37 +459,37 @@ echo -e "\nBenchmark Summary\n"
454459
done
455460
} | column -t -s $'\t'
456461
echo
457-
} | tee -a bench.txt
458-
echo "Fastest combination"
459-
{
460-
echo -e "#\tWorkers/Runs\tThreads\tFirst -core argument"
461-
printf "%'d\t%'d\t%s\t%s\n" $((MAX + 1)) ${#RUNS[*]} "${THREADS[MAX]// /, }" "${RUNS[0]}$(if [[ ${#threads[*]} -gt 1 ]]; then echo " ${RUNS[-1]}"; fi)"
462-
} | column -t -s $'\t'
463-
echo
464-
if [[ ${#ARGS[*]} -gt 1 ]]; then
462+
echo "Fastest combination"
465463
{
466-
echo -e "Mean ± σ std dev faster\t#\tWorkers/Runs\tThreads\tFirst -core argument"
467-
for i in "${!ARGS[@]}"; do
468-
if [[ $i -ne $MAX ]]; then
469-
args=(${ARGS[i]})
470-
threads=(${THREADS[i]})
471-
mapfile -t ffts <<<"${FFTS[i]}"
472-
iters=(${ITERS[i]})
473-
if [[ -n $ffts ]]; then
474-
# join -o 1.2,2.2 <(paste <(echo "${FFTS[MAX]}") <(echo "${ITERS[MAX]}")) <(paste <(echo "${FFTS[i]}") <(echo "${ITERS[i]}"))
475-
array=($(for k in "${!affts[@]}"; do for j in "${!ffts[@]}"; do if [[ ${affts[k]} -eq ${ffts[j]} ]]; then
476-
printf '%s\t%s\n' "${aiters[k]}" "${iters[j]}"
477-
break
478-
fi; done; done | awk '{ sum+=$1/$2; sumsq+=($1/$2)^2 } END { mean=sum/NR; variance=sumsq/NR-mean^2; printf "%.15g\t%.15g\t%.15g\n", mean, sqrt(variance<0 ? 0 : variance), (mean * 100) - 100 }'))
479-
printf "%'.3f ± %'.3f (%'.1f%%)\t%'d\t%'d\t%s\t%s\n" "${array[0]/./$decimal_point}" "${array[1]/./$decimal_point}" "${array[2]/./$decimal_point}" $((i + 1)) ${#args[*]} "${THREADS[i]// /, }" "${args[0]}$(if [[ ${#threads[*]} -gt 1 ]]; then echo " ${args[-1]}"; fi)"
480-
else
481-
printf -- "-\t%'d\t%'d\t%s\t%s\n" $((i + 1)) ${#args[*]} "${THREADS[i]// /, }" "${args[0]}$(if [[ ${#threads[*]} -gt 1 ]]; then echo " ${args[-1]}"; fi)"
482-
fi
483-
fi
484-
done
464+
echo -e "#\tWorkers/Runs\tThreads\tFirst -core argument"
465+
printf "%'d\t%'d\t%s\t%s\n" $((MAX + 1)) ${#RUNS[*]} "${THREADS[MAX]// /, }" "${RUNS[0]}$(if [[ ${#threads[*]} -gt 1 ]]; then echo " ${RUNS[-1]}"; fi)"
485466
} | column -t -s $'\t'
486-
fi
487-
echo
467+
echo
468+
if [[ ${#ARGS[*]} -gt 1 ]]; then
469+
{
470+
echo -e "Mean ± σ std dev faster\t#\tWorkers/Runs\tThreads\tFirst -core argument"
471+
for i in "${!ARGS[@]}"; do
472+
if [[ $i -ne $MAX ]]; then
473+
args=(${ARGS[i]})
474+
threads=(${THREADS[i]})
475+
mapfile -t ffts <<<"${FFTS[i]}"
476+
iters=(${ITERS[i]})
477+
if [[ -n $ffts ]]; then
478+
# join -o 1.2,2.2 <(paste <(echo "${FFTS[MAX]}") <(echo "${ITERS[MAX]}")) <(paste <(echo "${FFTS[i]}") <(echo "${ITERS[i]}"))
479+
array=($(for k in "${!affts[@]}"; do for j in "${!ffts[@]}"; do if [[ ${affts[k]} -eq ${ffts[j]} ]]; then
480+
printf '%s\t%s\n' "${aiters[k]}" "${iters[j]}"
481+
break
482+
fi; done; done | awk '{ sum+=$1/$2; sumsq+=($1/$2)^2 } END { mean=sum/NR; variance=sumsq/NR-mean^2; printf "%.15g\t%.15g\t%.15g\n", mean, sqrt(variance<0 ? 0 : variance), (mean * 100) - 100 }'))
483+
printf "%'.3f ± %'.3f (%'.1f%%)\t%'d\t%'d\t%s\t%s\n" "${array[0]/./$decimal_point}" "${array[1]/./$decimal_point}" "${array[2]/./$decimal_point}" $((i + 1)) ${#args[*]} "${THREADS[i]// /, }" "${args[0]}$(if [[ ${#threads[*]} -gt 1 ]]; then echo " ${args[-1]}"; fi)"
484+
else
485+
printf -- "-\t%'d\t%'d\t%s\t%s\n" $((i + 1)) ${#args[*]} "${THREADS[i]// /, }" "${args[0]}$(if [[ ${#threads[*]} -gt 1 ]]; then echo " ${args[-1]}"; fi)"
486+
fi
487+
fi
488+
done
489+
} | column -t -s $'\t'
490+
fi
491+
echo
492+
} | tee -a bench.txt
488493
echo "The benchmark data was written to the 'bench.txt' file"
489494
if [[ -n $COMBO ]]; then
490495
printf "\nUsing combination: %'d\n" $((COMBO + 1))

0 commit comments

Comments
 (0)