[Osi] osicpx threaded
Matthew.Galati at sas.com
Fri Aug 28 01:57:16 EDT 2009
FYI. If I remove all the references to static env_, version, etc... things seem to work fine now. OsiCpx is then thread-safe.
Can this be changed? or at least provided as an option? It is a shame if one cannot use Osi in a multi-threaded environment.
From: osi-bounces at list.coin-or.org [osi-bounces at list.coin-or.org] On Behalf Of Matthew Galati [magh at lehigh.edu]
Sent: Thursday, August 27, 2009 11:55 PM
To: osi at list.coin-or.org
Subject: [Osi] osicpx threaded
Has anyone successfully used more than one instance/thread of OsiCpx simultaneously? I am trying to do this. Constructing 2 instances of OsiCpx and using standard pthreads, solve two MILPs on 2 threads. It crashes. Valgrind/Helgrind is showing lots of potential race conditions. Looking a little deeper into OsiCpx, I noticed that although I have two different CpxLp ptrs, I have one CpxEnv ptr. In fact, the cpx env is a static variable in OsiCpx. Doesn't this make OsiCpx not thread-safe? Is there any easy way around this?
More information about the Osi