Stopping test — the series
-
A stopping test is a race
One matrix, one right-hand side, one tolerance, thirteen partition counts — and eleven different iteration counts between 674 and 690. Every run converged, every answer is right to the accuracy asked for, and what differs is the bill.
-
The tolerance that buys no agreement
Ask for four more orders of accuracy and you get them — the answers improve by a factor of 1.5 million. The ratio between the best and the worst run is 1.34, 1.48, 1.71 and 1.17 across the same sweep. The band falls and it does not close.
-
The reading that never moves
Across thirty runs — five grids from 36 to 196 unknowns, six working precisions from 53 significand bits down to 8 — the residual conjugate gradients stops on stays between 1.10·10⁻¹³ and 9.95·10⁻¹³. Over the same thirty runs the error of the answer spans a factor of 2.39·10¹¹, and the step count more than doubles. The one number the run publishes is the only one that responds to neither axis.
-
The honest residual is not a stopping test
A conjugate-gradient run in reduced working precision reports a residual pinned near 10⁻¹² while its error spans eleven orders, and the repair was to recompute the residual in double. As a report it works: on thirty runs it lands within a factor of a quarter to five of the error. As the thing to stop on it fails outright: below 53 bits it is passed on none of twenty-five runs, which go on to the 300-step cap or until their own recurrence collapses — 7,694 products in all against 605. One clause fixes it. Stop also when two checks in a row fail to halve the double residual, and every run ends within thirty-six products, at the same error, reporting a number that means something — and at 8 and 11 bits on the larger grids, sooner than the recurrence's own test.
-
Five steps is a rate
A stagnation clause that checks the true residual every five steps, and stops when two checks in a row fail to halve it, stopped every reduced-precision conjugate-gradient run at the error it could reach. The worry was that five steps is a property of one fast problem, and the prediction was that on the unpreconditioned Laplacian, several times slower, it would stop some runs early. It does not: unpreconditioned conjugate gradients still halves its residual every five steps on these grids, and the clause stops all twenty runs within a tenth of the least error. Scale the same Laplacian's rows by a decade and a half and it stops nineteen of twenty at step fifteen, up to 775,000 times the attainable error. A clause that sets each interval from the reduction it last saw stops every run of all three kinds within two fifths of it — and on the fast runs pays for that with eight to twelve times as many steps past the best.
-
A floor the error has not reached
The residual a reduced-precision conjugate-gradient run stops on, recomputed in double, has a floor, and the floor can be predicted: on sixty runs of three problems it sits within a factor of 3.3 of a constant times u·‖|A||x|‖/‖b‖. The prediction was that the unit roundoff and the grid would be enough. They are not — adding the grid's size or κ(A) makes the prediction worse than u alone — and the quantity that works reads the solution. Nor is the floor a signal to stop. When the residual first comes within four times its own floor, the error is still a median 4.6 to 12.6 times its least, and on the slowest problem the least error arrives a median 76 steps later. A clause that stops there stops some run of every problem at three times its least error or more. What the floor can do is tell a run when to start checking often: switching to five-step checks within four times it keeps the error within a tenth of its least on both Laplacian problems and cuts the rate-set clause's overrun from 1,661 steps to 198.