Skip to content
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

metapackage to install all solvers at once #1649

Closed
TeroFrondelius opened this issue Nov 27, 2018 · 5 comments
Closed

metapackage to install all solvers at once #1649

TeroFrondelius opened this issue Nov 27, 2018 · 5 comments

Comments

@TeroFrondelius
Copy link

TeroFrondelius commented Nov 27, 2018

As a newcomer, I feel frustrated when the examples don't work because something is missing from the installation. For me, DifferentialEquations.jl is a good example of the meta package which installs everything and end user doesn't have to worry anything just use the amazing features. I would propose something similar here. A one super JuMP package which will install everything and then all the examples just work.

I looked the other issues briefly if this has been already dealt somewhere, closest comes #1175, where it seems that this kind of super package is not in favor. I heard these same complaints from my team members when they went through the installation process. The JuMP is absolutely amazing but starting to use for it is not.

My current problem:

using JuMP, GLPK, LinearAlgebra
const MOI = JuMP.MathOptInterface

solver = GLPK.Optimizer

UndefVarError: MathOptInterface not defined

Stacktrace:
 [1] getproperty(::Module, ::Symbol) at .\sysimg.jl:13
 [2] top-level scope at In[12]:2
@blegat
Copy link
Member

blegat commented Nov 27, 2018

MathOptInterface is a dependency of JuMP so it is installed automatically. The issue you are getting is because you are using JuMP v0.18.x while the code you have written is for JuMP master.

@TeroFrondelius
Copy link
Author

TeroFrondelius commented Nov 27, 2018

@blegat thanks for the explanation. Actually, I also figured that out. Moving to the old version of the example, I have a new issue:

(v1.0) pkg> build Cbc
  Building LibCURL ─ `C:\Users\tfr004\.julia\packages\LibCURL\OoXMv\deps\build.log`
  Building WinRPM ── `C:\Users\tfr004\.julia\packages\WinRPM\Y9QdZ\deps\build.log`
  Building Homebrew  `C:\Users\tfr004\.julia\packages\Homebrew\l8kUw\deps\build.log`
  Building Cbc ───── `C:\Users\tfr004\.julia\packages\Cbc\YmHuC\deps\build.log`
┌ Error: Error building `Cbc`:
│
│ ERROR: The system cannot find the file specified.
│ C:\Users\tfr004\.julia\packages\WinRPM\Y9QdZ\cache\4\mingw64-libstdc%2B%2B6-7.2.0-1.56.noarch.cpio
│
│
│
│ System ERROR:
│ The system cannot find the file specified.
│ [ Info: Updating WinRPM package list
│ [ Info: Downloading http://ftp5.gwdg.de/pub/opensuse/repositories/windows:/mingw:/win32/openSUSE_Factory//repodata/repomd.xml
│ [ Info: Downloading http://ftp5.gwdg.de/pub/opensuse/repositories/windows:/mingw:/win64/openSUSE_Factory//repodata/repomd.xml
│ ┌ Info: Packages to install:
│ └   join(names(todo), ", ") = "libstdc++6, Cbc"
│ ┌ Info: Downloading:
│ └   name = "libstdc++6"
│ ┌ Info: Extracting:
│ └   name = "libstdc++6"
│ ERROR: LoadError: MethodError: no method matching pipeline_error(::Int64)
│ Closest candidates are:pipeline_error(!Matched::Base.ProcessChain) at process.jl:711pipeline_error(!Matched::Base.Process) at process.jl:704
│ Stacktrace:
│  [1] macro expansion at .\logging.jl:309 [inlined] (repeats 2 times)
│  [2] do_install(::WinRPM.Package) at C:\Users\tfr004\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:465
│  [3] do_install at C:\Users\tfr004\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:456 [inlined]
│  [4] macro expansion at .\logging.jl:320 [inlined]
│  [5] #install#19(::Bool, ::Function, ::WinRPM.Package) at C:\Users\tfr004\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:385
│  [6] #install at .\none:0 [inlined]
│  [7] #install#17 at C:\Users\tfr004\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:372 [inlined]
│  [8] #install at .\none:0 [inlined] (repeats 2 times)
│  [9] (::getfield(WinRPM, Symbol("##34#35")){WinRPM.RPM})() at C:\Users\tfr004\.julia\packages\WinRPM\Y9QdZ\src\winrpm_bindeps.jl:42
│  [10] run(::getfield(WinRPM, Symbol("##34#35")){WinRPM.RPM}) at C:\Users\tfr004\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:478
│  [11] macro expansion at .\logging.jl:308 [inlined]
│  [12] run(::BinDeps.SynchronousStepCollection) at C:\Users\tfr004\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:518
│  [13] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users\tfr004\.julia\packages\BinDeps\ZEval\src\dependencies.jl:944
│  [14] satisfy!(::BinDeps.LibraryDependency) at C:\Users\tfr004\.julia\packages\BinDeps\ZEval\src\dependencies.jl:922
│  [15] top-level scope at C:\Users\tfr004\.julia\packages\BinDeps\ZEval\src\dependencies.jl:977
│  [16] include at .\boot.jl:317 [inlined]
│  [17] include_relative(::Module, ::String) at .\loading.jl:1041
│  [18] include(::Module, ::String) at .\sysimg.jl:29
│  [19] include(::String) at .\client.jl:388
│  [20] top-level scope at none:0in expression starting at C:\Users\tfr004\.julia\packages\Cbc\YmHuC\deps\build.jl:64
│
│ 7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
│
│ Scanning the drive for archives:
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1069

(v1.0) pkg>

Which partly answers my proposal, binary dependencies are still relatively hard to handle for each operating systems. Any help is really appreciated.

Actually also a recommendation would be very helpful. I am trying to sort vector of coordinates in the way that depency graph connections would became shortest. What would be a good (even inefficient) solver for this kind of discrete optimization. (I hoped to have MWE before asking this at the discourse, but I have installation challenges.)

@blegat
Copy link
Member

blegat commented Nov 27, 2018

I have a new issue

See jump-dev/Cbc.jl#56

Which partly answers my proposal, binary dependencies are still relatively hard to handle for each operating systems. Any help is really appreciated.

Yes this is a relevant reason why having a metapackage that should install many solvers as the installation of some solvers need the user intervention for some OS setup.

I am trying to sort vector of coordinates in the way that depency graph connections would became shortest

Can't you just do a toposort: https://en.wikipedia.org/wiki/Topological_sorting, I guess this is implemented in LightGraphs. We can continue this discussion on discourse.

@odow
Copy link
Member

odow commented Nov 27, 2018

Given the binary dependency issue, I can't see JuMP coming installed with all of the solvers. It is a shame that there is friction on-boarding new users, but the entire Julia ecosystem has this issue. There is also this error message which explains what to do:

julia> using SCS
ERROR: ArgumentError: Package SCS not found in current path:
- Run `import Pkg; Pkg.add("SCS")` to install the SCS package.

This is really a doc/user education issue.

@TeroFrondelius from the perspective of a new user, do you have any comments on how the installation docs could be improved? http://www.juliaopt.org/JuMP.jl/latest/installation/

@TeroFrondelius
Copy link
Author

@odow my main mistake was looking the example from the master version and try to use with the latest released version. Thus there was a major frustration because it felt that nothing helped. I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants