Skip to content

Commit

Permalink
Fix zeroAllClocks usage in earlier versions (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Oct 20, 2023
1 parent 712e61d commit 43eec53
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1810,8 +1810,11 @@ function MOI.optimize!(model::Optimizer)
)
end
_set_variable_primal_start(model)
ret = Highs_zeroAllClocks(model)
_check_ret(ret)
if Highs_versionMajor() == 1 && Highs_versionMinor() >= 6
# Not available in earlier versions
ret = Highs_zeroAllClocks(model)
_check_ret(ret)
end
# if `Highs_run` implicitly uses memory or other resources owned by `model`, preserve it
GC.@preserve model begin
# allow Julia to GC while this thread is in `Highs_run`
Expand Down

0 comments on commit 43eec53

Please sign in to comment.