bug-glpk
[Top][All Lists]
Advanced

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

Re: [Fwd: Possible bug in GLPK - Error detected in file env/alloc.c at l


From: Heinrich Schuchardt
Subject: Re: [Fwd: Possible bug in GLPK - Error detected in file env/alloc.c at line 72]
Date: Thu, 26 Mar 2020 22:46:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/25/20 8:23 PM, Andrew Makhorin wrote:
-------- Forwarded Message --------
From: "Sierra Ansuas, Juan Pablo" <address@hidden>
To: address@hidden <address@hidden>
Cc: address@hidden <address@hidden>, "Di Cristofaro, Milton Nadir" <MDiCristo
address@hidden>
Subject: Possible bug in GLPK - Error detected in file env/alloc.c at
line 72
Date: Wed, 25 Mar 2020 18:34:56 +0000

Dear GLPK mantainer(s),

I am having problems when trying to run the GLPK solver in a multi-
threaded fashion using its C API and OpenMP. While the solver does
appear to work, an error comes up when trying to free the memory with
glp_delete_prob:

glp_free: memory allocation error
Error detected in file env/alloc.c at line 72

I am no GLPK expert but I would be very grateful if you could check
the provided source code and determine whether this is being caused
by a bug or a simple beginner mistake.

Running on an eight core processor, 8GiB ram. Stack size limit: 2GB
(ulimit -s 2000000), Stack size limit per thread: 200MB (export
OMP_STACKSIZE=200000). Provided source makes little sense but is
quite short and reproduces the problem every time. Compile command is
as follows:

gcc test_c.c  -o test_c -fopenmp -I/home/user/libglpk/glpk-
4.65/include /home/user/libglpk/glpk-4.65/src/.libs/libglpk.so.40.3.0


Regards,

Juan Pablo Sierra

Hello Juan,

Did you compile GLPK with '--enable-reentrant=yes'?

You are creating all problems in one thread and then call the solver in
separate threads. This is not supported by GLPK.

Please, have a look at:
glpk-4.65/examples/threads/multiseed.c

Here all GLPK library calls needed for each individual model are called
within the same separate thread.

Please, have a look at the error and output handling in the example too.

Best regards

Heinrich



reply via email to

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