Skip to content

Commit 50c1134

Browse files
committed
add tests for large sparse jacobians
1 parent d73e1e1 commit 50c1134

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using Test, OrdinaryDiffEq, LinearSolve, ADTypes, ForwardDiff, SparseConnectivityTracer, SparseMatrixColorings
1+
using Test, OrdinaryDiffEq, LinearSolve, ADTypes, ForwardDiff, SparseConnectivityTracer,
2+
SparseMatrixColorings
23
import ODEProblemLibrary: prob_ode_2Dlinear
3-
44

55
ad = AutoSparse(AutoForwardDiff(), sparsity_detector = TracerSparsityDetector(),
66
coloring_algorithm = GreedyColoringAlgorithm())
@@ -9,5 +9,12 @@ prob = prob_ode_2Dlinear
99

1010
@test_nowarn solve(prob, Rodas5(autodiff = ad))
1111

12-
@test_nowarn solve(prob, Rodas5(autodiff = ad, linsolve = LinearSolve.KrylovJL()))
12+
@test_nowarn solve(prob, Rodas5(autodiff = ad, linsolve = LinearSolve.KrylovJL_GMRES()))
1313

14+
# Test that no dense matrices are made sparse
15+
diag_prob = ODEProblem((du, u, p, t) -> 1.0 .* u, rand(Int(1e7)), (0, 100.0))
16+
17+
@test_nowarn solve(diag_prob, Rodas5P(autodiff = ad))
18+
19+
@test_nowarn solve(
20+
diag_prob, Rodas5P(autodiff = ad, linsolve = LinearSolve.KrylovJL_GMRES()))

0 commit comments

Comments
 (0)