Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Parallel processing

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100259] Re: Parallel processing
  • From: Bob F <deepyogurt at gmail.com>
  • Date: Fri, 29 May 2009 20:59:48 -0400 (EDT)
  • References: <gvlq9j$isl$1@smc.vnet.net>

On May 28, 4:50 am, dh <d... at 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


  • Prev by Date: Re: SingularValueDecomposition V6
  • Next by Date: Re: Working with Indeterminate in large numerical lists
  • Previous by thread: Re: Parallel processing
  • Next by thread: Install problem of Mathematica kernel