File tree 2 files changed +15
-5
lines changed
2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,10 @@ function SciMLBase.__init(
202
202
linesearch_ad = alg. forward_ad === nothing ?
203
203
(alg. reverse_ad === nothing ? alg. jacobian_ad :
204
204
alg. reverse_ad) : alg. forward_ad
205
+ if linesearch_ad != = nothing && iip && ! DI. check_inplace (linesearch_ad)
206
+ @warn " $(linesearch_ad) doesn't support in-place problems."
207
+ linesearch_ad = nothing
208
+ end
205
209
linesearch_ad = get_concrete_forward_ad (
206
210
linesearch_ad, prob, False; check_forward_mode = false )
207
211
linesearch_cache = init (
Original file line number Diff line number Diff line change 12
12
13
13
prob = NonlinearProblem (linear_f, u0)
14
14
15
- SOLVERS = (NewtonRaphson (), LevenbergMarquardt (; linsolve = QRFactorization ()),
16
- LevenbergMarquardt (; linsolve = KrylovJL_GMRES ()), PseudoTransient (),
17
- Klement (), Broyden (; linesearch = LiFukushimaLineSearch ()),
15
+ SOLVERS = (
16
+ NewtonRaphson (),
17
+ LevenbergMarquardt (; linsolve = QRFactorization ()),
18
+ LevenbergMarquardt (; linsolve = KrylovJL_GMRES ()),
19
+ PseudoTransient (),
20
+ Klement (),
21
+ Broyden (; linesearch = LiFukushimaLineSearch ()),
18
22
LimitedMemoryBroyden (; threshold = 2 , linesearch = LiFukushimaLineSearch ()),
19
- DFSane (), TrustRegion (; linsolve = QRFactorization ()),
23
+ DFSane (),
24
+ TrustRegion (; linsolve = QRFactorization ()),
20
25
TrustRegion (; linsolve = KrylovJL_GMRES (), concrete_jac = true ), # Needed if Zygote not loaded
21
- nothing )
26
+ nothing
27
+ )
22
28
23
29
@testset " [IIP] GPU Solvers" begin
24
30
for alg in SOLVERS
You can’t perform that action at this time.
0 commit comments