diff --git a/Project.toml b/Project.toml index 85392fd34..f7a8ad781 100644 --- a/Project.toml +++ b/Project.toml @@ -81,7 +81,7 @@ LeastSquaresOptim = "0.8.5" LineSearches = "7.2" LinearAlgebra = "1.10" LinearSolve = "2.30" -MINPACK = "=1.2" +MINPACK = "1.2" MaybeInplace = "0.1.3" ModelingToolkit = "9.15.0" NLSolvers = "0.5" diff --git a/lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl b/lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl index 8cb51a30f..669f74a08 100644 --- a/lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl +++ b/lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl @@ -117,8 +117,8 @@ function JacobianOperator(prob::AbstractNonlinearProblem, fu, u; jvp_autodiff = vjp_op = prepare_vjp(skip_vjp, prob, f, u, fu; autodiff = vjp_autodiff) jvp_op = prepare_jvp(skip_jvp, prob, f, u, fu; autodiff = jvp_autodiff) - output_cache = similar(fu, T) - input_cache = similar(u, T) + output_cache = fu isa Number ? T(fu) : similar(fu, T) + input_cache = u isa Number ? T(u) : similar(u, T) return JacobianOperator{iip, T}( JVP(), jvp_op, vjp_op, (length(fu), length(u)), output_cache, input_cache) diff --git a/src/NonlinearSolve.jl b/src/NonlinearSolve.jl index 416f98fb6..2e420a761 100644 --- a/src/NonlinearSolve.jl +++ b/src/NonlinearSolve.jl @@ -40,8 +40,8 @@ using Preferences: Preferences, @load_preference, @set_preferences! using RecursiveArrayTools: recursivecopy!, recursivefill! using SciMLBase: AbstractNonlinearAlgorithm, JacobianWrapper, AbstractNonlinearProblem, AbstractSciMLOperator, _unwrap_val, has_jac, isinplace, NLStats -using SciMLJacobianOperators: JacobianOperator, VecJacOperator, JacVecOperator, - StatefulJacobianOperator +using SciMLJacobianOperators: AbstractJacobianOperator, JacobianOperator, VecJacOperator, + JacVecOperator, StatefulJacobianOperator using SparseArrays: AbstractSparseMatrix, SparseMatrixCSC using SparseDiffTools: SparseDiffTools, AbstractSparsityDetection, ApproximateJacobianSparsity, JacPrototypeSparsityDetection, diff --git a/src/utils.jl b/src/utils.jl index 64399a349..1a4ffd2c8 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -48,6 +48,7 @@ end return deepcopy(x) end @inline __maybe_unaliased(x::AbstractNonlinearSolveOperator, alias::Bool) = x +@inline __maybe_unaliased(x::AbstractJacobianOperator, alias::Bool) = x @inline __cond(J::AbstractMatrix) = cond(J) @inline __cond(J::SVector) = __cond(Diagonal(MVector(J))) diff --git a/test/runtests.jl b/test/runtests.jl index a3d72552f..74676f3ad 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -10,8 +10,8 @@ const RETESTITEMS_NWORKER_THREADS = parse(Int, get(ENV, "RETESTITEMS_NWORKER_THREADS", string(max(Hwloc.num_virtual_cores() รท RETESTITEMS_NWORKERS, 1)))) -@info "Running tests for group: $LUXLIB_TEST_GROUP with $RETESTITEMS_NWORKERS workers" +@info "Running tests for group: $(GROUP) with $(RETESTITEMS_NWORKERS) workers" ReTestItems.runtests(NonlinearSolve; tags = (GROUP == "all" ? nothing : [Symbol(GROUP)]), - nworkers = RETESTITEMS_NWORKERS, - nworker_threads = RETESTITEMS_NWORKER_THREADS, testitem_timeout = 3600, retries=4) + nworkers = RETESTITEMS_NWORKERS, nworker_threads = RETESTITEMS_NWORKER_THREADS, + testitem_timeout = 3600, retries = 4)