Skip to content

Commit

Permalink
remove precompile on v1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Oct 2, 2023
1 parent 72a95e5 commit 670a4bf
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions src/NonlinearSolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,26 @@ include("ad.jl")

import PrecompileTools

PrecompileTools.@compile_workload begin
for T in (Float32, Float64)
prob = NonlinearProblem{false}((u, p) -> u .* u .- p, T(0.1), T(2))

precompile_algs = if VERSION v"1.7"
(NewtonRaphson(), TrustRegion(), LevenbergMarquardt())
else
(NewtonRaphson(),)
end

for alg in precompile_algs
solve(prob, alg, abstol = T(1e-2))
end

prob = NonlinearProblem{true}((du, u, p) -> du[1] = u[1] * u[1] - p[1], T[0.1],
T[2])
for alg in precompile_algs
solve(prob, alg, abstol = T(1e-2))
@static if VERSION >= v"1.10"
PrecompileTools.@compile_workload begin
for T in (Float32, Float64)
prob = NonlinearProblem{false}((u, p) -> u .* u .- p, T(0.1), T(2))

precompile_algs = if VERSION v"1.7"
(NewtonRaphson(), TrustRegion(), LevenbergMarquardt())
else
(NewtonRaphson(),)
end

for alg in precompile_algs
solve(prob, alg, abstol = T(1e-2))
end

prob = NonlinearProblem{true}((du, u, p) -> du[1] = u[1] * u[1] - p[1], T[0.1],
T[2])
for alg in precompile_algs
solve(prob, alg, abstol = T(1e-2))
end
end
end
end
Expand Down

0 comments on commit 670a4bf

Please sign in to comment.