Closed mlubin closed 8 years ago
Doesn't seem to be passing with Pajarito 0.1.0, but is passing on master, so I'll tag a new release soon.
All passing on travis now. @SteveDiamond, could you check if this works locally?
The C interface works for me. There are some issues with the Python cmpb interface that I fixed here:
https://github.com/SteveDiamond/cmpb
There are tests in python/test.py
. I have a weird bug where Pajarito works if I only run the int_constr
test, but the call to optimize! in int_constr
throws an error if I run all the tests.
Ok, I figured out the issue. Pajarito works when it's inside the first mpb_initialize
, mpb_atexit
block. But it doesn't work if there have been previous calls to mpb_initialize
then mpb_atexit
. Is this expected behavior? The other solvers work if there have been previous calls to mpb_initialize
then mpb_atexit
.
According to @yuyichao, it's not safe to use the julia environment for the rest of the program after the first call to atexit
. (It is safe though to initialize multiple times.)
That makes things a bit difficult in cvxpy, since I don't when the user is finished calling the Julia solvers. What would happen if I never called atexit
?
What about registering the atexit call with python, e.g., https://docs.python.org/2/library/atexit.html
As long as you free the model object you shouldn't need to worry about the memory footprint of the model hanging around, but I've seen some weird behavior if the program ends before calling julia's atexit
.
Ok, everything works now. I submitted a pull request and I have Pajarito working on the julia_opt branch of cvxpy.
CC @SteveDiamond Haven't tried from cvxpy yet, let's see if the C version passes travis.