help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Patch to configure a reentrant version of GLPK


From: Andrew Makhorin
Subject: Re: [Help-glpk] Patch to configure a reentrant version of GLPK
Date: Mon, 09 Jan 2017 14:07:14 +0300

On Fri, 2017-01-06 at 00:07 +0200, Chris Matrakidis wrote:
> Heinrich,
> 
> > Why should this option be disabled by default?
> 
> I have only really tested the patch on Linux so I thought it safer to
> have it disabled by default for the time being. This way, whoever
> really needs it can try it and won't be worse off if it doesn't work.

I agree with that. It seems to me that at least for now this option can
be implemented just by specifying something like '-DTLS=__thread' on
running 'make'.

> 
> > For all applications that up to now were only able to use GLPK with one
> > thread the patch makes no difference.
> 
> Well, I noticed a very minor slowdown when enabled but nothing to
> worry about (at least on my system).
> 
> > If we have such a switch a program calling the library will need a means
> > of determining if the library is thread-safe or not.
> 
> This may still be required to help with code portability to systems
> with old glpk libraries (although a version check may be enough).
> 
> > So it would be preferable not to have any switch at all but simply make
> > the library thread safe in all cases.
> 
> I agree it makes sense to have it enabled by default eventually, but I
> think the switch is still necessary to ease configuring a single
> threaded version.

I think that running glpk in multiple threads is rather an exception
needed mainly in interactive programs and in some other exotic
applications, so in my opinion this option should be disabled by
default. 


Andrew Makhorin




reply via email to

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