f



Parallel processing


Hello,

I am running version 7.01 on a quad core CPU. I am doing some heavy 
calculations but was too lazy to use any special commands for 
parallelization.

However, to my surprise, when I check the performance I see that all 4 
kernels a busy calculating.

Does anybody have any info about this automatic parallelization of 
Mathematica?

Daniel



0
dh1 (452)
5/28/2009 10:50:27 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

6 Replies
974 Views

Similar Articles

[PageSpeed] 7

As far as I know, Mathematica does not paralellize unless you
explicitedly tell it to. Did you see 4 Mathematica kernels running or
just 4 cores being busy with unknown processes?

Cheers -- SjoerdOn May 28, 12:50 pm, dh <d...@metrohm.com> wrote:
> Hello,
>
> I am running version 7.01 on a quad core CPU. I am doing some heavy
> calculations but was too lazy to use any special commands for
> parallelization.
>
> However, to my surprise, when I check the performance I see that all 4
> kernels a busy calculating.
>
> Does anybody have any info about this automatic parallelization of
> Mathematica?
>
> Daniel


0
5/28/2009 11:33:48 PM
dh wrote:
> Hello,
> 
> I am running version 7.01 on a quad core CPU. I am doing some heavy 
> calculations but was too lazy to use any special commands for 
> parallelization.
> 
> However, to my surprise, when I check the performance I see that all 4 
> kernels a busy calculating.
> 
> Does anybody have any info about this automatic parallelization of 
> Mathematica?
> 
> Daniel
> 
> 
> 
Prior to 7.0 there was talk that certain cpu-intensive algorithms would 
make use of multiple cores where appropriate - presumable they still do. 
Where does your program spend its time?

David Bailey
http://www.dbaileyconsultancy.co.uk

0
dave2659 (542)
5/28/2009 11:34:10 PM
On May 28, 4:50 am, dh <d...@metrohm.com> wrote:
> Hello,
>
> I am running version 7.01 on a quad core CPU. I am doing some heavy
> calculations but was too lazy to use any special commands for
> parallelization.
>
> However, to my surprise, when I check the performance I see that all 4
> kernels a busy calculating.
>
> Does anybody have any info about this automatic parallelization of
> Mathematica?
>
> Daniel

So what kind of calculations were you doing?

I think ever since version 5.2 Mathematica has taken advantage of
multicore and/or multiprocessor systems for many common numerical
linear algebra operations such as dot products, matrix inversions, etc
by parallelizing them across multiple CPU's and this type of
parallelism is applied automatically and is not controllable by the
user. This is totally different from the new parallel user level
routines built into 7.0 and newer versions and older versions with the
PCT (Parallel Computing Toolkit).

For example try: (extracted from "Fibonacci Determinants"
demonstration example by Michael Croucher on the
http://demonstrations.wolfram.com/FibonacciDeterminants/ web site)

fibon[size_] := If[size == 1, Text@Row[{"det(1)", " = ", 1}]
   ,
   Text@Row[{det (MatrixForm[
         SparseArray[{Band[{1, 1}] -> 1,
           Band[{2, 1}] -> Style[i, Italic],
           Band[{1, 2}] -> Style[i, Italic]}, {size, size}]])
      , " = "
      , Det[
       SparseArray[{Band[{1, 1}] -> 1, Band[{2, 1}] -> I,
         Band[{1, 2}] -> I}, {size, size}]]
      }
     ]
   ];

fibon[2000]

and watch all your processors get pegged to the max but yet there is
only one mathkernel and mathematica process running. If you're doing
something the "PCT" way then you would have multiple mathkernel's
running (up to your license limit) but you would have to write code
using the parallel routines to implement the task.

-Bob

0
deepyogurt (166)
5/30/2009 12:59:20 AM
On May 28, 4:50 am, dh <d...@metrohm.com> wrote:
> Hello,
>
> I am running version 7.01 on a quad core CPU. I am doing some heavy
> calculations but was too lazy to use any special commands for
> parallelization.
>
> However, to my surprise, when I check the performance I see that all 4
> kernels a busy calculating.
>
> Does anybody have any info about this automatic parallelization of
> Mathematica?
>
> Daniel

According to this bit of Wolfram news from July 12, 2005 at
http://www.wolfram.com/news/mathematica52.html:

Mathematica 5.2 also supports automatically threaded numerical linear
algebra on all mainstream platforms, enabling linear algebra
operations to automatically run in parallel on all available processor
cores whether multiple or multicore CPUs. Mainstream multicore-based
systems are now available and are expected to be ubiquitous by early
next year, including in notebooks and entry-level systems.

-Bob

0
deepyogurt (166)
5/30/2009 12:59:31 AM
Well, I know (from experience) that linear algebra routines were
paralellized already prior to version 7. So, when I used NDSolve
to solve large systems of coupled ordinary differential equations,
which makes heavy use of such routines, the calculation actually
used (magically, because I did not have to do anything for that)
parallel processing even in version 5.2 and 6.

David Bailey schrieb:
> dh wrote:
>> Hello,
>>
>> I am running version 7.01 on a quad core CPU. I am doing some heavy 
>> calculations but was too lazy to use any special commands for 
>> parallelization.
>>
>> However, to my surprise, when I check the performance I see that all 4 
>> kernels a busy calculating.
>>
>> Does anybody have any info about this automatic parallelization of 
>> Mathematica?
>>
>> Daniel
>>
>>
>>
> Prior to 7.0 there was talk that certain cpu-intensive algorithms would 
> make use of multiple cores where appropriate - presumable they still do. 
> Where does your program spend its time?
> 
> David Bailey
> http://www.dbaileyconsultancy.co.uk
> 

0
5/30/2009 1:00:46 AM
Hi Daniel

Have a look at this:

http://www.wolfram.com/technology/guide/MulticoreSupport/

Regards
Mark Westwood

On May 28, 11:50 am, dh <d...@metrohm.com> wrote:
> Hello,
>
> I am running version 7.01 on a quad core CPU. I am doing some heavy
> calculations but was too lazy to use any special commands for
> parallelization.
>
> However, to my surprise, when I check the performance I see that all 4
> kernels a busy calculating.
>
> Does anybody have any info about this automatic parallelization of
> Mathematica?
>
> Daniel


0
5/30/2009 1:01:07 AM
Reply: