google-research / FirstOrderLp.jl

Experimental first-order solvers for linear and quadratic programming.
Apache License 2.0
103 stars 19 forks source link

Some LoadError #122

Open DoDoDoKun opened 5 months ago

DoDoDoKun commented 5 months ago

Hi, actually I want to test your FirstOrderLp in my PC. I use Julia 1.10.4, and follows steps until:

julia --project=scripts scripts/solve_qp.jl --instance_path test/trivial_lp_model.mps --iteration_limit 5000 --method pdhg --output_dir /tmp/first_order_lp_solve

While I meet error: LoadError: UndefVarError: Float not defined

I am wondering, instead of using the newest version of Julia 1.10.4, should I use an older version to solve this problem?

dapplegate commented 5 months ago

I was unable to reproduce the error you quoted. Were there any errors with the one-time package instantiation? That is, when you ran julia --project=scripts -e 'import Pkg; Pkg.instantiate();'?

There probably were errors. The Manifest files were generated for Julia 1.6, the format has changed since then, and for me, at least, the instantiation fails under Julia 1.10 (but doesn't result in "Float not defined").

To create an updated Manifest.toml for julia 1.10:

  1. Remove the old Manifest: rm scripts/Manifest.toml
  2. Re-add the FirstOrderLp dependency: julia --project=scripts -e 'import Pkg; Pkg.develop(path="../FirstOrderLp.jl");'
  3. Re-run package instantiation: julia --project=scripts -e 'import Pkg; Pkg.instantiate();'

Note that we changed this in the repository because we want the "main" version to reflect the code used in the paper.

If that doesn't resolve the problem, please include more details about the error (Julia usually dumps a stack trace for the error).