help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Re: re-entrant test version of GLPK


From: Andrew Makhorin
Subject: [Help-glpk] Re: re-entrant test version of GLPK
Date: Mon, 6 Oct 2003 13:53:47 +0300

It seems to me the following design would be reasonable to attain
reenterability of glpk as well as to implement other platform-specific
features like measuring the time.

Since reenterability is needed only in rare, specific cases, it should
be available only as an optional feature, i.e. if one needs to make a
reentrant version of glpk, he should replace the module glplib1 by an
appropriate platform-specific version. This allows keeping the main
configuration written entirely in ANSI C and thereby providing high
portability of the package.

Currently the module glplib1 should contain only the following three
routines:

void lib_put_ptr(void *ptr), which stores the library environment
pointer in the thread local storage;

void *lib_get_ptr(void), which retrieves the library environment
pointer from the thread local storage;

double lib_get_time(void), which is a long-term moderate-resolution
timer routine (returns the current universal time, in seconds, elapsed
since 12:00:00 GMT January 1, 2000).

In the future other routines might be included in glplib1, for example,
some locale-specific routines like lpx_check_name.

The standard, platform-independent version of glplib1.c is placed in
the main source directory and used by default on compiling and building
the package. Other, platform-dependent versions of this routine are to
be placed in the sysdep directory.

Currently there are only three modules in glpk 4.1 which still use the
static memory to store data:

glpipm.c    implementation of the interior-point method;
glplpx6b.c  LPX interface to glpipm;
glpmps.c    MPS file reader.

I will replace glpmps by a reentrant version. As to glpipm, there should
be a new implementation of the interior-point, so right now there is no
sense to make it reenterable. 

Thus, only the module glplib1.c needs to be implemented for various
platforms.

Andrew Makhorin






reply via email to

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