Skip to content

Commit

Permalink
solver: Make type resolution for results struct automatic
Browse files Browse the repository at this point in the history
  • Loading branch information
tmmsartor committed Jul 23, 2024
1 parent 57a49a3 commit e8a9761
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/MadNLP_C.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ subject to g2(x1,...,xN) == 0
using Logging
using Base

# using MadNLP
# using MadNLP: MadNLPExecutionStats
using NLPModels

using MadNLPMumps
Expand Down Expand Up @@ -595,7 +595,11 @@ Base.@ccallable function madnlp_c_solve(s::Ptr{MadnlpCSolver})::Cint
)

madnlp_solver = MadNLPSolver(nlp; print_level = madnlp_log, linear_solver = linear_solver)
res::Union{MadNLP.MadNLPExecutionStats{Float64, Vector{Float64}},Nothing} = nothing

# res::Union{MadNLPExecutionStats{Float64, CuArray{Float64}},MadNLPExecutionStats{Float64, Vector{Float64}},Nothing} = nothing;
# res::Union{MadNLPExecutionStats{Float64, CuArray{Float64}},MadNLPExecutionStats{Float64, Vector{Float64}},Nothing} = nothing;

local res
try
res = MadNLP.solve!(madnlp_solver, max_iter = Int(solver.max_iter), tol=solver.tol)
catch e
Expand Down

0 comments on commit e8a9761

Please sign in to comment.