bug-glpk
[Top][All Lists]
Advanced

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

Re: [Bug-glpk] GLPK fails to solve


From: Andrew Makhorin
Subject: Re: [Bug-glpk] GLPK fails to solve
Date: Fri, 22 Aug 2014 06:21:31 +0400

The access violation error happens because of integer overflow on
computing density of the active submatrix. (It can happen only if the
number of rows in lp is greater than sqrt(2**31) ~= 46,000.)

To fix the bug please replace line 1354 in file
glpk-4.54/src/bflib/sgf.c:

         den = (double)nnz / (double)(na * na);

with the following one:

         den = (double)nnz / ((double)(na) * (double)(na));

> Indeed, it does look like you reproduced the bug, your exit code of
> C0000005 (hexadecimal) matches the exit code of -1073741819
> (decimal).  The one difference is that you failed after iteration
> 17000 and on my laptop it failed after iteration 46000.
> 
> [Is there a way to disable the dense phase in GLPSOL?]

Just comment out the following fragment (lines 1357-1365 in file
glpk-4.54/src/bflib/sgf.c):

#if 1 /* FIXME */
         if (na >= 5 && den >= 0.71)
         {
#ifdef GLP_DEBUG
            xprintf("na = %d; nnz = %d; den = %g\n", na, nnz, den);
#endif
            break;
         }
#endif

This, however, is not needed if you fix the bug.


Andrew Makhorin





reply via email to

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