in some cases, parallel symbolic algorithms obtain great performance increase, it all depends how you model the problem. im using ginac with openMPI to paralelize huge tree generators, i had to go the processes paralelism since multithread is not safe, but would be nice to be able to do that on the future On Mon, Aug 23, 2010 at 10:19 AM, Kraus Philipp <philipp.kraus@flashpixx.de>wrote:
Am 23.08.2010 um 15:51 schrieb Alexei Sheplyakov:
When will be ginac thread safe and is there such a thing?
There are no plans to make GiNaC thread safe. Parallel versions of symbolic algorithms are not much faster (and sometimes even slower) than their sequential counterparts. So why bother?
Thanks, but I'm writing some algorithm that can be multithreaded. I use GiNaC for the symbolic arithmetic, but I can do this in parallel. The std structures are not thread-safe, so my algorithms run into race condition errors, because GiNaC uses them (like the parser). IMHO Ginac must not be parallelized, but only the structures should be thread-safe, so they can't create race condition errors. Eg: I create in multithreaded a lot of diff's and Ginac::mul, ::basic, ::ex, ::add create a lot of errors. I think I will try to create a mutex around them and create a wrapper class for the Ginac calls, but it's not my favorite solution
Thanks
Phil
_______________________________________________ GiNaC-list mailing list GiNaC-list@ginac.de https://www.cebix.net/mailman/listinfo/ginac-list