From 76a531e143cb1ad413bd6ba2bc354bb0bbf84542 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Fri, 20 Oct 2023 10:51:44 +1100 Subject: [PATCH] Fix zeroAllClocks usage in earlier versions --- src/MOI_wrapper.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/MOI_wrapper.jl b/src/MOI_wrapper.jl index e6f04a5..89ad94b 100644 --- a/src/MOI_wrapper.jl +++ b/src/MOI_wrapper.jl @@ -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`