#19523: Adding constraints for the wrong MILP crashes Sage
--------------------------------------+-------------------------
       Reporter:  jdemeyer            |        Owner:
           Type:  defect              |       Status:  new
       Priority:  major               |    Milestone:  sage-6.10
      Component:  linear programming  |   Resolution:
       Keywords:                      |    Merged in:
        Authors:                      |    Reviewers:
Report Upstream:  N/A                 |  Work issues:
         Branch:                      |       Commit:
   Dependencies:  #19525, #20360      |     Stopgaps:
--------------------------------------+-------------------------
Changes (by mkoeppe):

 * dependencies:  #19525 => #19525, #20360


Old description:

> {{{
> sage: p = MixedIntegerLinearProgram(solver="glpk")
> sage: q = MixedIntegerLinearProgram(solver="glpk")
> sage: q.add_constraint(p[0] <= 1)
> ------------------------------------------------------------------------
> Unhandled SIGABRT: An abort() occurred in Sage.
> This probably occurred because a *compiled* component of Sage has a bug
> in it and is not properly wrapped with sig_on(), sig_off().
> Sage will now terminate.
> ------------------------------------------------------------------------
> }}}
>
> With #19525, this improves to not crashing Sage:
> {{{
> sage: sage: p = MixedIntegerLinearProgram(solver="glpk")
> sage: sage: q = MixedIntegerLinearProgram(solver="glpk")
> sage: sage: q.add_constraint(p[0] <= 1)
> ---------------------------------------------------------------------------
> GLPKError                                 Traceback (most recent call
> last)
> ...
> GLPKError: glp_set_mat_row: i = 1; len = 1; invalid row length
> Error detected in file glpapi01.c at line 760
> }}}
> This ticket is to actually fix the error completely or give a better
> error message.
>
> Also a crash with the COIN backend.
>
> And low-level error message with the PPL and InteractiveLP (#20296 )
> backends.
>
> The CVX backend silently adds a new variable that is accessible only to
> the backend:.
> {{{
> sage: sage: default_mip_solver("cvxopt")
> sage: sage: p = MixedIntegerLinearProgram()
> sage: sage: q = MixedIntegerLinearProgram()
> sage: sage: q.add_constraint(p[0] <= 1)
> sage: q.number_of_variables()
> 1
> }}}

New description:

 {{{
 sage: p = MixedIntegerLinearProgram(solver="glpk")
 sage: q = MixedIntegerLinearProgram(solver="glpk")
 sage: q.add_constraint(p[0] <= 1)
 ------------------------------------------------------------------------
 Unhandled SIGABRT: An abort() occurred in Sage.
 This probably occurred because a *compiled* component of Sage has a bug
 in it and is not properly wrapped with sig_on(), sig_off().
 Sage will now terminate.
 ------------------------------------------------------------------------
 }}}

 With #19525, this improves to not crashing Sage:
 {{{
 sage: sage: p = MixedIntegerLinearProgram(solver="glpk")
 sage: sage: q = MixedIntegerLinearProgram(solver="glpk")
 sage: sage: q.add_constraint(p[0] <= 1)
 ---------------------------------------------------------------------------
 GLPKError                                 Traceback (most recent call
 last)
 ...
 GLPKError: glp_set_mat_row: i = 1; len = 1; invalid row length
 Error detected in file glpapi01.c at line 760
 }}}
 This ticket is to actually fix the error completely or give a better error
 message.

 Also a crash with the COIN backend (#20360).

 And low-level error message with the PPL and InteractiveLP (#20296 )
 backends.

 The CVX backend silently adds a new variable that is accessible only to
 the backend:.
 {{{
 sage: sage: default_mip_solver("cvxopt")
 sage: sage: p = MixedIntegerLinearProgram()
 sage: sage: q = MixedIntegerLinearProgram()
 sage: sage: q.add_constraint(p[0] <= 1)
 sage: q.number_of_variables()
 1
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/19523#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to