Generator

The cost of a drifting sequence of nonlinear solves, against how often the Jacobian is refactorised

One function in the reuse library, called 20 times across 5 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 17 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws the cost of a drifting sequence of nonlinear solves, against how often the jacobian is refactorised. Twenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 16.42 MFlop; refactorising every 5 costs 9.27. Past a period of 20 the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 4 factorisations, 9.22 MFlop, and it was never told the drift rate.

refresh-crossover is one function in lib/figures/reuse.js — reuse — what a kept factorisation or preconditioner is worth, and for how long. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

The cost of a drifting sequence of nonlinear solves, against how often the Jacobian is refactorisedTwenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 16.42 MFlop; refactorising every 5 costs 9.27. Past a period of 20 the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 4 factorisations, 9.22 MFlop, and it was never told the drift rate.024681012141618202210⁶10⁷10⁸members served by one factorisationmultiplications for the whole sequencedoes not convergethe contraction ruledrift 0.01 a memberevery member1.6·10⁷every 5 members9.3·10⁶contraction rule9.2·10⁶its factorisations4cliff at a period of20a factorisation has a shelf lifeand the cliff is past the optimum

Twenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 16.42 MFlop; refactorising every 5 costs 9.27. Past a period of 20 the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 4 factorisations, 9.22 MFlop, and it was never told the drift rate.

logDrift: -2

The arguments are the ones A factorisation kept past its date passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The cost of a drifting sequence of nonlinear solves, against how often the Jacobian is refactorisedTwenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 16.42 MFlop; refactorising every 5 costs 9.27. Past a period of 20 the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 4 factorisations, 9.22 MFlop, and it was never told the drift rate.024681012141618202210⁶10⁷10⁸members served by one factorisationmultiplications for the whole sequencedoes not convergethe contraction ruledrift 0.01 a memberevery member1.6·10⁷every 5 members9.3·10⁶contraction rule9.2·10⁶its factorisations4cliff at a period of20a factorisation has a shelf lifeand the cliff is past the optimum

Twenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 16.42 MFlop; refactorising every 5 costs 9.27. Past a period of 20 the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 4 factorisations, 9.22 MFlop, and it was never told the drift rate.

logDrift: -3

The arguments are the ones A factorisation kept past its date passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The cost of a drifting sequence of nonlinear solves, against how often the Jacobian is refactorisedTwenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 14.11 MFlop; refactorising every 20 costs 4.85. Past a period of the range drawn the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 1 factorisations, 4.85 MFlop, and it was never told the drift rate.024681012141618202210⁶10⁷10⁸members served by one factorisationmultiplications for the whole sequencethe contraction ruledrift 0.001 a memberevery member1.4·10⁷every 20 members4.9·10⁶contraction rule4.9·10⁶its factorisations1cliff at a period of∞a factorisation has a shelf lifeand the cliff is past the optimum

Twenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 14.11 MFlop; refactorising every 20 costs 4.85. Past a period of the range drawn the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 1 factorisations, 4.85 MFlop, and it was never told the drift rate.

logDrift: -2.5

The arguments are the ones A factorisation kept past its date passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The cost of a drifting sequence of nonlinear solves, against how often the Jacobian is refactorisedTwenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 15.26 MFlop; refactorising every 10 costs 6.71. Past a period of the range drawn the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 2 factorisations, 7.46 MFlop, and it was never told the drift rate.024681012141618202210⁶10⁷10⁸members served by one factorisationmultiplications for the whole sequencethe contraction ruledrift 0.0032 a memberevery member1.5·10⁷every 10 members6.7·10⁶contraction rule7.5·10⁶its factorisations2cliff at a period of∞a factorisation has a shelf lifeand the cliff is past the optimum

Twenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 15.26 MFlop; refactorising every 10 costs 6.71. Past a period of the range drawn the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 2 factorisations, 7.46 MFlop, and it was never told the drift rate.

logDrift: -1.5

The arguments are the ones A factorisation kept past its date passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The cost of a drifting sequence of nonlinear solves, against how often the Jacobian is refactorisedTwenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 19.01 MFlop; refactorising every 3 costs 14.50. Past a period of 6 the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 8 factorisations, 12.33 MFlop, and it was never told the drift rate.024681012141618202210⁶10⁷10⁸members served by one factorisationmultiplications for the whole sequencedoes not convergethe contraction ruledrift 0.032 a memberevery member1.9·10⁷every 3 members1.5·10⁷contraction rule1.2·10⁷its factorisations8cliff at a period of6a factorisation has a shelf lifeand the cliff is past the optimum

Twenty members, each warm-started from the last, each solved by a chord iteration on a factorisation that may be several members old. Refactorising at every member costs 19.01 MFlop; refactorising every 3 costs 14.50. Past a period of 6 the chord iteration stops converging altogether, which is drawn as an open circle on the ceiling rather than omitted. The filled square is the rule that refactorises when the observed contraction ratio exceeds 0.2: 8 factorisations, 12.33 MFlop, and it was never told the drift rate.

show: "kv-law"

The arguments are the ones A kept vector buys one iteration passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The last member's iterations against the number of kept vectors, for drifts of five ranks, one kept factor throughoutrank 2: 3, 2, 1, 1, 1, 1, 1; rank 4: 5, 4, 3, 1, 1, 1, 1; rank 8: 9, 8, 7, 5, 1, 1, 1; rank 16: 17, 16, 15, 13, 9, 1, 1; rank 32: 39, 37, 36, 32, 27, 17, 1 keeping 0, 1, 2, 4, 8, 16, 32.110¹0510152025303540vectors kept; none is drawn at a halfiterations on the last memberrank 2rank 4rank 8rank 16rank 3280 unknowns · 24 membersr + 1, less one for each vector

rank 2: 3, 2, 1, 1, 1, 1, 1; rank 4: 5, 4, 3, 1, 1, 1, 1; rank 8: 9, 8, 7, 5, 1, 1, 1; rank 16: 17, 16, 15, 13, 9, 1, 1; rank 32: 39, 37, 36, 32, 27, 17, 1 keeping 0, 1, 2, 4, 8, 16, 32.

What it checked while drawing

Every figure above checked its own claims on the way to being drawn, and a claim that failed would have stopped the picture rather than shipped a wrong one. Those checks used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

17 distinct claims across 6 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

a conditioning the SPD construction can hold

a drift rate inside the range at least two periods survive

a half of the spectrum to place the drift in

a number of kept vectors this file measures

a rank the dial offers

a refactorisation rule of one kind or the other

a relative drift inside the range the figures use

a rule this file walks

a size the dense factorisations are affordable at

and the best of them is cheaper than refactorising at every member

and the contraction rule converges

at least one row

at least two refresh periods converge, or there is no crossover to draw

curves with points on them

every member converges

Jacobi needs a symmetric matrix

matmul shapes agree

Against the rule

The rule does not apply to it. It factorises nothing, so there is no residual it could be withholding. That is worth stating rather than leaving blank: a site that reported the rule as satisfied by every generator would be counting mostly generators the rule never reached.

Across the library: the rule bites on 217 of 397 generators — 199 print a residual and 18 are exempt with a published reason; 180 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

When the problem arrives again

A factorisation kept past its date

One Cholesky factor can serve five members of a drifting sequence and save 44 per cent of the work. Kept for twenty it does not lose accuracy — it stops converging altogether. The optimum and the cliff are four members apart, both move with the drift, and a rule written in a ratio the iteration has already computed finds them without being told what the drift is.

When the problem arrives again

A kept vector buys one iteration

A kept Cholesky factor with a drift of rank r in the matrix takes exactly r + 1 iterations at every member, at any drift rate, because the preconditioned matrix is the identity plus a rank-r term. The run has found those directions and throws them away. Keep some from one member to the next and each one removes exactly one iteration: keep sixteen on a drift of rank sixteen and every later member takes one. Each vector also costs half an iteration a member, so the saving is half what it looks like, and past the rank it is all cost. On a drift across half the spectrum there is no rank to reach: sixteen vectors halve the iterations and save a fifth of the work, and rebuilding the factor still wins until a rebuild costs more than a hundred iterations.

When the problem arrives again

The first count names the rank

A kept Cholesky factor on a drift of rank r takes r + 1 conjugate gradient iterations, and each vector kept from one member to the next removes exactly one. The best number to keep is the rank, which a caller does not know. A rule that adds one vector a member while the count falls finds it, settling at r + 1 by member r + 2 as predicted, and pays 13 to 25 per cent over keeping the rank from the start, which is over the predicted fifteen at ranks 2 and 16. It also needs every vector to buy exactly one iteration: on a drift whose directions turn by a thousandth of a radian a member, or one with no low rank, the count does not fall at the first vector and the rule stops there. The first member's count is r + 1 already. Keeping one fewer than it took costs less than knowing the rank in advance, and stays within five per cent of the best fixed choice on every drift but one turning a tenth of a radian a member, where keeping nothing is best.

When the problem arrives again

What a rebuild is worth

One sequence, one drift, one preconditioner — and six different right answers, because the cheapest rebuild period depends on what a rebuild cost to build and on nothing else. The optimum walks from every member to every twelfth as the setup gets dearer, and the free rule that reads the iteration count beats it in the middle of that range and loses at both ends.

When the problem arrives again

Where the drift lands

The standing rule for when a preconditioner has gone stale is to rebuild it once the matrix has changed by more than some fraction of itself. Two drifts of exactly the same relative size cost 19 iterations and 5 on the same matrix, and the quantity that separates them is not in the rule at all — the perturbation is divided by the eigenvalue it lands on.

The whole library · All essays · What must fail