help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] GLPK re-endrant


From: Antonello Lobianco
Subject: Re: [Help-glpk] GLPK re-endrant
Date: Wed, 1 Jul 2009 16:48:14 +0200

Hi.. so far it is what I have done (using the latest glpk 4.38):
- I declared "static __thread void *tls = NULL;" on glplib02.c
- I find/replaced strtok with strtok_r
- I replaced strerror with "bla" (strerror_r want additional
parameters I didn't understood exactly what they are..)

I am still with the following error:
Crashing...
Size of triangular part = 27
xfree: memory allocation error
Error detected in file glplib07.c at line 181

However I don't do exactly like exposed on previous emails.
To save time in fact I don't solve a completely new maximisation
problem all the times.
Rather I start the model rising the agents, assigning them the glpk
problem, defining the problem and solving it the first time (in the
single main thread).
After this "initialisation" step I start the modelling where at each
year I parallelise the code and, on each agent I modify the problems
with functions like glp_add_rows(...), and glp_add_cols(...) and solve
the problem with glp_adv_basis(lpglpk,0), lpx_simplex(lpglpk) and
lpx_integer(lpglpk).
Only at the end of the model I cancel - again, in the main thread- the
agents and their gplk problem.

What I want to now is change the model so that all the steps (create
the glpk problem, defining it and solving it) are done in the
parallelised part of the model (but in one individual thread).

Let's gonna hope it will works ;-)


On Tue, Jun 30, 2009 at 8:55 PM, Robbie Morrison<address@hidden> wrote:
>
> Hi Antonello
>
> Can you post your conclusions back to this list?  I do
> something similar: my "agents" are plant operators, market
> participants, are engineering equipment.  At present I just
> make and reset little GLPK instances.  No performance issues
> at present, but this strategy could well scale rather badly.
>
> Robbie
> ---


-- 
Antonello Lobianco
http://www.lobianco.org/antonello
antonello a.t lobianco.org
sip:address@hidden




reply via email to

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