bug-glpk
[Top][All Lists]
Advanced

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

[Bug-glpk] Re: Reentrant glpk with JNI


From: Andrew Makhorin
Subject: [Bug-glpk] Re: Reentrant glpk with JNI
Date: Wed, 12 Nov 2003 03:14:04 +0300

>I need a reentrant version of glpk. I need to call it from Java on
> linux and possibly
>win32 platforms. 
>I did see the thread at
> http://mail.gnu.org/archive/html/help-glpk/2003-10/msg00001.html
>It looks like reentrancy was not included in glpk 4.1. Is the best way
> to make it
>reentrant currently to use Joonas' patch 4 at
> http://www.hut.fi/~jkekoni/glpk-t/  ?
>I dont need the file routines to be reentrant. 
>Are there any gotchas with using this patched version with Java?

Joonas implemented reentrancy via mutex objects that, however, is *not*
in the spirit of the glpk design. Since glpk does not provide parallel
algorithms, there is no sense to share program objects between different
threads.

You can build a reenterant W32 dll for glpk replacing the files
glplib1.c and glpmps.c by their reentrant versions (see glplib1a.c and
glpmps.c in the attachment). Note that: a) the interior point routine
lpx_interior must not be used in reentrant applications; b) no thread
must access the problem object created by another thread.

To build the dll you simply need to include all files from the source
subdirectory into the project in a usual way (within ide). No special
settings are required.

Attachment: glplib1a.c
Description: Binary data

Attachment: glpmps.c
Description: Binary data


reply via email to

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