Skip to content

Commit e80aaae

Browse files
Drop KrylovPreconditioners test dependency (#1097)
Use a public LinearAlgebra diagonal inverse in the existing preconditioner and reuse tests so downgrade resolution no longer needs a package-specific exception. Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
1 parent 0496f13 commit e80aaae

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

.github/workflows/Downgrade.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ jobs:
1717
with:
1818
julia-version: "lts"
1919
group: "Core"
20-
# Resolver.jl cannot minimum-resolve KrylovPreconditioners' historical Arpack/LightGraphs graph.
21-
no_promote: "Mooncake,KrylovPreconditioners"
2220
secrets: "inherit"

Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ JacobiDavidson = "0.1"
151151
KernelAbstractions = "0.9.30"
152152
Krylov = "0.10"
153153
KrylovKit = "0.10"
154-
KrylovPreconditioners = "0.3"
155154
LAPACK_jll = "3"
156155
Libdl = "1.10"
157156
LinearAlgebra = "1.10"
@@ -214,7 +213,6 @@ InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
214213
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
215214
JacobiDavidson = "11c68b98-9c9b-11e8-267b-bbb95576cead"
216215
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
217-
KrylovPreconditioners = "45d422c2-293f-44ce-8315-2cb988662dec"
218216
MultiFloats = "bdf0d083-296b-4888-a5b6-7498122e68a5"
219217
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
220218
PureUMFPACK = "b7e1f0a2-3c4d-4e5f-9a0b-1c2d3e4f5a6b"
@@ -232,4 +230,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
232230
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
233231

234232
[targets]
235-
test = ["AlgebraicMultigrid", "Arpack", "ArnoldiMethod", "BandedMatrices", "BlockDiagonals", "CliqueTrees", "ComponentArrays", "FastAlmostBandedMatrices", "FastLapackInterface", "FiniteDiff", "FixedSizeArrays", "ForwardDiff", "InteractiveUtils", "IterativeSolvers", "JacobiDavidson", "KrylovKit", "KrylovPreconditioners", "MultiFloats", "Pkg", "PureUMFPACK", "Random", "RecursiveFactorization", "STRUMPACK_jll", "SafeTestsets", "SciMLTesting", "SparseArrays", "Sparspak", "SpecializingFactorizations", "StableRNGs", "StaticArrays", "Test", "Zygote"]
233+
test = ["AlgebraicMultigrid", "Arpack", "ArnoldiMethod", "BandedMatrices", "BlockDiagonals", "CliqueTrees", "ComponentArrays", "FastAlmostBandedMatrices", "FastLapackInterface", "FiniteDiff", "FixedSizeArrays", "ForwardDiff", "InteractiveUtils", "IterativeSolvers", "JacobiDavidson", "KrylovKit", "MultiFloats", "Pkg", "PureUMFPACK", "Random", "RecursiveFactorization", "STRUMPACK_jll", "SafeTestsets", "SciMLTesting", "SparseArrays", "Sparspak", "SpecializingFactorizations", "StableRNGs", "StaticArrays", "Test", "Zygote"]

test/Core/basictests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using LinearSolve, LinearAlgebra, SparseArrays, MultiFloats, ForwardDiff
22
using SciMLOperators: SciMLOperators, MatrixOperator, FunctionOperator, WOperator
33
using RecursiveFactorization, Sparspak, FastLapackInterface
4-
using IterativeSolvers, KrylovKit, MKL_jll, KrylovPreconditioners
4+
using IterativeSolvers, KrylovKit, MKL_jll
55
using Test
66
import CliqueTrees, Random
77

@@ -481,7 +481,7 @@ end
481481

482482
@testset "KrylovJL" begin
483483
kwargs = (; gmres_restart = 5)
484-
precs = (A, p = nothing) -> (BlockJacobiPreconditioner(A, 2), I)
484+
precs = (A, p = nothing) -> (Diagonal(inv.(diag(A))), I)
485485
algorithms = (
486486
("Default", KrylovJL(; kwargs...)),
487487
("CG", KrylovJL_CG(; kwargs...)),
@@ -507,7 +507,7 @@ end
507507

508508
function countingprecs(A, p = nothing)
509509
num_precs_calls += 1
510-
(BlockJacobiPreconditioner(A, 2), I)
510+
(Diagonal(inv.(diag(A))), I)
511511
end
512512

513513
n = 10

0 commit comments

Comments
 (0)