summaryrefslogtreecommitdiff
path: root/src/run_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/run_tests.sh')
-rwxr-xr-xsrc/run_tests.sh53
1 files changed, 36 insertions, 17 deletions
diff --git a/src/run_tests.sh b/src/run_tests.sh
index d5905e4..7e3a053 100755
--- a/src/run_tests.sh
+++ b/src/run_tests.sh
@@ -6,26 +6,41 @@ LOGDIR="/tmp/typhoon/manual"
HEAD_LOGDIR="../head_reference/logs"
TESTS="../tests"
-/bin/rm -rf "${LOGDIR}/*"
+# Suite names default to the three curated suites (see CLAUDE.md's
+# head_reference protocol). Override on the command line to run other
+# suites, e.g. ./run_tests.sh ecm_ringers ecm_lmr_delta
+SUITES=("$@")
+if [ ${#SUITES[@]} -eq 0 ]; then
+ SUITES=(ecm_ringers ecm_confident_quick ecm_hard_quick)
+fi
-clear
-echo -n "Launching all test suites @ sn=5M and sd=10 in parallel (expect ~5-6 min)... "
+# sd (fixed depth) is the right choice when judging whether a pruning/
+# ordering change makes the tree smaller or larger for the same search
+# effort; sn (fixed node budget) is the right choice when judging how many
+# positions solve within a fixed cost. Override via SD/SN env vars.
+SD="${SD:-10}"
+SN="${SN:-5000000}"
+
+/bin/rm -rf "${LOGDIR}"
+mkdir -p "${LOGDIR}"
+
+echo -n "Launching test suites (${SUITES[*]}) @ sn=${SN} and sd=${SD} in parallel... "
_start_time=$(date +%s)
-for suite in ecm_ringers ecm_confident_quick ecm_hard_quick; do
+for suite in "${SUITES[@]}"; do
./typhoon \
--cpus 1 \
--hash 256m \
- --logfile "$LOGDIR/sd10_${suite}.log" \
+ --logfile "$LOGDIR/sd${SD}_${suite}.log" \
--batch \
- --command "force; book name /nonexistent.book.bin; sd 10; script $TESTS/${suite}.ep_" \
- > "$LOGDIR/sd10_${suite}.out" 2>&1 &
+ --command "force; book name /nonexistent.book.bin; sd ${SD}; script $TESTS/${suite}.ep_" \
+ > "$LOGDIR/sd${SD}_${suite}.out" 2>&1 &
./typhoon \
--cpus 1 \
--hash 256m \
- --logfile "$LOGDIR/sn5m_${suite}.log" \
+ --logfile "$LOGDIR/sn${SN}_${suite}.log" \
--batch \
- --command "force; book name /nonexistent.book.bin; sn 5000000; script $TESTS/${suite}.ep_" \
- > "$LOGDIR/sn5m_${suite}.out" 2>&1 &
+ --command "force; book name /nonexistent.book.bin; sn ${SN}; script $TESTS/${suite}.ep_" \
+ > "$LOGDIR/sn${SN}_${suite}.out" 2>&1 &
done
wait
_elapsed=$(( $(date +%s) - _start_time ))
@@ -69,15 +84,19 @@ print_stats_table() {
' "$headfile" "$candfile"
}
-for suite in ecm_ringers ecm_confident_quick ecm_hard_quick; do
- echo "----[ $suite sd=10 ]----"
+for suite in "${SUITES[@]}"; do
+ echo "----[ $suite sd=${SD} ]------------------------------------------------------------------"
print_stats_table \
- <(sed -n '/correct solutions/,/script time/p' "$HEAD_LOGDIR/sd10_${suite}.out") \
- <(sed -n '/correct solutions/,/script time/p' "$LOGDIR/sd10_${suite}.out")
+ <(sed -n '/correct solutions/,/script time/p' "$HEAD_LOGDIR/sd${SD}_${suite}.out") \
+ <(sed -n '/correct solutions/,/script time/p' "$LOGDIR/sd${SD}_${suite}.out")
echo
- echo "----[ $suite sn=5M ]----"
+ echo "----[ $suite sn=${SN} ]------------------------------------------------------------------"
print_stats_table \
- <(sed -n '/correct solutions/,/script time/p' "$HEAD_LOGDIR/sn5m_${suite}.out") \
- <(sed -n '/correct solutions/,/script time/p' "$LOGDIR/sn5m_${suite}.out")
+ <(sed -n '/correct solutions/,/script time/p' "$HEAD_LOGDIR/sn${SN}_${suite}.out") \
+ <(sed -n '/correct solutions/,/script time/p' "$LOGDIR/sn${SN}_${suite}.out")
echo
done
+echo
+echo "NOTE: The logfiles for these runs are in /tmp/typhoon/manual and will be"
+echo " overwritten by the next invocation of this script; save now them if"
+echo " you want them!"