#!/bin/bash # Produce the vonkarman-modal chain for cymbal-flat-disk-v1 (run locally; hours of compute). # Usage: bash run_chain.sh /challenges/cymbal-flat-disk-v1/challenge.json set -e here="$(cd "$(dirname "$0")" && pwd)" ch="$1" out="$here/../../solutions/cymbal-flat-disk-v1/vonkarman-modal" mkdir -p "$out" cd "$here" # the two cheap runs in parallel, then the two 4 mm runs in parallel (memory bandwidth is the limit, so no more than two at once) OMP_NUM_THREADS=4 python3 vk_modal_disk.py "$ch" "$out" g8-w100-a100-m1 > "$out/g8-w100.log" 2>&1 & OMP_NUM_THREADS=4 python3 vk_modal_disk.py "$ch" "$out" g8-w200-a200-m1 > "$out/g8-w200.log" 2>&1 & wait OMP_NUM_THREADS=4 python3 vk_modal_disk.py "$ch" "$out" g4-w200-a200-m2 > "$out/g4-w200.log" 2>&1 & OMP_NUM_THREADS=6 python3 vk_modal_disk.py "$ch" "$out" --fields g4-w300-a300-m2 g4-w300-a300-m2 > "$out/g4-w300.log" 2>&1 & wait python3 make_submission.py "$out" g8-w100-a100-m1 g8-w200-a200-m1 g4-w200-a200-m2 g4-w300-a300-m2 rm -f "$out"/*.log