Skip to content

Accuracy icon Accuracy and convergence

Which numerical parameters control the error of a DYNAMITE run? To answer this, we solve a model with a known exact solution and vary each parameter in turn, keeping the others at their defaults.

Test case

The pure \(p=2\) spherical model (-p 2 -l 1) quenched from \(T_0=\infty\) to \(T=0\) (-T inf -G 0) can be solved in closed form. This is also the model of the regression test T1 (see Development). We compare the numerical solution with the exact one up to \(t=10^5\) and measure

  • the root-mean-square deviations \(\lVert C_\text{num}-C_\text{exact}\rVert_\text{rms}(t)\) and \(\lVert R_\text{num}-R_\text{exact}\rVert_\text{rms}(t)\), taken over the \(L\) grid points \(t'=\theta_i t\) at fixed \(t\);
  • the absolute energy error \(|E_\text{num}-E_\text{exact}|(t)\).

The reference settings, shown as black curves in every row of the figure, are the defaults except for -w, which is set explicitly to 1 instead of the default -1 so that the runs are reproducible:

Parameter Option Reference value
grid length \(L\) -L (simulation and RG-Evo grid) 512
interpolation order \(m\) -o (RG-Evo grid) 9
order \(s\) of the quadrature spline -s (RG-Evo grid) 5
Runge–Kutta tolerance \(\epsilon\) -e \(10^{-10}\)
sparsification sweeps \(w\), interval -w, --sparsify-interval 1, every \(10^5\) steps

Notation

In the figure, \(m\) is the interpolation order, which is set with -o in RG-Evo grid. It is not the option -m of the simulation, which sets the maximal number of time steps.

Results

Errors of C, R and E for the p=2 model as L, m, s, epsilon and the sparsification are varied
Total numerical error for the pure p=2 model quenched from T₀=∞ to T=0. Columns: rms error of C and R, absolute error of E. Rows from top to bottom: grid length L (solid: fixed ε; dashed: fixed ε/(2L)), interpolation order m, spline order s, Runge–Kutta tolerance ε, and sparsification (w sweeps per pass, w=0 meaning none, and the number of steps between passes). Black curves: reference settings. PDF version.

Grid length \(L\) (a–c). \(L=128\) and, to a lesser extent, \(L=256\) give visibly larger errors. Beyond the default \(L=512\), the error decreases only slightly at intermediate times and not at all at late times. The solid curves keep \(\epsilon\) fixed; with the default error norm sum this makes the time stepping stricter as \(L\) grows (see Command line). The dashed curves keep \(\epsilon/(2L)\) fixed, i.e. the same tolerance per grid value, and lie on top of the default.

Interpolation order \(m\) (d–f). Linear interpolation (\(m=1\)) and \(m=3\) are clearly insufficient. From \(m=7\) on, the curves coincide; increasing the order beyond the default \(m=9\) changes nothing.

Spline order \(s\) (g–i). \(s=1\) gives large errors, and \(s=3\) is still noticeably worse than the default at intermediate times. For \(s\ge5\) the curves coincide.

Runge–Kutta tolerance \(\epsilon\) (j–l). This is the only parameter in the figure that still changes the error beyond the defaults: tightening \(\epsilon\) from \(10^{-10}\) to \(10^{-12}\) lowers the errors by one to two orders of magnitude. With the grid parameters saturated, the remaining error is set by \(\epsilon\).

Sparsification (m–o). Switching sparsification off (\(w=0\)), using up to three sweeps per pass, or running the maintenance pass every \(10^4\) instead of \(10^5\) steps gives indistinguishable results. Sparsification does not contribute a measurable error; see Sparsification.

For this test case, the default grid is already converged in \(m\) and \(s\) and nearly converged in \(L\), and the error is controlled by \(\epsilon\). For a new model or parameter range we recommend:

  1. Run with the defaults.
  2. Repeat with -e smaller by a factor of 10–100. If the observables of interest change, keep tightening \(\epsilon\).
  3. Repeat once with -L 1024, especially for models whose correlations vary rapidly near \(\theta=1\) or \(\theta=0\), e.g. mixed models at low temperature. With the default error norm sum, keep \(\epsilon/L\) fixed (e.g. -L 1024 -e 2e-10) if you want to separate the effect of the grid from that of the time stepping.
  4. Change the interpolation and spline orders only if step 3 shows a dependence on the grid.

For reproducible runs, set -w explicitly (e.g. -w 1) rather than using the default -w -1, whose behaviour depends on the GPU memory in use.