#20710: upgrade glpk to 4.60
-------------------------------------+-------------------------------------
Reporter: fbissey | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-7.3
Component: packages: | Resolution:
standard | Merged in:
Keywords: | Reviewers:
Authors: François Bissey | Work issues:
Report Upstream: N/A | Commit:
Branch: | b3efcbc8d4f8648d69563763a1f5b67db206457f
u/fbissey/glpk_4.60 | Stopgaps:
Dependencies: #20832 |
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
The default behaviour for GLPK when encountering an error is to print an
error message and then `abort()`. This printing of the error message is
done the same way as the usual printing of messages, for example with
verbose output. The printing can be customized with a hook function.
GLPK also has an error hook, which is called after printing the error
message. It can be used to do something else besides `abort()`. In the
case of Sage, this does a `longjmp()` through the `sig_on()` mechanism,
raising a Python exception.
In Sage, we want the usual messages to appear normally, but we want to
intercept the error messages and convert them to a Python exception. For
this to work, we need a way to detect whether we are handling an error or
not. I added a patch to GLPK to support this. It allows to checking
whether `env->err_file` is `NULL` or not. This `env->err_file` is set to
some non-NULL value when entering the error handler and is set back to
NULL after printing the error message, before the error hook.
The part which upstream did not accept was the setting back of
`env->err_file` to NULL because they don't want to officially support
error recovery. In upstream's view, once GLPK has encountered an error, it
is in an invalid state and there is no way to recover.
--
Ticket URL: <http://trac.sagemath.org/ticket/20710#comment:18>
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.