IterativeSolvers: accept LinearSolve's maxiters spelling on the algorithm - #1196
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #175.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
maxiters, IterativeSolvers spells itmaxiter. Setting it on the algorithm, as the issue does withIterativeSolversJL_CG(maxiters = 100), forwarded an unknown keyword straight through and failed with aMethodError. The issue's own workaround was to drop thes.maxitersis now accepted as an alias on the algorithm. An explicitmaxiterwins if both are given, and the resolved value is threaded through every branch, includingidrs_iterable!andbicgstabl_iterator!which take the cap positionally, so an algorithm-level value actually takes effect instead of being quietly replaced by the cache's.maxiters = 2,5and25stop after exactly 2, 5 and 25 iterations,maxiter = 3is still honoured, and with both givenmaxiterwins.bicgstabl_iterator!caps work throughmax_mv_productsand has nomaxiterkeyword at all, so the normalized name reached a function that cannot accept it. It is stripped for that branch. Testing only the algorithm from the issue would have fixed four solvers and broken a fifth.IterativeSolversJL_*variants solve correctly, bare and withmaxiters, 10 of 10 combinations.maxiters, that the cap is respected, and themaxiterprecedence rule. The existing testset only ever passedgmres_restart, so it could not have caught this.GROUP=Coresuite passes with zero failures. Runic clean.AI Disclosure: Used Opus 5