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
compatibility with cplex 12.9 #27790
Comments
Commit: |
comment:1
This patch works with versions >= 12.8. However, we loose compatibility with versions < 12.8. To maintain compatibility, we must be able to import New commits:
|
comment:2
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
Replying to @videlec:
fixed
Not sure how to do that and where to put the code ( Somehow, we want to extract line |
comment:5
Replying to @dcoudert:
It would have been easier with an optional package and a proper
I don't think that can be done directly from Cython. Here is a suggestion (similar to what is done in PyNormaliz)
If you find an easier way to access the |
comment:6
An idea to make the process transparent to users is to set the version number in
|
comment:7
You can try the following (that works for normal extensions)
and the in the Cython code (with upper case)
Since both versions of the code only use the |
comment:8
This is roughly what I already tried: use
|
comment:9
try |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:11
I don't understand how I can use I pushed my current trial that is not working as can be seen from the patchbot. |
comment:12
line 240-241 of |
comment:13
outch... Well, either we are able to find a smart solution, or we could decide to support only cplex >= 12.8 (released Oct 2017). We already dropped support of older versions when the API introduced file |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
still not working :( |
comment:17
I'm more and more in favor of dropping support for cplex versions < 12.8. Indeed, we have an easy solution to support versions >= 12.8, but no simple, and more important working, solution for conditional compilation enabling to support < 12.8. |
comment:18
another argument for dropping support of version < 12.8: the IBM academic initiative allows to get versions 12.8 and 12.9, and no prior version. |
comment:20
I get the error below when I try to
|
comment:21
The current branch is not working. It's an unsuccessful trial to detect cplex version at compile time. I will push a new branch soon. |
Changed branch from public/numerical/27790_cplex_logfilename to public/linear_programming/27790_cplex |
Dependencies: #28382 |
comment:22
I pushed a new branch, built on top of 9.0.bet4 and #28382 (but not #28708, so corresponding doctests are still here). The changes are in file - # sets the log stream file
- int CPXsetlogfile (c_cpxlp * env, FILE * f)
+ # Set the log file
+ int CPXsetlogfilename(c_cpxenv * env, char * filename, char * mode) and in file - cdef FILE *ff
if name.lower() == "logfile":
if value is None: # Return logfile name
return self._logfilename
elif not value: # Close current logfile and disable logs
- check( CPXsetlogfile(self.env, NULL) )
+ check( CPXsetlogfilename(self.env, NULL, NULL) )
self._logfilename = ''
else: # Set log file to logfilename
- ff = fopen(str_to_bytes(value), "a")
- if not ff:
- raise ValueError("Unable to append file {}.".format(value))
- check( CPXsetlogfile(self.env, ff) )
+ check( CPXsetlogfilename(self.env, str_to_bytes(value), "a") )
self._logfilename = value The drawback of this branch is to loose compatibility with cplex versions prior to 12.8, but since it is more than 2 years old and that the current version is 12.9, this is certainly OK. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:24
Some updates to the thematic tutorial: license file no longer needed and make it clear that we drop support fo versions < 12.8 |
Reviewer: Sébastien Labbé |
comment:25
Works for me with both 12.8 and 12.9. I agree to drop support for versions < 12.8. |
comment:26
Thank you so much for the great help. I will finally be able to use cplex 12.9 without patch :)) |
comment:27
Great! I am sorry I took so long to come by and review your tickets. |
comment:28
Merge conflict |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:30
I fixed the merge conflicts with last beta. |
comment:32
Thanks ! |
Changed branch from public/linear_programming/27790_cplex to |
Method
CPXsetlogfile
has been deprecated in cplex 12.8 and removed from cplex 12.9. We must instead useCPXsetlogfilename
, introduced in 12.8.Depends on #28382
CC: @pfasante
Component: numerical
Author: David Coudert
Branch/Commit:
0881f5b
Reviewer: Sébastien Labbé
Issue created by migration from https://trac.sagemath.org/ticket/27790
The text was updated successfully, but these errors were encountered: