Opened 4 years ago

Last modified 4 years ago

#19525 closed enhancement

Improve GLPK error handling — at Version 13

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-7.2
Component: cython Keywords:
Cc: ncohen Merged in:
Authors: Jeroen Demeyer Reviewers:
Report Upstream: Fixed upstream, in a later stable release. Work issues:
Branch: u/jdemeyer/improve_glpk_error_handling (Commits) Commit: 18265ee99fd0165d87b30324e7d81ea54e0b7c47
Dependencies: #19527 Stopgaps:

Description (last modified by jdemeyer)

This ticket adds a proper error handler for GLPK (similar to what we already have for PARI, NTL, ...). It suffices to add sig_on()/sig_off() around a GLPK call to get an error message.

Some more cleanup is also done:

  1. change the implementation of MIPSolverException to just inherit from RuntimeError without any custom implementation.
  2. use MemoryAllocator in a few places to make some allocations safer.

This branch requires a patch to GLPK, a broken version of it was accepted upstream: http://lists.gnu.org/archive/html/help-glpk/2015-11/msg00008.html

Change History (13)

comment:1 Changed 4 years ago by jdemeyer

  • Dependencies set to #19527

comment:2 Changed 4 years ago by ncohen

  • Cc ncohen added

comment:3 Changed 4 years ago by jdemeyer

  • Branch set to u/jdemeyer/improve_glpk_error_handling

comment:4 Changed 4 years ago by git

  • Commit set to f808061d3d4cbaf2bd0cfe42f25fb67b5131a302

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

f808061Implement GLPK error handling

comment:5 Changed 4 years ago by jdemeyer

  • Report Upstream changed from N/A to Reported upstream. No feedback yet.
  • Status changed from new to needs_review

comment:6 Changed 4 years ago by jdemeyer

  • Description modified (diff)

comment:7 Changed 4 years ago by jdemeyer

  • Description modified (diff)

comment:8 Changed 4 years ago by git

  • Commit changed from f808061d3d4cbaf2bd0cfe42f25fb67b5131a302 to f31281897dcf292890a74aa39b83dd30a1913b56

Branch pushed to git repo; I updated commit sha1. New commits:

f312818Improve printing of solver exceptions

comment:9 Changed 4 years ago by jdemeyer

  • Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.

comment:10 Changed 4 years ago by git

  • Commit changed from f31281897dcf292890a74aa39b83dd30a1913b56 to 18265ee99fd0165d87b30324e7d81ea54e0b7c47

Branch pushed to git repo; I updated commit sha1. New commits:

18265eeRename glp_have_error -> glp_at_error

comment:11 Changed 4 years ago by jdemeyer

  • Report Upstream changed from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release.

comment:12 Changed 4 years ago by jdemeyer

  • Report Upstream changed from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.

comment:13 Changed 4 years ago by jdemeyer

  • Description modified (diff)
  • Report Upstream changed from Fixed upstream, in a later stable release. to Not yet reported upstream; Will do shortly.
Note: See TracTickets for help on using tickets.