Forum Discussion
FICO
3 years agoCommunity Manager
__lll_lock_wait allowing only one thread to work
I am calling the XPRESS optimizer from a multithreaded Pascal application and having performance issues with the solver. While the program is multithreaded, all but one of the threads are sleeping a...
FICO
3 years agoCommunity Manager
I don't think there is a bug in your code. I checked the Xpress source code and the whole XPRSdestroyprob() function is indeed guarded by a global lock. I am investigating whether this can be relaxed but at the moment I don't think there is anything you can do to avoid this lock.
One option might be to not destroy problems on a thread but instead reuse them as much as possible without explicitly destroying them. For example, you could store the problem instance in a thread-local variable. Then, at the time you would call XPRScreateprob() you check whether the thread-local instance is non-NULL, you reuse that instance. Otherwise you create a new instance (and store it in the thread-local variable for later use). At the end of the thread you check whether the thread local variable is non-NULL and if so you destroy the respective problem instance.
Another option would be to use a problem pool and instead of XPRSdestroyprob() but problems into that pool. That may however cause unwanted inter-thread-dependencies in your application.
One question that is still open: are your threads hammering on XPRSdestroyprob()? This function should usually be reasonably fast but if there are many threads that call this frequently or at the same time then I can see how you can observe the slowdown you report.
Related Content
Related Content
Parameter Threads
Hi, I'm using Fico Xpress and I have a question about the parameter THREADS. According to the documentation, THREADS > 0 means the "number of threads to use". Let suppose THREADS = 4. In this ca...7 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread0Views0likes2CommentsConst correctness and thread safety in the C-API
How do I know : Which functions can be considered const i.e leave the XPRSprob in an unaltered state ? Which functions are thread safe ? (I am in particular interested in knowing if XPRSbtran and...3 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum3 unread comments3 unread0Views0likes3Comments