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

Fix 07 #179

Merged
merged 6 commits into from
Oct 10, 2018
Merged

Fix 07 #179

merged 6 commits into from
Oct 10, 2018

Conversation

matbesancon
Copy link
Contributor

Seemed like CPLEX.jl needs a refresh for 0.7, I fixed some things.
Things I couldn't get right:

  • The finalizer for Env needs to be redefined
  • One ccall is done incorrectly, yielding an error in the tests
  • importall is used, I haven't got through all places where importall-ed package are used

@mlubin
Copy link
Member

mlubin commented Aug 1, 2018

Thanks! We don't have CI set up so this is hard to test (I don't have a CPLEX license). Could you confirm that CPLEX passes tests on both 0.6 and 0.7 under this PR? We are not dropping 0.6 support yet.

src/CPLEX.jl Outdated
@@ -119,6 +120,8 @@ module CPLEX
try
eval(current_module(), Expr(:import,:JuMP))
include("JuMPfunctions.jl")
catch e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a whitespace mismatch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got tricked by a tab-space conversion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in last commit

@@ -1,4 +1,4 @@
using Base.Test
using Test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be Compat.Test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks fine with just "Test", it was suggested directly by the compiler

@@ -19,8 +19,8 @@ function setcallbackcut(cbdata::CallbackData, where::Cint, ind::Vector{Cint}, va
@assert length(val) == len
sns = convert(Cint, sense)
stat = @cpx_ccall(cutcallbackadd, Cint, (
Ptr{Void},
Ptr{Void},
Ptr{Nothing},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Cvoid instead of Nothing for void* types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in last commit

@matbesancon
Copy link
Contributor Author

As mentioned, there is still a ccall yielding an error and I could not track down where it's coming from

ERROR: LoadError: LoadError: syntax: ccall argument types must be a tuple; try "(T,)" and check if you specified a correct return type
Stacktrace:
 [1] include at ./boot.jl:317 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1034
 [3] include at ./sysimg.jl:29 [inlined]
 [4] include(::String) at /home/mathieu/.julia/dev/CPLEX/src/CPLEX.jl:3
 [5] top-level scope at none:0
 [6] include at ./boot.jl:317 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1034
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope at none:0
 [10] eval at ./boot.jl:319 [inlined]
 [11] eval(::Expr) at ./client.jl:394
 [12] top-level scope at ./none:3 [inlined]
 [13] top-level scope at ./<missing>:0
in expression starting at /home/mathieu/.julia/dev/CPLEX/src/cpx_solve.jl:1
in expression starting at /home/mathieu/.julia/dev/CPLEX/src/CPLEX.jl:112

@IssamT IssamT mentioned this pull request Sep 12, 2018
3 tasks
@mlubin mlubin merged commit eebd1ae into jump-dev:master Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants