Chain procedure: 8 mm on CPU, 4 mm on GPU up to 600 modes
2 changed files+15−13
README.mdmodified+3−2View file
@@ -19,10 +19,11 @@ Field exports are about 40 MB each and are stored with git LFS (`.gitattributes`
1919 `vonkarman-modal` solves the von Kármán thin-plate reduction of the challenge model (Airy stress function, in-plane inertia neglected, damping on bending only) by a modal method on a Cartesian grid. The disk is approximated by the square cells of a uniform grid whose centers lie inside it, a staircase boundary, with grid spacings of 8 mm and 4 mm. The linear free-plate modes of that domain and the clamped Airy modes come from Bogner-Fox-Schmit C1 finite elements on the cells and a sparse shift-invert eigensolver; the cubic coupling tensor is integrated on the same cells; the time stepping is a two-step scheme exact in the linear part; and the retarded Rayleigh integral is evaluated with cubic fractional delays. The chain is ordered by grid spacing, number of modes, and time step. It is a thin-plate approximation on an approximate domain, so its converged limit differs from the three-dimensional model that defines the challenge.
2020
2121 ```
22-bash solvers/vonkarman-modal-disk/run_chain.sh <cymbal-repo>/challenges/cymbal-flat-disk-v1/challenge.json
22+bash solvers/vonkarman-modal-disk/run_chain.sh <cymbal-repo>/challenges/cymbal-flat-disk-v1/challenge.json cpu # 8 mm members
23+bash solvers/vonkarman-modal-disk/run_chain.sh <cymbal-repo>/challenges/cymbal-flat-disk-v1/challenge.json gpu # 4 mm members, needs a CUDA GPU and PyTorch
2324 ```
2425
25-The chain is `g8-w100-a100-m1`, `g8-w200-a200-m1`, `g4-w200-a200-m2`, `g4-w300-a300-m2` (grid spacing in mm, transverse modes, Airy modes, time steps per output sample). Because the strike is centered on the x axis the solution is even in y, and the modal bases are restricted to that symmetric subspace, which is exact and halves the number of modes needed for a given frequency reach: 200 symmetric modes reach about 6 kHz and 300 about 9 kHz. The 8 mm grid has 2024 cells and 8500 degrees of freedom, the 4 mm grid 8112 cells and 33268. On the 8 mm grid the lowest elastic frequencies are 21.76 and 21.88 Hz for the two-nodal-diameter pair (21.87 Hz analytically), 38.01 Hz for the first axisymmetric mode (38.03) and 87.6 and 90.2 Hz for the four-nodal-diameter pair (89.61); on the 4 mm grid the last pair is 89.03 and 89.19 Hz. The staircase splits degenerate pairs by about a percent at 8 mm and a few tenths of a percent at 4 mm. The linear limit of the nonlinear solver agrees with the closed-form linear modal solution on the same mesh to 5e-4 at one step per sample and 1.3e-4 at two.
26+The chain is `g8-w100-a100-m1`, `g8-w200-a200-m1`, `g4-w200-a200-m2`, `g4-w300-a300-m2`, `g4-w450-a450-m2`, `g4-w600-a600-m4` (grid spacing in mm, transverse modes, Airy modes, time steps per output sample). Because the strike is centered on the x axis the solution is even in y, and the modal bases are restricted to that symmetric subspace, which is exact and halves the number of modes needed for a given frequency reach: 200 symmetric modes reach about 6 kHz, 300 about 9 kHz, 450 about 13.5 kHz and 600 about 18 kHz. The cost of a time step is the memory bandwidth of the cubic coupling tensor (8 bytes times the cube of the mode count, 1.7 GB at 600 modes), so the 8 mm members were run on a laptop CPU and the 4 mm members on a workstation GPU with `--device cuda`, where a step takes a few milliseconds at most; the two code paths agree to round-off, and the hardware is recorded per solution. The 8 mm grid has 2024 cells and 8500 degrees of freedom, the 4 mm grid 8112 cells and 33268. On the 8 mm grid the lowest elastic frequencies are 21.76 and 21.88 Hz for the two-nodal-diameter pair (21.87 Hz analytically), 38.01 Hz for the first axisymmetric mode (38.03) and 87.6 and 90.2 Hz for the four-nodal-diameter pair (89.61); on the 4 mm grid the last pair is 89.03 and 89.19 Hz. The staircase splits degenerate pairs by about a percent at 8 mm and a few tenths of a percent at 4 mm. The linear limit of the nonlinear solver agrees with the closed-form linear modal solution on the same mesh to 5e-4 at one step per sample and 1.3e-4 at two.
2627
2728 ## Adding a submission
2829
solvers/vonkarman-modal-disk/run_chain.shmodified+12−11View file
@@ -1,18 +1,19 @@
11 #!/bin/bash
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
2+# Produce the vonkarman-modal chain for cymbal-flat-disk-v1. Run locally, never on the vault runner.
3+# The 8 mm members run on a CPU (minutes); the 4 mm members need a GPU (--device cuda, PyTorch) to be
4+# practical, since the per-step cost is the memory bandwidth of the coupling tensor (1.7 GB at 600 modes).
5+# Usage: bash run_chain.sh <cymbal-repo>/challenges/cymbal-flat-disk-v1/challenge.json [cpu|gpu|all]
46 set -e
57 here="$(cd "$(dirname "$0")" && pwd)"
68 ch="$1"
9+what="${2:-all}"
710 out="$here/../../solutions/cymbal-flat-disk-v1/vonkarman-modal"
811 mkdir -p "$out"
912 cd "$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)
11-OMP_NUM_THREADS=4 python3 vk_modal_disk.py "$ch" "$out" g8-w100-a100-m1 > "$out/g8-w100.log" 2>&1 &
12-OMP_NUM_THREADS=4 python3 vk_modal_disk.py "$ch" "$out" g8-w200-a200-m1 > "$out/g8-w200.log" 2>&1 &
13-wait
14-OMP_NUM_THREADS=4 python3 vk_modal_disk.py "$ch" "$out" g4-w200-a200-m2 > "$out/g4-w200.log" 2>&1 &
15-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 &
16-wait
17-python3 make_submission.py "$out" g8-w100-a100-m1 g8-w200-a200-m1 g4-w200-a200-m2 g4-w300-a300-m2
18-rm -f "$out"/*.log
13+if [ "$what" = cpu ] || [ "$what" = all ]; then
14+ python3 vk_modal_disk.py "$ch" "$out" g8-w100-a100-m1 g8-w200-a200-m1
15+fi
16+if [ "$what" = gpu ] || [ "$what" = all ]; then
17+ python3 vk_modal_disk.py "$ch" "$out" --device cuda --fields g4-w600-a600-m4 g4-w200-a200-m2 g4-w300-a300-m2 g4-w450-a450-m2 g4-w600-a600-m4
18+fi
19+python3 make_submission.py "$out" g8-w100-a100-m1 g8-w200-a200-m1 g4-w200-a200-m2 g4-w300-a300-m2 g4-w450-a450-m2 g4-w600-a600-m4