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

MathGroup Archive 2012

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

Search the Archive

Re: much power to mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125355] Re: much power to mathematica
  • From: "djmpark" <djmpark at comcast.net>
  • Date: Fri, 9 Mar 2012 06:07:32 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jj4qn7$ifa$1@smc.vnet.net> <15040062.90100.1331201203073.JavaMail.root@m06>

David,

There is a case where parallel processing will give a gain much greater than
the number of cores used! This is when breaking a complicated graphic, say a
contour or density plot, into multiple pieces.

If you have to use 200 x 200 PlotPoints for a regular plot, then you can
break it into four 100 x 100 plots for the same resolution. You obtain the
approximate factor of 4 but also much faster execution because you are using
only 1/4 the PlotPoints for each plot. There might also be some improvement
with MaxRecursion, because each plot is simpler.

I've found that the easiest way to understand and use parallel processing is
to learn about and use ParallelSubmit and WaitAll.


David Park
djmpark at comcast.net 
http://home.comcast.net/~djmpark/index.html 



From: David Bailey [mailto:dave at removedbailey.co.uk] 


On 06/03/2012 10:59, Bill Rowe wrote:
> On 3/5/12 at 1:03 AM, aleks.post at gmail.com (Alexey Kornetov) wrote:
>
>> Hmm.. You are right. I'm new in mathematica if there is the way to 
>> allocate evolution between the cores to gain much speed?
>
> To allocate processing between cores you need to write your code to 
> make use of functions such as ParallelTable. That is, your code needs 
> to take advantage of parallel processing. Note, parallel processing 
> can and will speed up some things but not all things.
>
>

Alexey,

Since you say you are a newcomer to Mathematica, I would be very wary about
plunging into parallel constructs unless you are sure your code cannot be
speeded up in other ways, such as:

Use of functional constructs.

Ensuring all arrays are 'packed'.

etc.

Remember that the maximum possible gain from parallelisation is given by the
number of cores on your machine, whereas other speedup tricks can often
achieve larger savings.

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





  • Prev by Date: Re: graph
  • Next by Date: Re: new functional operator
  • Previous by thread: Re: much power to mathematica
  • Next by thread: Re: much power to mathematica