Re: Multi-core Support in Mathematica 5.2

*To*: mathgroup at smc.vnet.net*Subject*: [mg74185] Re: Multi-core Support in Mathematica 5.2*From*: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>*Date*: Wed, 14 Mar 2007 03:40:15 -0500 (EST)*Organization*: Uni Leipzig*References*: <esu68d$rn9$1@smc.vnet.net> <et54c1$aph$1@smc.vnet.net>*Reply-to*: kuska at informatik.uni-leipzig.de

Hi, yes you can parallelize Table[] in certain cases Table[Sin[x],{x,0,Pi,Pi/256}] is an example, you can't parallelize y=0; Table[y++; Sin[x],{x,0,Pi,Pi/256}] because the different threads may access y at the same time and this cause usual a crash of the program. You won't have a Mathematica that crashes so easily. The second point is, even when you can parallelize Table[] you won't do that in the most cases, because you need approximately 100 000 operations (on the processor level) to overcome the overhead to create a thread. In such a case you will see that the processor load increase but it is slower than the serial execution. A second point is that Mathematica copy data on an on, allocating new memory is typical a global operation on the program heap and it will slow down the parallel execution dramatical. Up to now, you should try to get the parallel computing toolkit or the personal grid edition that run more kernels in parallel. Regards Jens Neri wrote: > Those functions that are parallelized in the 5.2, and supposedly run > on more than one core simultaneously, do they run in a single thread? > > Since it is demonstratively possible to parallelize these functions > (in one thread or more) why isn't it possible to parallelize a > function like Table? If I wrote a Table function with the index > running from 1 to 20, isn't it possible to run 1 to 10 in one core and > 11 to 20 in another core? > > Thanks, > Neri > >> Here is a link with some details: >> >> http://www.wolfram.com/products/mathematica/newin52/multicore.html >> >> I suspect it is hard to parallelise ordinary code - even functional code >> - because I can't imagine the kernel can run on more than one thread! >> >> David Baileyhttp://www.dbaileyconsultancy.co.uk >> > >