bug-glpk
[Top][All Lists]
Advanced

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

Re: [Bug-glpk] [Fwd: Bus error for MIP solver / Simplex solver]


From: Andrew Makhorin
Subject: Re: [Bug-glpk] [Fwd: Bus error for MIP solver / Simplex solver]
Date: Sat, 05 May 2012 11:40:57 +0400

Hello,

> Well, as nobody is able to find any solution, I tried couple of
> things, unsuccessfully. However, I have run the program once again
> with gdb to see where was the problem exactly, to dig a bit and to
> maybe figure out the problem. Once again, unsuccessfully. I copy/paste
> the debugger output here:
> 
> #0  0x00007ffff7486edc in getenv ()
> from /lib/x86_64-linux-gnu/libc.so.6
> #1  0x00007ffff74eca9e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> #2  0x00007ffff74ecf52 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> #3  0x00007ffff7b22b8c in glp_time () at glpenv06.c:60
> #4  0x00007ffff7b86c17 in init_csa (lp=<optimized out>, csa=<optimized
> out>)
>     at glpspx01.c:392
> #5  _glp_spx_primal (lp=<optimized out>, parm=<optimized out>)
>     at glpspx01.c:2590
> #6  0x00007ffff7b0163b in glp_simplex (P=0x6aec20,
> parm=0x7fffffffe0a0)
>     at glpapi06.c:452
> #7  0x00007ffff7b04a96 in preprocess_and_solve_mip
> (parm=0x7fffffffe4f0, 
>     P=0x604500) at glpapi09.c:371
> #8  glp_intopt (P=0x604500, parm=0x7fffffffe4f0) at glpapi09.c:593
> #9  0x0000000000400c69 in main () at glpk.cpp:44
> 
> at line 44, I have the following:
> 
> glp_intopt(mip, parm);
> 
> I have implemented a Java version of this program (linked to the java
> libglpk) and it is an exact copy of the C++ code. Weird thing is it
> works perfectly (I used the stand alone glpsol to check).
> 
> It somehow solve my problem for this case, but it would be good to
> know what is the issue with the c++ lib.

I calculate that this bug is not related to glpk. According to the
traceback you provided the exception occured in getenv which is called
indirectly from glp_time. Since glp_time calls only two libc functions
gettimeofday and gmtime, there is something wrong in the environment.

I'd suggest you to run an equivalent of the following program:

/* glpsol.c */

#include <glpk.h>

int main(int argc, const char *argv[])
{     /* stand-alone LP/MIP solver */
      return glp_main(argc, argv);
}

/* eof */

in the standard C environment you are using. If it works, please find
the bug in your code. Thanks.


Andrew Makhorin




reply via email to

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