Thread Safety of GLPK

Simone Atzeni <[email protected]>
Newsgroups gmane.comp.gnu.glpk
Message-ID <[email protected]>
Hi,

In the GLPK documentation, paragraph "2.1.3 Thread Safety" states:

"The standard version of GLPK API is not thread safe and therefore should not be used in multi-threaded programs.”

Does it mean that two threads can not solve two independent LP/MIP simultaneously?
For example, I am running a multi-threaded program where each thread is solving a different MIP, and I am experiencing a segmentation fault.
I tried to analyzed the problem with GDB and looks like the seg fault is happening when one thread free the memory of its own MIP.

Could the non-thread safety be the reason of the segmentation fault?

I put the function call that creates and solves the MIP within a mutex lock/unlock and the segmentation fault is not happening, so I guess that answers my question.
But if that’s the reason, is there a workaround or  thread-safe GLPK version?
The mutex reduces heavily the performance of my program.

Thanks.
Best Regards,
Simone

Simone Atzeni
PhD Candidate
School of Computing
University of Utah
_________________________________
mobile: +1 (801) 696-8373
email: [email protected] <mailto:[email protected]>http://www.cs.utah.edu/~simone <http://www.cs.utah.edu/~simone>

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.