|
From: | Simone Atzeni |
Subject: | [Help-glpk] Thread Safety of GLPK |
Date: | Thu, 24 Aug 2017 21:52:39 -0600 |
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: address@hidden |
[Prev in Thread] | Current Thread | [Next in Thread] |