[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Add a hook for xassert

From: Andrew Makhorin
Subject: Re: [Help-glpk] Add a hook for xassert
Date: Fri, 4 Jul 2008 19:28:03 +0400

> I'm currently writing an interface between glpk and scilab (see
> My interface is working fine, but for some problems, glpk emits an 
> assert which made scilab to hangs.

> I have seen a preceding post where somebody adviced to catch the ABORT
> signal to avoid the hang.

> I think a better solution should be to add 2 hooks:
> - one to catch the assert message and allow to display this message in
> scilab (like the glp_term_hook)
> - one to customize the way we exit from glpk (like replacing the abort
> call by a Scierror(999,"Assertion triggered\n") in scilab).

> I think this should be useful because glpk still hangs on some problems
> (see the benchmark for LP at and 
> for MIP at

It is an issue. Xassert means the same as assert, i.e. if it is
invoked, something is going wrong, and a most relevant action in
this case is to abnormally terminate the program, because some glpk
data structures (as well as other memory data) may be damaged, and
further execution of the program may lead to unpredictable results.
You should think such error as segmentation failure.

As to catching the xassert message, you can use glp_term_hook;
all glpk terminal output goes through it.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]