[Top][All Lists]

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

[Help-glpk] Compiling GLPK for Java under Linux

From: Sylvain Fournier
Subject: [Help-glpk] Compiling GLPK for Java under Linux
Date: Tue, 23 Jun 2009 10:33:08 -0300


I am getting back to this subject because I am facing a small problem using GLPK both on Windows and Linux.
As I said in my previous e-mail, I managed to compile the library to use GLPK in java for Linux, and it works fine. However, I get a difference when running an instance under Windows on the one hand and on Linux on the other hand: it is the same optimal solution (same primal values for variables), but the basis is different, as well as the dual values of constraints and variables. It is a problem as I need to use these dual values in a Branch-and-Price algorithm to get new columns.
During my investigation, I saw a difference that might be linked to this behaviour: when printing the solution into a file (using glp_print_sol), the Karush-Kuhn-Tucker optimality conditions (at the end) don't provide exactly the same display. On the one hand (Linux), there are 2 digits for the powers of 10 (ex: 0.00e+00), and on the other hand (Windows), there are 3 (ex: 0.00e+000).
Could the problem I am facing be linked to a rounding problem? If so, how can I make the result identical for Windows and Linux?
If you need the model for which this problem occurs, feel free to ask.


2009/6/1 Sylvain Fournier <address@hidden>
I just tested it (only the target "all" of the Makefile), and it seems to work well. Many thanks Xypron!
I have to point out that I had to make small changes in the Makefile to make it work:
In the first call to libtool (gcc ... src/java/glpk_wrap.c), I had to add "-I$(PREFIX)/include" because I had some errors.
In the second call of libtool, I got the following error : "/usr/bin/ld: cannot find -lgmp"
So, I removed -lgmp, and it worked! Is this library really necessary? What is the use of the other (ltdl)?


Date: Sun, 31 May 2009 08:38:39 -0700 (PDT)
From: xypron <address@hidden>
Subject: [Help-glpk] Compiling GLPK for Java under Linux
To: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii

Hello Sylvain

Sylvain Fournier wrote:
> I then saw that there is a glpk_4_38_java library available (
> ... has the glpk_4_38_java.dll also been compiled under
> Linux as a .so?
I have created a Makefile and added a source code package

to the download page of GLPK for Windows .

Best regards


reply via email to

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