MathGroup Archive 2009

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

Search the Archive

Re: creating Graphics using ParallelTable[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99872] Re: creating Graphics using ParallelTable[]
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Mon, 18 May 2009 02:29:45 -0400 (EDT)
  • References: <gum0ar$q33$1@smc.vnet.net>

Jan-Philip,

I have no idea what's the problem in your case. I have been doing
something very similar and it worked nicely. Both CPU load indicators
at a full 100%.

Cheers -- Sjoerd

On May 16, 11:17 am, Jan-Philip Gehrcke <jgehr... at googlemail.com>
wrote:
> Hello all,
>
> I generate "video frames" from time-consuming 3DPlot[]s (to export
> them into a video file later on):
>
> frame[x_] := Plot3D[... something big using x ...];
> movieframes = Table[frame[x], {x, start, end, (end-start)/steps}];
>
> I have a double core CPU; so now I would like to create these frames
> in parallel with Mathematica 7, using ParallelTable[]. But I don't
> derive any advantage from doing this:
>
> My Windows taskmanager shows three "MathKernel.exe". When I use
> ParallelTable[] for the described problem, only one "MathKernel.exe"
> is working, causing 50% CPU load and using much RAM. The other two
> "MathKernel.exe"s don't cause any load and almost don't use any RAM.
>
> $ProcessorCount is 2, there is 1 "master" and 2 "local" in "Parallel
> Kernel Status". The "parallelizeabletest" ParallelTable[$KernelID,
> {10}] succeeds.
>
> I tried `DistributeDefinitions[frame];` before invoking ParallelTable
> [], but it did not change anything.
>
> One core needs about 20 seconds to create one single frame without
> displaying it: An extensive analytical function (among others there
> are nested Coth[]s) has to be calculated with Plotpoints->100 option.
>
> In my opinion - simply expressed - each core can take one `x` out of
> the queue and create the corresponding 3DPlot Graphics object, while
> the other core is doing the same. This should work, because the tasks
> are totally independent and my way to use the Table[] is the least
> complex one. I don't see the "data management overhead" that often
> reduces or even prevents advantages from parallelizing, because each
> core just needs to get the function definitions and a simple number:
> `x` - no more overhead.
>
> (At which point) do I think wrong or does Mathematica work weird (less
> likely..)?
>
> Is there a way for me to create these frames using all my CPU power?
>
> Sincereley,
>
> Jan-Philip Gehrcke



  • Prev by Date: Followup question: Problem with parallel evaluation of integrals depending on a parameter
  • Next by Date: Re: creating Graphics using ParallelTable[]
  • Previous by thread: Re: creating Graphics using ParallelTable[]
  • Next by thread: Re: creating Graphics using ParallelTable[]