-
Notifications
You must be signed in to change notification settings - Fork 81
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
Some more fixes for Julia 1.0 #150
Conversation
deps/build.jl
Outdated
@@ -1,4 +1,7 @@ | |||
using Compat | |||
@static if VERSION >= v"0.7" | |||
using Libdl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need 4-spaces indent
Can you confirm that the tests pass, and that these are the only imports required from MathProgBase? |
No, I have to update and add some more MathProgBase imports. Thanks for the hint and sorry for my sloppiness! I can update the PR later today. |
@daschw The cleanest way is to do what is done in jump-dev/Ipopt.jl#127, i.e. defining an |
Here's the output of running the tests locally with this branch: _
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.0 (2018-08-08)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> cd(joinpath(homedir(), ".julia", "dev", "Gurobi"))
shell> git branch
* fix1.0
master
(v1.0) pkg> test Gurobi
Testing Gurobi
Resolving package versions...
Status `C:\Users\Daniel\AppData\Local\Temp\jl_6905.tmp\Manifest.toml`
[34da2185] Compat v1.1.0
[2e9cd046] Gurobi v0.5.0+ [`C:\Users\Daniel\.julia\dev\Gurobi`]
[f8899e07] LinQuadOptInterface v0.3.0
[b8f27783] MathOptInterface v0.5.1
[fdba3010] MathProgBase v0.7.3
[2a0f44e3] Base64 [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Base64`]
[ade2ca70] Dates [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Dates`]
[8bb1440f] DelimitedFiles [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\DelimitedFiles`]
[8ba89e20] Distributed [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Distributed`]
[b77e0a4c] InteractiveUtils [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\InteractiveUtils`]
[76f85450] LibGit2 [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\LibGit2`]
[8f399da3] Libdl [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Libdl`]
[37e2e46d] LinearAlgebra [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\LinearAlgebra`]
[56ddb016] Logging [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Logging`]
[d6f4376e] Markdown [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Markdown`]
[a63ad114] Mmap [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Mmap`]
[44cfe95a] Pkg [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Pkg`]
[de0858da] Printf [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Printf`]
[3fa0cd96] REPL [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\REPL`]
[9a3f8284] Random [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Random`]
[ea8e919c] SHA [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\SHA`]
[9e88b42a] Serialization [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Serialization`]
[1a1011a3] SharedArrays [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\SharedArrays`]
[6462fe0b] Sockets [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Sockets`]
[2f01184e] SparseArrays [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\SparseArrays`]
[10745b16] Statistics [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Statistics`]
[8dfed614] Test [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Test`]
[cf7118a7] UUIDs [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\UUIDs`]
[4ec0a83e] Unicode [`C:\Users\Daniel\AppData\Local\Julia-1.0.0\bin\..\share\julia\stdlib\v1.0\Unicode`]
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Test Summary: | Pass Total
C API | 19 19
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\Daniel\.julia\packages\MathProgBase\gj15W\src\HighLevelInterface\HighLevelInterface.jl:9
Academic license - for non-commercial use only
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\Daniel\.julia\packages\MathProgBase\gj15W\src\HighLevelInterface\HighLevelInterface.jl:9
Academic license - for non-commercial use only
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\Daniel\.julia\packages\MathProgBase\gj15W\src\HighLevelInterface\HighLevelInterface.jl:9
Academic license - for non-commercial use only
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\Daniel\.julia\packages\MathProgBase\gj15W\src\HighLevelInterface\HighLevelInterface.jl:9
Academic license - for non-commercial use only
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\Daniel\.julia\packages\MathProgBase\gj15W\src\HighLevelInterface\HighLevelInterface.jl:9
Academic license - for non-commercial use only
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\Daniel\.julia\packages\MathProgBase\gj15W\src\HighLevelInterface\HighLevelInterface.jl:9
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
┌ Warning: Julia Gurobi interface doesn't properly support range (two-sided) constraints. See Gurobi.jl issue #14
└ @ Gurobi C:\Users\Daniel\.julia\dev\Gurobi\src\MPBWrapper.jl:146
Academic license - for non-commercial use only
Read MPS format model from file C:\Users\Daniel\.julia\dev\Gurobi\test\MathProgBase\test_get_strarray.mps
Reading time = 0.00 seconds
TESTPROB: 3 rows, 3 columns, 6 nonzeros
Academic license - for non-commercial use only
┌ Warning: Gurobi will silently silently truncate objective coefficients >1.0e100 or <-1.0e100. Current objective coefficient extrema: (1.1e100, 1.1e100)
└ @ Gurobi C:\Users\Daniel\.julia\dev\Gurobi\src\grb_common.jl:84
Academic license - for non-commercial use only
┌ Warning: Gurobi will silently silently truncate objective coefficients >1.0e100 or <-1.0e100. Current objective coefficient extrema: (-1.1e100, -1.1e100)
└ @ Gurobi C:\Users\Daniel\.julia\dev\Gurobi\src\grb_common.jl:84
Academic license - for non-commercial use only
┌ Warning: Gurobi has implicit variable bounds of [-1e30, 1e30]. Settings variable bounds outside this can cause infeasibility or unboundedness. Current lower bound extrema: (1.1e30, 1.1e30). Current upper bound extrema: (Inf, Inf)
└ @ Gurobi C:\Users\Daniel\.julia\dev\Gurobi\src\grb_common.jl:88
Academic license - for non-commercial use only
┌ Warning: Gurobi has implicit variable bounds of [-1e30, 1e30]. Settings variable bounds outside this can cause infeasibility or unboundedness. Current lower bound extrema: (-Inf, -Inf). Current upper bound extrema: (-1.1e30, -1.1e30)
└ @ Gurobi C:\Users\Daniel\.julia\dev\Gurobi\src\grb_common.jl:88
Academic license - for non-commercial use only
┌ Warning: Gurobi has implicit variable bounds of [-1e30, 1e30]. Settings variable bounds outside this can cause infeasibility or unboundedness. Current lower bound extrema: (-1.1e30, -1.1e30). Current upper bound extrema: (Inf, Inf)
└ @ Gurobi C:\Users\Daniel\.julia\dev\Gurobi\src\grb_common.jl:88
Academic license - for non-commercial use only
┌ Warning: Gurobi has implicit variable bounds of [-1e30, 1e30]. Settings variable bounds outside this can cause infeasibility or unboundedness. Current lower bound extrema: (-Inf, -Inf). Current upper bound extrema: (1.1e30, 1.1e30)
└ @ Gurobi C:\Users\Daniel\.julia\dev\Gurobi\src\grb_common.jl:88
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Test Summary: | Pass Total
MathProgBase Tests | 240 240
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
┌ Warning: Constant in scalar function moved into set.
└ @ LinQuadOptInterface C:\Users\Daniel\.julia\packages\LinQuadOptInterface\u4wTU\src\constraints\scalaraffine.jl:44
┌ Warning: Constant in scalar function moved into set.
└ @ LinQuadOptInterface C:\Users\Daniel\.julia\packages\LinQuadOptInterface\u4wTU\src\constraints\scalaraffine.jl:44
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Academic license - for non-commercial use only
Test Summary: | Pass Total
MathOptInterface Tests | 2117 2117
Testing Gurobi tests passed |
For me (old version of Gurobi) on line 351 you need to qualify |
Thanks a lot @ExpandingMan, I missed that on 1.0. |
Note also that on Julia 1.0 and JuMP 0.18 (yes, it works now if you check out |
@ExpandingMan is it compile time or run time ? What happens in the second run ? We have similar issues with JuliaPolyhedra/Polyhedra.jl#110 |
It definitely appears to be run-time as it happens in the middle of the execution of a function, though of course in Julia I'm never 100% certain that nothing is compiling. |
If you execute this function twice with the same arguments, you know that the second time, nothing is compiling. |
Nope, it's definitely all run-time, compile time seems just fine. That's actually a huge relief because that means it fixable. |
Can you run the profiler and get a sense of what part is slow? |
What profiler do you use? I'm not aware of any good ones. I do know the slowness occurs in |
You can use https://github.com/timholy/ProfileView.jl |
That package doesn't look maintained and surely will not work on 1.0. The regression only seems to be on 1.0, and probably only with |
Yes, the issue should be moved to another thread. Note that ProfileView is maintainted and is being update to Julia v1.0: timholy/ProfileView.jl#96 |
@ExpandingMan you can also store a profile using the built-in Profile and then load it with ProfileView on 0.6: https://github.com/timholy/ProfileView.jl#saving-profile-data-manually Juno also has a built-in profile viewer: http://docs.junolab.org/latest/man/juno_frontend.html#Profiler-1 |
No description provided.