The step was coarser than the test
Worth reading first: Three eigenvalues, and two are the golden ratio · A parameter that counts steps · The spectrum that predicts nothing.
A tolerance is not an accuracy put a real inner iteration into the first block of a triangular saddle-point preconditioner, under flexible GMRES, in place of the fixed perturbation that had been standing in for one. It found that the number typed as a tolerance is not the error handed back. Conjugate gradients stopped at a relative residual delivered energy errors ten to a billion times below , and the outer residual followed the error it was actually given, with a constant ten to a hundred times the fixed model’s. The step rule that had counted the outer steps on nine runs in ten counted four in five.
That essay left two signed predictions. The first was about where the error lay: if the larger constant comes from conjugate gradients concentrating its error in a few eigenvectors of the block , then a fixed model with its perturbation placed on those eigenvectors should reproduce it, within a factor of three on at least nine of twelve systems. The second was about the test: stop on the error delivered instead of the residual, and the rule “written in ” should count within one on at least 180 of 198 runs, “because the error each application delivers then sits within a factor of a few of the target instead of anywhere below it”.
Both fail, and for the same underlying reason, one that neither the prediction nor the essay before it had looked at. The reason is visible on a single inner solve, and the second half of this essay is mostly what follows from it.
An estimate that is already being computed
Conjugate gradients from a zero start carries an unusual identity. The squared error of its iterate in the block’s own norm is the sum of over all the steps still to come, and the squared norm of the iterate itself is the sum of the same terms over the steps already taken. Hestenes and Stiefel wrote this down in the paper that introduced the method. So truncating the first sum after terms gives a lower bound on the error of the iterate steps back, and dividing by the second sum makes it relative. It needs no extra product, only the numbers the iteration already computes, and it pays further steps past the iterate it returns.
Here the inner solve runs until that estimate falls to a target , and returns the iterate it refers to. The look-ahead is one, two or four steps. Everything else is the same as the residual-stopped measurement: eighteen systems of three shapes, block condition numbers of 1, and , constraint condition numbers of 10 and , an exact Schur complement, eleven targets from to . On the six systems where the block is the identity the inner solve is exact in one step whatever is asked, as before, so the comparisons use the other twelve.
As an estimate it does what is claimed. With two steps of look-ahead no run on any system at any target hands back a median error more than ten times the target, and the largest over all runs is 0.79 of it. With one step of look-ahead four runs do overshoot tenfold, and that is the known weakness of a one-term estimate, which can be misled by a single short step. So two is the setting used below, and it is honest in the direction that matters.
The two tests mostly land on the same iterate
Now turn the dial on this figure. The prediction expects the blue dots to sit near one, a factor of a few below the target, and the red ones anywhere further left. At a target of the two are on top of each other on most rows, and both are well to the left of one. The energy stop’s median over all runs is 0.054 of the target and its lowest is about of it. It is true that this is a good deal tighter than the ten to a billion the earlier essay reported for its worst cases. But the red dots here are at the same place as the blue.
Counted across the twelve systems and eleven targets, 82 of 132 runs deliver the same median error under the two stops to within a factor of two. On 32 the energy stop returns a larger error, which is the behaviour it was meant to have, and on 18 a smaller one, which it was not. Replacing the test has changed the answer on barely a third of the runs, and in no consistent direction.
If two different tests stop at the same place, the reason is unlikely to be in either test. It has to be in what they are testing.
There it is. On the nine-by-nine block with a condition number of 100 the relative energy error is 0.9, 0.8, 0.6, 0.4, 0.3, 0.2, 0.1 and 0.05 through eight steps, and at the ninth it is . On the twelve-by-twelve block the same pattern runs for eleven steps to 0.004 and the twelfth is . On a block with a condition number of there is no fall at all to speak of until the last few steps. These blocks have a dozen distinct eigenvalues spread evenly in the logarithm, and conjugate gradients finds the answer exactly when it has found all of them, up to rounding. Its error is a smooth descent into a cliff, and the cliff is the end of the space.
So any test at all, with a target anywhere from to , is deciding between “before the cliff” and “after the cliff”. The residual and the energy error both read large on one side and tiny on the other. That is what “a tolerance is not an accuracy” was seeing, and the sentence is still true, but the blame it implied was misplaced: a stop asked for and handed back has not been fooled by a residual. It has been offered 0.05 and and nothing in between. Finite termination is the mechanism the first block’s small size imposes, and it is the same one the outer iteration relies on when it stops in two steps.
What the rule’s misses were
The prediction’s number was 180 of 198. The rule written in counts within one on 154. The residual stop had counted 156 written in its tolerance and 158 written in the accuracy delivered, so the improvement has a slightly negative sign. The claim of 180 is false by twenty-six runs.
What the figure adds is where the misses are. The rule is excellent at tight targets: at and below it misses 5 of 108 under the energy stop and 7 of 108 under the residual stop. And it falls off a shelf above that: 39 of 90 under the first and 33 of 90 under the second, reaching eleven or twelve of eighteen at the two loosest targets. So the difference between the two stops is noise, and the real division is between tight targets and loose ones.
The rule assumes the residual falls by one factor of every two steps. At a target of on this system that is what happens: , , , , , and the pairs are plain to see, one large drop for each two steps. A square root the residual does not pay derived that from the double root at one in GMRES’s polynomial. At the pairs still exist, but they are no longer equal: the first drop is to , and the second takes it to , a factor of a million where the rule expects another hundred. At they have gone: the residual sits at one for three steps and then falls irregularly for six more. By then an inner solve is not close to the block’s inverse at all, the eigenvalue pairs the argument counted on have no remaining reason to stay paired, and the rule’s reasoning does not apply. No choice of stopping test would change that, and the same collapse occurs whichever test is used.
The perturbation in chosen directions
The other prediction asked where in the block the error lies, and whether a fixed model that puts its perturbation there reproduces what a real solve does. It started from a plausible idea: conjugate gradients removes the error along the large, well-separated eigenvalues first, so what is left should sit on the small ones.
The three smallest eigenvectors match within a factor of three on four of twelve systems. An evenly spread perturbation also manages four. The three largest manage none. The prediction wanted nine against under half for the spread one, and what it got is no separation at all. And where they fail the model is usually too small, by as much as a factor of to on the two systems of fourteen unknowns and two constraints whose constraint condition number is .
The location itself has been measured, and the premise fails there as well. On every one of the twelve systems at three tolerances, , and , under two per cent of the energy error lies on the three smallest eigenvectors. Part of that is the norm: a component along an eigenvector with a small eigenvalue is weighted by that eigenvalue, and the smallest ones here are ten thousand times smaller than the largest. So in the block’s own energy the small directions cannot hold much, however much conjugate gradients has left there. On 20 of those 36 readings more than half of the energy error is on the three largest, and on the rest it sits in the middle of the spectrum, moving between tolerances in no pattern a fixed perturbation could follow.
The deeper failure is one the fixed model cannot be repaired against. It applies the same operator to every vector, and the earlier essay had already identified that a real inner solve hands back a different error for each vector. Its error depends on the right-hand side it was given. A perturbation of the block is linear in that vector. So however it is placed, it will agree with a real solve only on the systems where the difference between those two things happens not to matter, and that is what four of twelve looks like.
Which number the outer iteration reads
The prediction assumed that the energy error is the right quantity to control, because the fixed model’s measures a perturbation in the block’s own norm. The real solve offers a way to check that, since each run has both numbers: the inner residual it delivered and the energy error it delivered. If the outer two-step residual is proportional to one of them with a steadier constant, that is the one the outer iteration is reading.
On the 66 readable runs with a constraint condition number of 10, the two-step residual is a median 4.4 times the largest inner residual delivered, and 320 times the median energy error. With a constraint condition number of those become 180 and 990. In both cases the residual is the nearer reading, by a factor of five to seventy, and the mechanism is simple enough to write down. Applying the preconditioner solves the first block approximately, and when the Krylov relation is formed the part of the outer residual left in the first block is exactly the inner residual. It enters directly, with no condition number attached. An energy error has to be converted into a residual by the block itself, and a small component along a large eigenvalue is a large residual, which is where most of the error is. So the test the earlier essay was criticising is measuring the quantity the outer iteration actually receives. Its failing was only ever that it can overshoot.
That also says why the two stops so seldom differ in effect. When they do select different iterates, the outer residual follows the residual of whichever iterate was returned, and an estimate of the energy adds nothing about that number.
What the look-ahead costs and what loosening saves
The look-ahead itself is not what is deciding the count. At one step, two and four the rule counts 152, 154 and 157 of 198: four steps of look-ahead buy three more runs and take the delivered error further from the target, since a return four steps back is below it by more.
The energy stop costs a fairly steady six to twelve extra inner steps in a whole solve of fifty or sixty, about what two steps of look-ahead per application come to over the four or so outer steps, and it buys nothing that shows up in the outer count. If a code wanted a proper error bound for some other reason, then that is its price, and it is a small one. As a replacement stop for a preconditioner it has no case on these systems.
The result that the previous measurement reported also survives under the new test. Loosening the target never lowers the total. The median under both stops is flat around fifty to sixty down to about and then climbs, to about a hundred at , where the extra outer steps cost more than the inner steps saved per application. The cheapest setting anybody could choose on these systems is the tightest one measured, and the inner solve should run to the bottom of its cliff and stay there. That advice is a property of a block with a dozen eigenvalues, and it is the sentence most likely to change on a larger one.
One eigenvalue and two steps and where the augmentation puts the cost both priced the inner solve against the outer steps at other settings, and neither found a saving from loosening either. The same conclusion now rests on two kinds of test. And in a preconditioner that need not know the constraint the block itself is what gets replaced, which is another way of avoiding the inner solve altogether, at the cost of a different set of eigenvalues.
What small blocks do not show
Everything measured here is on blocks of nine to fourteen unknowns, and that turns out to be the main finding. It would be easy to read this as “the stopping test does not matter”, and that is a reading only these blocks support. On a block of ten thousand unknowns with a smooth spectrum, conjugate gradients converges geometrically for hundreds of steps. A target there is reached by a small overshoot and not a cliff, and the difference between a residual and an energy error is a real multiple of the block’s condition number, which has room to show. The rate the condition number predicts and the answer that arrives when the space runs out are those two regimes, and these blocks live in the second.
The eigenvalues here are spread evenly in the logarithm, which is itself a choice, and it is what makes the descent so gentle before the cliff. Clustered eigenvalues would produce an earlier cliff and a narrower target range in which anything can happen. The right-hand sides are the ones flexible GMRES generates, so they are correlated with the system in ways a random vector would not be. And the Schur complement remains exact throughout, so the other half of the preconditioner has contributed nothing to the outer residual.
Still open: a block large enough to have a rate
A block with room. The measurement above says the two tests agree because no intermediate iterate exists. The prediction with a sign is that on blocks of 400 unknowns with a condition number of , with eigenvalues evenly spread, the energy stop delivers within a factor of three of the target on nine runs in ten, while the residual stop delivers something further from it by at least a factor of ten on most, and that there the step rule written in the delivered error reaches 180 of 198 after all. If so, the earlier prediction was right about large systems and wrong only about small ones.
A floor for the rule. The misses begin where the two-step factor stops being small. The prediction is that restricting the rule to targets whose measured first drop is below raises its count on these eighteen systems to at least 95 per cent of those runs, and that this domain can be read in advance from a single outer step, so that a code can state when to trust it.
What links here
Computed from the collection, not written here: the essays that point at this one.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A stopping test is a race — both name conjugate gradients, stopping criterion, tolerance
- An augmentation read in the smallest eigenvalue — both name block preconditioner, conjugate gradients, saddle-point systems
- The accuracy worth paying for — both name conjugate gradients, stopping criterion, tolerance
- The tolerance that buys no agreement — both name conjugate gradients, stopping criterion, tolerance
- A bound on the fall, not the error — both name conjugate gradients, stopping criterion
- A floor with a cliff at one — both name conjugate gradients, stopping criterion
Named objects
A flat tag is an object no other essay names yet.
Block preconditionerConjugate gradientsFinite terminationGMRESSaddle-point systemsStopping criterionTolerance