I have updated Julia version to 1.0 and I have tried to find the new way to get the solve time reported by the solver, in my case Clp.
I have tried to use the fonction solve_time(model::Model) as described in documentation but I got the following error:

UndefVarError: solve_time not defined
top-level scope at Main.jl:2525

Other fonctions like numvar() and num_constraints() works well.

I have been using Julia 1.2.0 in Atom. The version of JuMP is â€ś0.19.2â€ť. I cannot updated JuMP because I have to use Clp solver that itâ€™s not available to newest versions.
My problem is a LP. I could get the number of variables and constraints easily but when I have tried to apply the function

Do you know how i could get the information about solve time in this version then ? I didnâ€™t find it in the documentationâ€¦I could alternatively use elapsed = time() - start
but if there is another option, it could be better.
Thanks.

I have done as suggested and I have tested in a huge LP problem, it takes about 3 hours to finish to solve but this function solve time indicates only 29.3 secondsâ€¦

function solve_time(model::Model)
return MOI.get(model, MOI.SolveTime())
end
solvetime = solve_time(model)

MOI.SolveTime only measures the time spent inside the solver. It does not measure the time JuMP spends building your model.

However, it shouldnâ€™t take 3 hours to build if it only takes 30 seconds to solve. Can you share more details about your problem? Which solver are you using? (Take a look at the log and check that the times make sense.) How are you building the model? How many variables/constraints etc?

I have also experienced a large slowdown in Clp model building in the JuMP 0.19 series (versus 0.18). There are already a few PRs for Clp and MathOptInterface that look like they might address performance in the future, so Iâ€™ve been waiting for those before trying to produce MWE and filing issues.

In the meantime, a simple workaround for me has been to use Cbc instead. Cbc still uses Clp for LPs, but has a different JuMP interface package that is much faster for building models in my experience.

The slow-down in the Clp wrapper is a known issue. It needs to be re-written from scratch for the latest version of MOI, and to remove LinQuadOptInterface, similar to recent rewrites of Gurobi and GLPK.

The underlying problem was that MOI changed considerably since the wrappers were first written, and the changes focused on correctness rather than performance. Now that MOI is stable, we can re-write to focus on performance.

I have switched to Cbc as suggested and I had a very expressive gain. My problem is solved now with Cbc in some seconds, instead of 3 hours with Clp. Thanks!