Skip to content

Commit 9f0ad69

Browse files
Merge pull request #1511 from ChrisRackauckas-Claude/wrap-error-demonstrations-in-try-catch
Wrap error-demonstration sections in try/catch for clean builds
2 parents 1317c3f + 333febf commit 9f0ad69

6 files changed

Lines changed: 48 additions & 16 deletions

File tree

benchmarks/Bio/BCR.jmd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ Before proceeding to the results, we note the notable omissions. CVODE with KLU
157157
thus it is omitted from the results:
158158

159159
```julia
160-
solve(sparsejacprob, CVODE_BDF(linear_solver = :KLU), abstol = 1e-8, reltol = 1e-8);
160+
try
161+
solve(sparsejacprob, CVODE_BDF(linear_solver = :KLU), abstol = 1e-8, reltol = 1e-8);
162+
catch e
163+
println("CVODE_BDF with KLU failed: $e")
164+
end
161165
```
162166

163167
## Work-Precision Diagrams (CVODE and lsoda solvers)

benchmarks/ComplicatedPDE/Filament.jmd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,11 @@ early. It is thus removed from the next sections.
341341
The EPIRK methods currently do not work on this problem
342342

343343
```julia
344-
sol = solve(prob, EPIRK4s3B(autodiff = false), dt = 2^-3)
344+
try
345+
sol = solve(prob, EPIRK4s3B(autodiff = false), dt = 2^-3)
346+
catch e
347+
println("EPIRK4s3B failed: $e")
348+
end
345349
```
346350

347351
but would be called like:

benchmarks/StiffODE/Orego.jmd

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,23 @@ setups = [
8484
The EPIRK and exponential methods also fail:
8585

8686
```julia
87-
sol = solve(prob,EXPRB53s3(),dt=2.0^(-8));
88-
sol = solve(prob,EPIRK4s3B(),dt=2.0^(-8));
89-
sol = solve(prob,EPIRK5P2(),dt=2.0^(-8));
87+
for alg in [EXPRB53s3(), EPIRK4s3B(), EPIRK5P2()]
88+
try
89+
sol = solve(prob, alg, dt=2.0^(-8))
90+
catch e
91+
println("$(nameof(typeof(alg))) failed: $e")
92+
end
93+
end
9094
```
9195

9296
PDIRK44 also fails
9397

9498
```julia
95-
sol = solve(prob,PDIRK44(),dt=2.0^(-8));
99+
try
100+
sol = solve(prob,PDIRK44(),dt=2.0^(-8));
101+
catch e
102+
println("PDIRK44 failed: $e")
103+
end
96104
```
97105

98106
## High Tolerances

benchmarks/StiffODE/Pollution.jmd

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,13 @@ setups = [
245245
The EPIRK and exponential methods also fail:
246246

247247
```julia
248-
sol = solve(prob,EXPRB53s3(),dt=2.0^(-8));
249-
sol = solve(prob,EPIRK4s3B(),dt=2.0^(-8));
250-
sol = solve(prob,EPIRK5P2(),dt=2.0^(-8));
248+
for alg in [EXPRB53s3(), EPIRK4s3B(), EPIRK5P2()]
249+
try
250+
sol = solve(prob, alg, dt=2.0^(-8))
251+
catch e
252+
println("$(nameof(typeof(alg))) failed: $e")
253+
end
254+
end
251255
```
252256

253257

benchmarks/StiffODE/ROBER.jmd

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,23 @@ setups = [
9393
The EPIRK and exponential methods also fail:
9494

9595
```julia
96-
sol = solve(prob,EXPRB53s3(),dt=2.0^(-8));
97-
sol = solve(prob,EPIRK4s3B(),dt=2.0^(-8));
98-
sol = solve(prob,EPIRK5P2(),dt=2.0^(-8));
96+
for alg in [EXPRB53s3(), EPIRK4s3B(), EPIRK5P2()]
97+
try
98+
sol = solve(prob, alg, dt=2.0^(-8))
99+
catch e
100+
println("$(nameof(typeof(alg))) failed: $e")
101+
end
102+
end
99103
```
100104

101105
PDIRK44 also fails
102106

103107
```julia
104-
sol = solve(prob,PDIRK44(),dt=2.0^(-8));
108+
try
109+
sol = solve(prob,PDIRK44(),dt=2.0^(-8));
110+
catch e
111+
println("PDIRK44 failed: $e")
112+
end
105113
```
106114

107115
In fact, all non-adaptive methods fail on this problem.

benchmarks/StiffODE/VanDerPol.jmd

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@ setups = [
102102
The EPIRK and exponential methods also fail:
103103

104104
```julia
105-
sol = solve(prob,EXPRB53s3(),dt=2.0^(-8));
106-
sol = solve(prob,EPIRK4s3B(),dt=2.0^(-8));
107-
sol = solve(prob,EPIRK5P2(),dt=2.0^(-8));
105+
for alg in [EXPRB53s3(), EPIRK4s3B(), EPIRK5P2()]
106+
try
107+
sol = solve(prob, alg, dt=2.0^(-8))
108+
catch e
109+
println("$(nameof(typeof(alg))) failed: $e")
110+
end
111+
end
108112
```
109113

110114
## Low Order and High Tolerance

0 commit comments

Comments
 (0)