Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CUTEst.jl v1.0.1 #31

Merged
merged 4 commits into from
Sep 27, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- x86
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ PRIMACUTEstExt = "CUTEst"
PRIMANLPModelsExt = "NLPModels"

[compat]
CUTEst = "0.13"
NLPModels = "0.20"
CUTEst = "1.0.1"
NLPModels = "0.21.3"
PRIMA_jll = "0.7.1"
Requires = "1"
TypeUtils = "0.3"
Expand Down
6 changes: 3 additions & 3 deletions ext/PRIMACUTEstExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ else
end

for func in (:uobyqa, :newuoa, :bobyqa, :lincoa, :cobyla, :prima)
@eval function PRIMA.$(Symbol(func,"_CUTEst"))(name::AbstractString; kwds...)
nlp = CUTEstModel(name)
@eval function PRIMA.$(Symbol(func,"_CUTEst"))(name::AbstractString; kwargs...)
nlp = CUTEstModel{Float64}(name)
try
return $func(nlp; kwds...)
return $func(nlp; kwargs...)
finally
finalize(nlp)
end
Expand Down
8 changes: 5 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using PRIMA
using Test, TypeUtils
Sys.WORD_SIZE > 32 && using CUTEst
if Sys.WORD_SIZE > 32 || Sys.iswindows()
Dismissed Show dismissed Hide dismissed
using CUTEst
end

optimizer_name(::typeof(PRIMA.uobyqa)) = "UOBYQA"
optimizer_name(::typeof(PRIMA.newuoa)) = "NEWUOA"
Expand Down Expand Up @@ -247,7 +249,7 @@ end
f2(x, cx) = f2(x)
n = 2
rhobeg = 1.0
rhoend = 1e-6
rhoend = 1e-5
ftarget = -Inf
maxfun = 3000n
npt = 2n + 1
Expand Down Expand Up @@ -381,7 +383,7 @@ end
end
end

if Sys.WORD_SIZE > 32
if Sys.WORD_SIZE > 32 || Sys.iswindows()
Dismissed Show dismissed Hide dismissed
@testset "Unconstrained CUTEst problem $name" for name in ("TOINTQOR", "OSBORNEB", "LANCZOS1LS",)
x1, res1 = @inferred PRIMA.prima_CUTEst(name; maxfun=5000)
@test issuccess(res1)
Expand Down
Loading