Closed tlambert03 closed 1 year ago
That doesn't look like a segfault, I think this is just an unhandled exception of type std::runtime_error
. We could catch this kind of exception and turn it into a proper python exception to fail more gracefully.
That part is quite interesting: Set NonConvex parameter to 2 to solve model.
Can it be gurobi allows non-PSD matrices now? If so, then we should just set this magic parameter to 2 ;)
I agree, sorry, wrong term! I think I had seen a segfault when running a test that had included this ... but maybe I'm wrong there too :joy:
anyway, do you think it's as simple as always setting it? Or do we have to set it conditionally?
note to self, can avoid the crash by adding this to model.solve():
GRBenv* modelenv = GRBgetenv(_model);
GRB_CHECK(GRBsetintparam(modelenv, GRB_INT_PAR_NONCONVEX, 2));
(this requires a new header file, will PR when finished exploring)
037283ec7b0997ee2a452e174e15fd35f165e55d closes this issue by re-raising the exception in python...
adding support for GRB_INT_PAR_NONCONVEX
can be discussed in #28
the following script results in a ~segfault~ crash in the gurobi backend:
I have no doubt I've set something up that is impossible, non-convex, or something bad :) ... but it shouldn't segfault either way: