MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Multi-core Support in Mathematica 5.2

  • To: mathgroup at
  • Subject: [mg74185] Re: Multi-core Support in Mathematica 5.2
  • From: Jens-Peer Kuska <kuska at>
  • Date: Wed, 14 Mar 2007 03:40:15 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <esu68d$rn9$> <et54c1$aph$>
  • Reply-to: kuska at


yes you can parallelize Table[] in certain cases


is an example, you can't parallelize


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

Up to now, you should try to get the parallel computing toolkit
or the personal grid edition that run more kernels in parallel.


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:
>> 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 Bailey

  • Prev by Date: Re: draw question 2 (cusp-like curve)
  • Next by Date: Re: Replacement question
  • Previous by thread: Re: Multi-core Support in Mathematica 5.2
  • Next by thread: Re: Multi-core Support in Mathematica 5.2