Skip to content

Commit

Permalink
test: more test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Sep 23, 2024
1 parent 088d65c commit cc93129
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/NonlinearSolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit cc93129

Please sign in to comment.