Re: [Help-glpk] Thread safety of GLPK

2010-04-22 Thread Andrew Makhorin
> Pthread_getspecific and pthread_setspecific are part of the pthread > library. On Linux you probably need to specify -lpthread along with > other options passed to gcc and libtool. > So, um, where/how do I put that in? make LIBS=-lpthread ___ Help

Re: [Help-glpk] Thread safety of GLPK

2010-04-22 Thread Andrew Makhorin
> Let me put it more directly: > I replaced glpenv02.c with the version someone posted as being > thread-safe.  ./configure worked fine, but make yielded: > /bin/bash ../libtool --tag=CC   --mode=link gcc  -g -O2   -o glpsol > glpsol.o ../src/libglpk.la -lm -L/usr/include/ > libtool: link: gcc -

Re: [Help-glpk] Thread safety of GLPK

2010-04-22 Thread Louis Wasserman
Let me put it more directly: I replaced glpenv02.c with the version someone posted as being thread-safe.   ./configure worked fine, but make yielded: /bin/bash ../libtool --tag=CC   --mode=link gcc  -g -O2   -o glpsol glpsol.o ../src/libglpk.la -lm -L/usr/include/ libtool: link: gcc -g -O2

Re: [Help-glpk] Solving shortest path problem and getting wrong answer

2010-04-22 Thread Andrew Makhorin
> I'm trying to solve shortest path problem using glpsol and mps format. I > have it working correct with one example but I'm getting wrong results > with another one and I can't understand if there's something wrong with > my input or if it's glpsol that gives wrong output. > My directed graph is

[Help-glpk] Solving shortest path problem and getting wrong answer

2010-04-22 Thread Merike
Hi, I'm trying to solve shortest path problem using glpsol and mps format. I have it working correct with one example but I'm getting wrong results with another one and I can't understand if there's something wrong with my input or if it's glpsol that gives wrong output. My directed graph is

Re: [Help-glpk] glp_get_col_prim() problem

2010-04-22 Thread Andrew Makhorin
> OTOH, please excuse my ignorance, but assuming all > my variables are marked as binary in CPLEX LP file, do I really need to > call glp_intopt() after glp_simplex() even if glp_get_status(lp) == > GLP_OPT assertion holds? Yes. Glp_simplex solves lp relaxation, i.e. it considers all integer varia

Re: [Help-glpk] glp_get_col_prim() problem

2010-04-22 Thread Volkan YAZICI
Hi, On Thu, 22 Apr 2010, Andrew Makhorin writes: > Most likely your instance has multiple optima, so your program finds > one optimal solution while glpsol finds another. As you can see the > optimal objective value is the same in both cases. > > Note that to solve mip you need to call glp_simple

Re: [Help-glpk] glp_get_col_prim() problem

2010-04-22 Thread Andrew Makhorin
>> I'm having troubles while trying to get the solution variables via C >> API. Below is the code I use in my program: > >> return (int) glp_get_col_prim(lp, i); > > Please note that glp_get_col_prim returns a floating-point value, so > it would be better to write: > >return (int) (glp

Re: [Help-glpk] glp_get_col_prim() problem

2010-04-22 Thread Andrew Makhorin
> is there > any parallel implementation of GLPK? My other 23 cores are sitting > idle.] Currently not. > I'm having troubles while trying to get the solution variables via C > API. Below is the code I use in my program: > return (int) glp_get_col_prim(lp, i); Please note that glp_get_col

[Help-glpk] glp_get_col_prim() problem

2010-04-22 Thread Volkan YAZICI
Hi, [First, thanks Mr. Andrew Makhorin for such a fantastic tool. BTW, if you would need any relatively huge (~200MB) sample CPLEX LP problems to benchmark GLPK, I'd be happy to share our archives. Moreover, is there any parallel implementation of GLPK? My other 23 cores are sitting idle.] I'm ha