-
Notifications
You must be signed in to change notification settings - Fork 3
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
Benchmark MOI #16
Comments
Hmmm ... okay, EnergyModels together with MOI is now on par with PyPSA, for solving a slightly modified Things to note
More detailed per-phase timings are at It's necessary to note that JuMP/MOI is still young and time/memory improvements are an active area of effort, for instance jump-dev/Gurobi.jl#216 (comment) is throwing out an intermediate layer between JuMP, MOI and Gurobi, showing memory reductions by 50%-85%. |
That is two runs for each, caching mode and direct mode, in EnergyModels.jl vs. one run of PyPSA right? |
Correct, I wanted to see the influence of the compiler as well, which adds some constant 180 - 200 secs to the first run. |
My intuition would have been that the direct mode is less memory intensive as the caching mode. Is there a specific reason to expect direct mode to consume more memory? |
That was my expectation as well. And also the case a few months ago, if the case presented in jump-dev/JuMP.jl#1905 is similar (see his slide on youtube for a better representation). But, then jump-dev/MathOptInterface.jl#696 improved how MOI models are transferred to the solvers using the bulk functions Well, all of that might change again with the Gurobi rewrite (jump-dev/Gurobi.jl#216 (comment)). Unfortunately, it is for MOI 0.9, which JuMP and quite a lot of other solvers is not compatible with yet, as one can track in jump-dev/MathOptInterface.jl#736. |
Sooo, I ported JuMP to MOI 0.9 (jump-dev/JuMP.jl#2003) to get the new Gurobi and then got rid of saving variable and constraint names (https://github.com/coroa/Gurobi.jl/tree/jh/moi09_wo_names), and voila already quite an improvement over PyPSA (now with the 128 buses pypsa-eur) Got another idea, i'll try tomorrow to see how far one can push this. |
great! |
If I rip out all data caches from Gurobi.jl (drop stored var/constr names branch:
|
Unnamed variables/constraints consume significantly less memory: #16
MOI's
direct
mode allows to skip the model copy in JuMP and instead hand all data through to Gurobi. Repeat the earlier benchmark to compare memory consumption to PyPSA.The text was updated successfully, but these errors were encountered: