JuliaHomotopyContinuation / HomotopyContinuation.jl

A Julia package for solving systems of polynomials via homotopy continuation.
https://www.JuliaHomotopyContinuation.org
MIT License
185 stars 30 forks source link

Save and load compiled systems #411

Closed jaydu1 closed 4 years ago

jaydu1 commented 4 years ago

[New function request] Is it possible to save and load compiled systems? As for a large system, it may take much time to compile it every time we run the same code. It could help a lot if this is possible.

saschatimme commented 4 years ago

I would also love to have this, but unfortunately this is currently not possible in Julia. This is also my biggest pain point with the package, so you can be sure that I think about this a lot...

I guess the recommended thing to do is, to try to keep the Julia session running once the code is compiled. Packages like Revise.jl greatly help with that.

If the compile is substantially larger than the actual runtime you could try to use the compile = false option in solve which uses an evaluation method which doesn't compile the function.

Also with we run the same code do you mean the exactly same code or do your polynomial systems have hardcoded constants which change in between runs? If this is the case try to extract these into parameters.

jaydu1 commented 4 years ago

Thank you for your reply.

For we run the same code, I mean the polynomial systems with parameters. I would like to run the code with different random seeds for experiments, but due to the time limit of the cluster I use, I have to run the code multiple times (each with a different random seed). Then each time I have to compile the same system. So I am thinking if I could save some time from this.

Well, it is a great package though.