[Top][All Lists]

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

Re: [Bug-glpk] Message and LP file contents mixed together

From: Andrew Makhorin
Subject: Re: [Bug-glpk] Message and LP file contents mixed together
Date: Wed, 04 Dec 2013 12:56:58 +0400

Thank you for your bug report.

> We are recently using GLPK as a DLL, which is compiled under Visual
> Studio 2010 (Sorry I just made minor changes to export the API
> functions 

Did you use Build_GLPK_with_VC10_DLL.bat included in glpk/w32 ? If so,
you do not need to change the source code.

> and to make the message looks cleaner).
> We have tested quite a few problems without any bugs. But in one case,
> after solving a few problems using the simplex solver, the solver
> crashed due to memory corruption.

Most probably there is something wrong with your code. First of all I'd
suggest you not to change the glpk source code and use one of .bat
scripts included in glpk/w32 to build a dll. You also might use a
precompiled glpk binaries for MS Windows; see
http://winglpk.sourceforge.net/ . On compiling your code please make
sure that the import library (.lib) is consistent with the dll being

> I tried to write the problem to a file in LP format before
> optimization, but noticed that before the crash, some strange things
> happened. In some cases, I noticed part of the message was wrote to
> the LP file and obviously the LP file was incorrect (lost some
> contents and mixed with message from GLPK).

Which filename did you specify on a call to glp_write_lp ?

> As explained, I just cannot provide a test case as we call GLPK via a
> wrapper and our problems to be solved are constructed dynamically.
> Could you please have a look on this problem and let us know whether
> it is a bug in GLPK or we did something wrong when calling the GLPK
> functions. 

Most, most probably the latter. Please check your code.

Andrew Makhorin

reply via email to

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