Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Stopping = "c4fe5a9e-e7fb-5c3d-89d5-7f405ab2214f"
StoppingInterface = "53949629-e8ff-437b-b6e7-14da1a85bf25"

[compat]
Krylov = "^0.8.2, 0.9"
LinearOperators = "1, 2"
NLPModels = "0.18, 0.19, 0.20, 0.21"
SolverCore = "0.2, 0.3"
SolverTools = "^0.8.8, 0.9"
SparseMatricesCOO = "0.1, 0.2"
Stopping = "0.6.4"
StoppingInterface = "0.3, 0.4, 0.5"
julia = "^1.10"
Krylov = "0.10"
LinearOperators = "2"
NLPModels = "0.21.5"
SolverCore = "0.3"
SolverTools = "0.9"
SparseMatricesCOO = "0.2.4"
Stopping = "0.6.5"
StoppingInterface = "0.5.4"
julia = "1.10"
14 changes: 7 additions & 7 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ SolverBenchmark = "581a75fa-a23a-52d0-a590-d6201de2218a"
SolverCore = "ff4d7338-4cf1-434d-91df-b86cb86fb843"

[compat]
ADNLPModels = "0.7"
CUTEst = "0.13"
ADNLPModels = "0.8"
CUTEst = "1.3.1"
DataFrames = "1"
Documenter = "0.27"
GR = "0.72"
JLD2 = "0.4"
JSOSolvers = "0.11"
Krylov = "0.9"
NLPModels = "0.20"
JSOSolvers = "0.14"
Krylov = "0.10"
NLPModels = "0.21"
NLPModelsIpopt = "0.10"
OptimizationProblems = "0.7"
OptimizationProblems = "0.9"
Plots = "1"
SolverBenchmark = "0.5"
SolverBenchmark = "0.6"
SolverCore = "0.3"
2 changes: 1 addition & 1 deletion docs/src/3-doityourself.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mutable struct PDataST{S,T} <: AdaptiveRegularization.TPData{T}
cgrtol # Relative tolerance for `cg_lanczos`

OK::Bool # Mandatory: preprocess success
solver::CgSolver # Memory pre-allocation for `cg_lanczos`
solver::CgWorkspace # Memory pre-allocation for `cg_lanczos`
end
```

Expand Down
3 changes: 2 additions & 1 deletion src/AdaptiveRegularization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ using Krylov, LinearOperators, NLPModels, SparseMatricesCOO, SolverCore, SolverT
# Stopping
using Stopping, StoppingInterface

using Krylov: Krylov, CgLanczosShiftSolver, CgSolver, CglsSolver, LsqrSolver, cg!, cg_lanczos_shift!
using Krylov: Krylov, cg!, cg_lanczos_shift!
using Krylov: CgLanczosShiftWorkspace, CgWorkspace, CglsWorkspace, LsqrWorkspace, krylov_solve!
using LinearAlgebra: LinearAlgebra, Symmetric, mul!, norm
using LinearOperators: LinearOperators, LinearOperator
using NLPModels:
Expand Down
2 changes: 1 addition & 1 deletion src/SolveModel/SolveModelNLSST_TR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function solve_model!(
cgrtol = PData.cgrtol(ζ, ξ, maxtol, mintol, norm_∇f)

solver = PData.solver
Krylov.solve!(
krylov_solve!(
solver,
Jx,
Fx,
Expand Down
18 changes: 9 additions & 9 deletions src/utils/pdata_struct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ mutable struct PDataKARC{S, T, Fatol, Frtol} <: PDataIter{T}
norm_dirs::Array{T, 1} # norms of xShifts
OK::Bool # preprocess success

solver::CgLanczosShiftSolver{T, T, S}
solver::CgLanczosShiftWorkspace{T, T, S}
end

function PDataKARC(
Expand All @@ -95,7 +95,7 @@ function PDataKARC(
end
norm_dirs = S(undef, nshifts)
OK = true
solver = CgLanczosShiftSolver(n, n, nshifts, S)
solver = CgLanczosShiftWorkspace(n, n, nshifts, S)
return PDataKARC(
d,
λ,
Expand Down Expand Up @@ -139,7 +139,7 @@ mutable struct PDataTRK{S, T, Fatol, Frtol} <: PDataIter{T}
norm_dirs::Array{T, 1} # norms of xShifts
OK::Bool # preprocess success

solver::CgLanczosShiftSolver{T, T, S}
solver::CgLanczosShiftWorkspace{T, T, S}
end

function PDataTRK(
Expand All @@ -166,7 +166,7 @@ function PDataTRK(
end
norm_dirs = S(undef, nshifts)
OK = true
solver = CgLanczosShiftSolver(n, n, nshifts, S)
solver = CgLanczosShiftWorkspace(n, n, nshifts, S)
return PDataTRK(
d,
λ,
Expand Down Expand Up @@ -202,7 +202,7 @@ mutable struct PDataST{S, T, Fatol, Frtol} <: PDataIter{T}
cgrtol::Frtol

OK::Bool # preprocess success
solver::CgSolver{T, T, S}
solver::CgWorkspace{T, T, S}
end

function PDataST(
Expand All @@ -220,7 +220,7 @@ function PDataST(
d = S(undef, n)
λ = zero(T)
OK = true
solver = CgSolver(n, n, S)
solver = CgWorkspace(n, n, S)
return PDataST(d, λ, ζ, ξ, maxtol, mintol, cgatol, cgrtol, OK, solver)
end

Expand All @@ -239,7 +239,7 @@ mutable struct PDataNLSST{S, T, Fatol, Frtol} <: PDataIterLS{T}
cgrtol::Frtol

OK::Bool # preprocess success
solver::Union{CglsSolver{T, T, S}, LsqrSolver{T, T, S}}
solver::Union{CglsWorkspace{T, T, S}, LsqrWorkspace{T, T, S}}
end

function PDataNLSST(
Expand All @@ -260,9 +260,9 @@ function PDataNLSST(
λ = zero(T)
OK = true
solver = if solver_method == :cgls
CglsSolver(m, n, S)
CglsWorkspace(m, n, S)
else
LsqrSolver(m, n, S)
LsqrWorkspace(m, n, S)
end
return PDataNLSST(d, λ, ζ, ξ, maxtol, mintol, cgatol, cgrtol, OK, solver)
end
6 changes: 3 additions & 3 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ADNLPModels = "0.8"
Krylov = "0.9"
Krylov = "0.10"
LinearOperators = "2"
NLPModels = "0.21"
NLPModelsTest = "0.10"
Expand All @@ -26,6 +26,6 @@ SolverCore = "0.3"
SolverTest = "0.3"
SolverTools = "0.9"
SparseMatricesCOO = "0.2"
Stopping = "0.6.4"
Stopping = "0.6"
StoppingInterface = "0.5"
julia = "^1.6"
julia = "^1.10"
Loading