in some cases,<div>parallel symbolic algorithms obtain great performance increase, it all depends how you model the problem.</div><div>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<br>

<br><div class="gmail_quote">On Mon, Aug 23, 2010 at 10:19 AM, Kraus Philipp <span dir="ltr">&lt;<a href="mailto:philipp.kraus@flashpixx.de">philipp.kraus@flashpixx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Am 23.08.2010 um 15:51 schrieb Alexei Sheplyakov:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When will be ginac thread safe and is there such a thing?<br>
</blockquote>
<br>
There are no plans to make GiNaC thread safe. Parallel versions of symbolic<br>
algorithms are not much faster (and sometimes even slower) than their<br>
sequential counterparts. So why bother?<br>
</blockquote>
<br></div>
Thanks, but I&#39;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&#39;t create race condition errors.<br>


Eg: I create in multithreaded a lot of diff&#39;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&#39;s not my favorite solution<br>


<br>
Thanks<br>
<br>
Phil<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
GiNaC-list mailing list<br>
<a href="mailto:GiNaC-list@ginac.de" target="_blank">GiNaC-list@ginac.de</a><br>
<a href="https://www.cebix.net/mailman/listinfo/ginac-list" target="_blank">https://www.cebix.net/mailman/listinfo/ginac-list</a><br>
</div></div></blockquote></div><br></div>