Closed 4er4er4er closed 1 year ago
Isn't the absence of NonConvex=2 an error in this case? I think we should print 'Error' and return failure exit code so scripts fail. Suggest as follows:
ampl: solve;
Gurobi 10.0.0: Error: Objective Q not PSD (negative diagonal entry). Set NonConvex=2 to solve model.
exit value 255
<BREAK>
I agree. When this message appears, you could be in either of these situations:
NonConvex=2
to confirm this understanding.Or maybe you are confused and need to think more about your model. But in any case, Gurobi is refusing to solve the problem, and should return an error condition.
Drivers updated.
The Gurobi MP interface has trouble with this nonconvex quadratic example:
With
option gurobi_options
commented out as shown, Gurobi is supposed to prompt the user to set an option, but the message reads more like a report of a crash:Also the message line is very long and (at least in some environments) only the first part is immediately visible. Perhaps it would be possible to remove
Error: Call failed: 'GRBoptimize(model())' with code 10020
andexit value 18446744073709551615 <BREAK>
so that the message's informational purpose clearer to the user.Also the message says
Set NonConvex parameter to 2 to solve model
but when a user followed this instruction by uncommentingoption gurobi_options "NonConvex=2";
in the above example, the option was rejected:To get a correct result, it's necessary to specify
option gurobi_options "nonconvex=2";
or else switch back to gurobiasl which is not case-sensitive for option names. Since we do not use case to distinguish options, the MP interface can be made case-insensitive for option names as well.