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 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.
26 </p>
28 <h2>Measurement</h2>
29 <p>
30 The central object is the <strong>work-precision curve</strong>:
31 error against compute time, traced out as the solver's resolution
32 parameter varies. Errors are measured at a fixed set of evaluation
33 points defined per instance, relative to the reference solution.
34 Timing is two untimed warmup runs followed by timed runs, of which
35 the fastest is reported: interference only ever adds time, so the
36 fastest run is the least contaminated estimate of the solver's own
37 cost. How many timed runs is not fixed but set by a time budget: a
38 point keeps repeating until it has used about half a second, with a
39 floor of five runs and a cap of fifty, so a solve that takes a
40 fraction of a millisecond is sampled fifty times rather than five,
41 and its reported time stops depending on what else the machine
42 happened to be doing. A run includes the solver's own
43 discretization, assembly, solve, and evaluation. Curves are traced in order of the solver's
44 resolution parameter, and may double back in time, since a solver's
45 cost need not increase with resolution.
46 </p>
48 <h2>Results and provenance</h2>
49 <p>
50 Results are JSON files in{" "}
51 <a href={RESULTS_REPO_URL}>fastandaccurate-results</a>, added by pull
52 request; the site reads that repository statically. Every result
53 carries its provenance: the instance spec and its hash, solver id and
54 version, timing protocol, runtime, numbl version, and machine.
55 Result files are produced by the command line; solvers included on
56 the site can also be rerun in the browser, directly on the problem
57 page, to compare against the committed curves. Results from solvers
58 outside the repository enter the same way and are marked as not
59 reproducible in the browser.
60 </p>
62 <h2>Running outside the browser</h2>
63 <p>
64 The command line installs from this site itself (node 20 or newer;
65 nothing on the npm registry):
66 </p>
67 <pre>{`npx ${cliUrl} run --label "my workstation"`}</pre>
68 <p>
69 This runs the standard sweeps and writes one result JSON per instance
70 and solver. Useful flags: <code>--instance <id></code>,{" "}
71 <code>--solver <id></code>, <code>--repeats N</code> (the
72 minimum timed runs per point), <code>--time-budget S</code>,{" "}
73 <code>--max-n N</code>, <code>--out dir</code>. To benchmark your own
74 solver, point the harness at a MATLAB function file implementing the
75 problem's solver interface:
76 </p>
77 <pre>{`npx ${cliUrl} run --solver-file my_method.m --solver-id my-method`}</pre>
78 <p>
79 The solvers that run only in real MATLAB need <code>matlab</code> on
80 the PATH; the run skips them when it is absent.{" "}
81 <code>chunkie-dlp</code> needs one thing more, the{" "}
82 <a href="https://mip.sh">mip</a> package manager on the MATLAB path,
83 from which the harness installs chunkie and its FLAM and fmm2d
84 dependencies on first use.
85 </p>
86 <p className="small muted">
87 Note that npx caches by the exact URL string; the <code>?v=</code>{" "}
88 suffix above ties the command to the current deployment so a later
89 visit installs the current build.
90 </p>
92 <h2>Submitting</h2>
93 <p>
94 Result files can be loaded on a problem page (load result file) to
95 view them against the committed curves before submitting anything. To
96 publish results, open a pull request adding the files under{" "}
97 <code>results/</code> in the{" "}
98 <a href={RESULTS_REPO_URL}>results repository</a>. To add a solver to
99 the site itself, so visitors can rerun it in the browser, PR the
100 solver directory and a manifest entry to{" "}
101 <a href={REPO_URL}>the main repository</a>; submissions are reviewed
102 against the problem specification, including that a solver must not
103 special-case the known solution.
104 </p>
105 </>
106 );
107}