@@ -52,17 +52,17 @@ include("default.jl")
52
52
53
53
include (" forward_diff.jl" )
54
54
55
- # @setup_workload begin
56
- # nonlinear_functions = (
57
- # (NonlinearFunction{false, NoSpecialize}((u, p) -> u .* u .- p), 0.1),
58
- # (NonlinearFunction{false, NoSpecialize}((u, p) -> u .* u .- p), [0.1]),
59
- # (NonlinearFunction{true, NoSpecialize}((du, u, p) -> du .= u .* u .- p), [0.1])
60
- # )
61
-
62
- # nonlinear_problems = NonlinearProblem[]
63
- # for (fn, u0) in nonlinear_functions
64
- # push!(nonlinear_problems, NonlinearProblem(fn, u0, 2.0))
65
- # end
55
+ @setup_workload begin
56
+ nonlinear_functions = (
57
+ (NonlinearFunction {false, NoSpecialize} ((u, p) -> u .* u .- p), 0.1 ),
58
+ (NonlinearFunction {false, NoSpecialize} ((u, p) -> u .* u .- p), [0.1 ]),
59
+ (NonlinearFunction {true, NoSpecialize} ((du, u, p) -> du .= u .* u .- p), [0.1 ])
60
+ )
61
+
62
+ nonlinear_problems = NonlinearProblem[]
63
+ for (fn, u0) in nonlinear_functions
64
+ push! (nonlinear_problems, NonlinearProblem (fn, u0, 2.0 ))
65
+ end
66
66
67
67
nonlinear_functions = (
68
68
(NonlinearFunction {false, NoSpecialize} ((u, p) -> (u .^ 2 .- p)[1 : 1 ]), [0.1 , 0.0 ]),
@@ -85,27 +85,25 @@ include("forward_diff.jl")
85
85
)
86
86
)
87
87
88
- # nlls_problems = NonlinearLeastSquaresProblem[]
89
- # for (fn, u0) in nonlinear_functions
90
- # push!(nlls_problems, NonlinearLeastSquaresProblem(fn, u0, 2.0))
91
- # end
92
-
93
- # @compile_workload begin
94
- # @sync begin
95
- # for prob in nonlinear_problems
96
- # Threads.@spawn CommonSolve.solve(
97
- # prob, nothing; abstol = 1e-2, verbose = true
98
- # )
99
- # end
100
-
101
- # for prob in nlls_problems
102
- # Threads.@spawn CommonSolve.solve(
103
- # prob, nothing; abstol = 1e-2, verbose = true
104
- # )
105
- # end
106
- # end
107
- # end
108
- # end
88
+ nlls_problems = NonlinearLeastSquaresProblem[]
89
+ for (fn, u0) in nonlinear_functions
90
+ push! (nlls_problems, NonlinearLeastSquaresProblem (fn, u0, 2.0 ))
91
+ end
92
+
93
+ @compile_workload begin
94
+ @sync begin
95
+ for prob in nonlinear_problems
96
+ Threads. @spawn CommonSolve. solve (
97
+ )
98
+ end
99
+
100
+ for prob in nlls_problems
101
+ Threads. @spawn CommonSolve. solve (
102
+ )
103
+ end
104
+ end
105
+ end
106
+ end
109
107
110
108
# Rexexports
111
109
@reexport using SciMLBase, NonlinearSolveBase, LineSearch, ADTypes
0 commit comments