af2a046Von Karman modal solver on a Cartesian grid masked to the disk, site, and workflowJeremy Magland 1
2# Produce the vonkarman-modal chain for cymbal-flat-disk-v1 (run locally; hours of compute).
3# Usage: bash run_chain.sh <cymbal-repo>/challenges/cymbal-flat-disk-v1/challenge.json
4set -e
5here="$(cd "$(dirname "$0")" && pwd)"
6ch="$1"
7out="$here/../../solutions/cymbal-flat-disk-v1/vonkarman-modal"
8mkdir -p "$out"
9cd "$here"
10# 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)
11OMP_NUM_THREADS=4 python3 vk_modal_disk.py "$ch" "$out" g8-w100-a100-m1 > "$out/g8-w100.log" 2>&1 &
12OMP_NUM_THREADS=4 python3 vk_modal_disk.py "$ch" "$out" g8-w200-a200-m1 > "$out/g8-w200.log" 2>&1 &
13wait
14OMP_NUM_THREADS=4 python3 vk_modal_disk.py "$ch" "$out" g4-w200-a200-m2 > "$out/g4-w200.log" 2>&1 &
15OMP_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 &
16wait
17python3 make_submission.py "$out" g8-w100-a100-m1 g8-w200-a200-m1 g4-w200-a200-m2 g4-w300-a300-m2
18rm -f "$out"/*.log