jump-dev / HiGHS.jl

A Julia interface to the HiGHS solver
https://highs.dev
MIT License
103 stars 14 forks source link

Error when calling Highs_writeOptions #77

Closed GregPlowman closed 2 years ago

GregPlowman commented 2 years ago

From the intro docs,

To print the list of options supported by HiGHS, do:

using HiGHS
model = HiGHS.Optimizer()
Highs_writeOptions(model, "options.txt")
println(read("options.txt", String))

I get this error:

Julia-1.7.1> Highs_writeOptions(model, "options.txt")
ERROR: could not load symbol "Highs_writeOptions":
The specified procedure could not be found.
Stacktrace:
 [1] Highs_writeOptions(highs::HiGHS.Optimizer, filename::String)
   @ HiGHS C:\Users\plowman\.julia\packages\HiGHS\gxmTb\src\gen\libhighs_api.jl:120
 [2] top-level scope
   @ REPL[3]:1
odow commented 2 years ago

What is ] st? Works for me on macOS.

GregPlowman commented 2 years ago

Windows 10, Julia 1.7.1, HiGHS v0.3.0

I suspect it's a Windows issue.

  [7c4d4715] AmplNLWriter v0.8.0
  [7e558dbc] ArbNumerics v1.2.5
  [69666777] Arrow v2.2.0
  [fbb218c0] BSON v0.3.4
  [6e4b80f9] BenchmarkTools v1.2.2
  [336ed68f] CSV v0.9.11
  [9961bab8] Cbc v0.9.1
  [7a955b69] CircularArrays v1.3.0
  [39db22c5] ClipData v0.2.1
  [e2554f3b] Clp v0.9.1
  [5ae59095] Colors v0.12.8
  [861a8166] Combinatorics v1.0.2
  [534720e6] CompositeStructs v0.1.2
  [adafc99b] CpuId v0.3.0
  [a8cc5b0e] Crayons v4.1.0
  [a93c6f00] DataFrames v1.3.1
  [864edb3b] DataStructures v0.18.11
  [55939f99] DecFP v1.2.0
  [85a47980] Dictionaries v0.3.17
  [31c24e10] Distributions v0.25.37
  [497a8b3b] DoubleFloats v1.1.25
  [e2685f51] ECOS v0.14.0
  [e2ba6199] ExprTools v0.1.6
  [5789e2e9] FileIO v1.12.0
  [59287772] Formatting v0.4.2
  [60bf3e95] GLPK v0.15.2
  [4b11ee91] Gaston v1.0.4
  [86223c79] Graphs v1.4.1
  [f67ccb44] HDF5 v0.15.7
  [cd3eb016] HTTP v0.9.17
  [87dc4568] HiGHS v0.3.0
  [b6b21f68] Ipopt v0.9.1
  [c3a54625] JET v0.5.4
  [4138dd39] JLD v0.12.5
  [033835bb] JLD2 v0.4.17
  [9da8a3cd] JLSO v2.6.0
  [682c06a0] JSON v0.21.2
  [0f8b85d8] JSON3 v1.9.2
  [4076af6c] JuMP v0.22.1
  [aa1ae85d] JuliaInterpreter v0.9.0
  [2ddba703] Juniper v0.8.0
  [e5e0dc1b] Juno v0.8.4
  [5078a376] LazyArrays v0.22.4
  [33e6dc65] MKL v0.4.2
  [1914dd2f] MacroTools v0.5.9
  [b8f27783] MathOptInterface v0.10.7
  [bdf0d083] MultiFloats v1.0.3
  [76087f3c] NLopt v0.6.4
  [2774e3e8] NLsolve v4.5.1
  [be6f12e9] ODBC v1.0.4
  [6fe1bfb0] OffsetArrays v1.10.8
  [429524aa] Optim v1.6.0
  [d96e819e] Parameters v0.12.3
  [a83a3aaf] PkgVersionHelper v0.1.2
  [f27b6e38] Polynomials v2.0.22
  [08abe8d2] PrettyTables v1.3.1
  [27ebfcd6] Primes v0.5.1
  [92933f4c] ProgressMeter v1.7.1
  [5f89f4a4] PyFormattedStrings v0.1.10
  [be4d8f0f] Quadmath v0.5.5
  [97cc5700] RNGTest v1.5.1
  [e6cf234a] RandomNumbers v1.5.3
  [295af30f] Revise v3.3.1
  [82193955] SCIP v0.10.1
  [c35d69d1] SMTPClient v0.6.1
  [0aa819cd] SQLite v1.3.0
  [860ef19b] StableRNGs v1.0.0
  [90137ffa] StaticArrays v1.3.0
  [2913bbd2] StatsBase v0.33.14
  [bd369af6] Tables v1.6.1
  [1da6f4ae] Telegram v1.1.2
  [0c614874] TerminalPager v0.2.2
  [5e47fb64] TestImages v1.6.2
  [a759f4b9] TimerOutputs v0.5.13
  [07ecc579] ToggleableAsserts v0.1.0
  [28d57a85] Transducers v0.4.68
  [b8865327] UnicodePlots v2.5.1
  [fdbf4ff8] XLSX v0.7.8
odow commented 2 years ago

Does the rest of HiGHS work?

GregPlowman commented 2 years ago

Does the rest of HiGHS work?

Yes, AFAICT.

I was investigating HiGHS multi-threading (since multi-threading seems broken for Cbc on Windows) Wasn't sure whether optimizer_with_attributes(HiGHS.Optimizer, "highs_min_threads"=>8) was enough for parallel solve. Which then led me to investigate HiGHS options and this issue.

GregPlowman commented 2 years ago

I just noticed there was an update to HiGHS yesterday. Checked out HiGHS#master and now it works! (Sorry I didn't notice this earlier)

odow commented 2 years ago

Just tagged a new version

GregPlowman commented 2 years ago

Thanks! I can confirm that HiGHS v0.3.1 works.