#!/bin/bash # More direct tests for the overlaps 44 to 64 (IIS-Q-0003), after the review of the cases. # The review finds that one sub-case is tight: the unsplit form, an antipodal set U, and the # overlaps 50, 62, 74, ... The earlier test (run_target.sh) used 10 matrices for each overlap. # Step 1: new climbs with q3_target.py, seeds 21 to 24, for the two layers. # Step 2: all matrices with overlap 44 to 64 from all the files target/target_L*.txt (old and new), # one copy of each matrix, with the command "q3_check one LAYER M 0 2000". # Step 3: q3_target_collect.py on the two logs of step 2. # Clean environment: lean_env.sh sets the variables and removes the variables that can hold a secret. # usage (from the root of the workspace): /bin/bash -c '. work/lean_env.sh && bash work/capset/q0003/run_tight.sh' W=$(cd "$(dirname "$0")/../../.." && pwd) # the root of the workspace; this script is in work/capset/q0003 D=$W/work/capset/q0003 Q=$D/q3_check L=$D/logs T=$D/target PY3=/opt/homebrew/bin/python3 { echo "start $(date -u +%Y-%m-%dT%H:%M:%SZ)" echo "binary sha256 $(shasum -a 256 "$Q" | cut -d' ' -f1)" } > "$L/q3_tight_run.log" 2>&1 for LAYER in 0 1; do for S in 21 22 23 24; do "$PY3" -I "$D/q3_target.py" "$LAYER" "$S" 3000 300 400 "$T/target_L${LAYER}_S${S}.txt" > "$T/target_L${LAYER}_S${S}.log" 2>&1 & done done wait { echo "climbs end $(date -u +%Y-%m-%dT%H:%M:%SZ)" for LAYER in 0 1; do cat "$T"/target_L${LAYER}_S*.txt | awk '$1>=44 && $1<=64' | sort -u -k2,2 > "$T/tight_L$LAYER.txt" echo "layer $LAYER: matrices with overlap 44 to 64: $(wc -l < "$T/tight_L$LAYER.txt" | tr -d ' ')" done } >> "$L/q3_tight_run.log" 2>&1 for LAYER in 0 1; do { while read k m; do echo "=== k $k start $(date -u +%Y-%m-%dT%H:%M:%SZ)" "$Q" one "$LAYER" "$m" 0 2000 echo "=== exit $?" done < "$T/tight_L$LAYER.txt"; } > "$L/q3_tight_L$LAYER.log" 2>&1 & done wait "$PY3" -I "$D/q3_target_collect.py" "$L/q3_tight_L0.log" "$L/q3_tight_L1.log" > "$L/q3_tight_collected.log" 2>&1 { echo "collect exit $?"; echo "end $(date -u +%Y-%m-%dT%H:%M:%SZ)"; } >> "$L/q3_tight_run.log"