[Top][All Lists]

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

Re: [Help-glpk] Multi-thread questions

From: Paolo Bolzoni
Subject: Re: [Help-glpk] Multi-thread questions
Date: Sat, 12 Oct 2013 13:06:45 +0200

On Sat, Oct 12, 2013 at 7:11 AM, Joey Rios <address@hidden> wrote:
>> In my scenario, I have many linear problems and I have to find the one
>> with
>> the maximum solution. Parallelism is easy for this scenario since there is
>> nothing to share, just find the best.
> If there is nothing to share between your problems, you probably should take
> the advice of Marc and just use scripted calls to glpsol.  Your concern of
> serialization and deserialization does not really explain why calling glpsol
> this way would be a problem.
To create the problems we just need to loop over few data structures.
It might be uncommon in general, but to serialize and deserialize
would be much more code. It is definitely an option, but if possible we
like the paths of less resistance.
But I am getting the point maybe the best is indeed this choice and await
that C11 implemented by compilers. (I expect no more portability problems
after... isnt it?)

> The main thing you should do is replace all of the calls to glpk's custom
> memory allocation routines with a basic malloc call.  Likewise, replace the
> glpk custom free calls with regular 'free' calls.  There is one more place
> that you have to do something, but I forget where it is (somewhere in the
> TLS stuff like you mention). The code has changed since 4.44, but here is a
> patch that I used on that version of the code to create a threaded version
> of the glpk library:

reply via email to

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