1import { RESULTS_REPO_URL } from "../results";
3const REPO_URL = "https://github.com/concept-collection/fastandaccurate";
5export function AboutPage() {
6 const cliUrl = `https://concept-collection.github.io/fastandaccurate/cli.tgz?v=${__BUILD_ID__}`;
7 return (
8 <>
9 <p className="small">
10 <a href="#/">← problems</a>
11 </p>
12 <h1>About</h1>
13 <p>
14 fastandaccurate benchmarks PDE solvers on speed and accuracy
15 together. Each <strong>problem</strong> is posed in the continuum,
16 with an exact or highly accurate reference solution; a solver chooses
17 its own discretization and is scored at problem-specified evaluation
18 points. A problem defines its own solver interface and a short list
19 of official <strong>instances</strong> (parameter combinations) in a
20 written specification, so every solver is compared on identical
21 inputs. Solvers are usually MATLAB function files. Most run via{" "}
22 <a href="https://numbl.org">numbl</a>, in the browser and from the
23 command line alike; some run only in real MATLAB through the command
24 line, and their results are marked as not reproducible in the
25 browser. An interface also has a TypeScript form, for a solver that
26 cannot be a MATLAB file: <code>mfs-gpu</code> is the same method as{" "}
27 <code>mfs</code>, written in TypeScript and WGSL and run on a WebGPU
28 device.
29 </p>
31 <h2>Measurement</h2>
32 <p>
33 The central object is the <strong>work-precision curve</strong>:
34 error against compute time, traced out as the solver's resolution
35 parameter varies. Errors are measured at a fixed set of evaluation
36 points defined per instance, relative to the reference solution.
37 Timing is two untimed warmup runs followed by timed runs, of which
38 the fastest is reported: interference only ever adds time, so the
39 fastest run is the least contaminated estimate of the solver's own
40 cost. How many timed runs is not fixed but set by a time budget: a
41 point keeps repeating until it has used about half a second, with a
42 floor of five runs and a cap of fifty, so a solve that takes a
43 fraction of a millisecond is sampled fifty times rather than five,
44 and its reported time stops depending on what else the machine
45 happened to be doing. A run includes the solver's own
46 discretization, assembly, solve, and evaluation. Curves are traced in order of the solver's
47 resolution parameter, and may double back in time, since a solver's
48 cost need not increase with resolution.
49 </p>
51 <h2>Results and provenance</h2>
52 <p>
53 Results are JSON files in{" "}
54 <a href={RESULTS_REPO_URL}>fastandaccurate-results</a>, added by pull
55 request; the site reads that repository statically. Every result
56 carries its provenance: the instance spec and its hash, solver id and
57 version, timing protocol, runtime, numbl version, and machine.
58 Result files are produced by the command line; solvers included on
59 the site can also be rerun in the browser, directly on the problem
60 page, to compare against the committed curves. Results from solvers
61 outside the repository enter the same way and are marked as not
62 reproducible in the browser.
63 </p>
65 <h2>Running outside the browser</h2>
66 <p>
67 The command line installs from this site itself (node 20 or newer;
68 nothing on the npm registry):
69 </p>
70 <pre>{`npx ${cliUrl} run --label "my workstation"`}</pre>
71 <p>
72 This runs the standard sweeps and writes one result JSON per instance
73 and solver. Useful flags: <code>--instance <id></code>,{" "}
74 <code>--solver <id></code>, <code>--repeats N</code> (the
75 minimum timed runs per point), <code>--time-budget S</code>,{" "}
76 <code>--max-n N</code>, <code>--out dir</code>. To benchmark your own
77 solver, point the harness at a MATLAB function file implementing the
78 problem's solver interface:
79 </p>
80 <pre>{`npx ${cliUrl} run --solver-file my_method.m --solver-id my-method`}</pre>
81 <p>
82 The solvers that run only in real MATLAB need <code>matlab</code> on
83 the PATH; the run skips them when it is absent.{" "}
84 <code>chunkie-dlp</code> needs one thing more, the{" "}
85 <a href="https://mip.sh">mip</a> package manager on the MATLAB path,
86 from which the harness installs chunkie and its FLAM and fmm2d
87 dependencies on first use. The solvers that run on WebGPU need a
88 device: in the browser that is <code>navigator.gpu</code>, and
89 outside it the optional{" "}
90 <a href="https://www.npmjs.com/package/webgpu">webgpu</a> package
91 (prebuilt Google Dawn), which is 68 MB and so is not shipped with
92 the command line; a run without it skips them.
93 </p>
94 <p className="small muted">
95 Note that npx caches by the exact URL string; the <code>?v=</code>{" "}
96 suffix above ties the command to the current deployment so a later
97 visit installs the current build.
98 </p>
100 <h2>Submitting</h2>
101 <p>
102 Result files can be loaded on a problem page (load result file) to
103 view them against the committed curves before submitting anything. To
104 publish results, open a pull request adding the files under{" "}
105 <code>results/</code> in the{" "}
106 <a href={RESULTS_REPO_URL}>results repository</a>. To add a solver to
107 the site itself, so visitors can rerun it in the browser, PR the
108 solver directory and a manifest entry to{" "}
109 <a href={REPO_URL}>the main repository</a>; submissions are reviewed
110 against the problem specification, including that a solver must not
111 special-case the known solution.
112 </p>
113 </>
114 );
115}