
Hello John.
The library, as is, is not thread safe (the main reason is that it uses a bunch of static caches to speed up single-threaded computations).
Maxim Gaina, a student under my supervision, produced a version of the library which is conditionally thread safe: safety is achieved as long as each thread has exclusive access to the PPL objects it works on. That is, either the objects are not shared between threads or the application code makes sure that shared objects are accessed at different times (e.g., using mutexes). The thread-safe version uses C++11 constructs and it was considering the C++ and C language interfaces only. For testing purposes, Maxim produced multi-threaded variants of demo programs ppl_lcdd and ppl_lpsol.
Afaict, Roberto was considering whether or not the work of Maxim was to be added to the main PPL library.
Cheers, Enea
On 08/09/2016 11:23 PM, John Paulson wrote:
Hi Developers,
I have been using PPL for a couple of years, and I have just become interested in parallelizing an application I wrote that calls it. I tried to do this (using a parallel_for loop from TBB), but I ran into varied errors at run time.
I noticed that in the TODO file of the PPL distribution that it has "Make the library thread-safe" on the list. Has this been done yet? Would the lack of thread safety lead to strange run time errors?
Best, John C. Paulson
PPL-devel mailing list PPL-devel@cs.unipr.it http://www.cs.unipr.it/mailman/listinfo/ppl-devel