MathGroup Archive 2010

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

Search the Archive

Re: parallel table

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107300] Re: parallel table
  • From: "Norbert P." <bertapozar at gmail.com>
  • Date: Mon, 8 Feb 2010 03:36:49 -0500 (EST)
  • References: <hkm7br$oqi$1@smc.vnet.net>

Hi tinkerbell,

I was trying the exact same thing a week ago.

So I assume that symbols Psit### store the solution data. The problem
with your code is that the parallel kernels don't have those symbols
automatically. You have to use DistributeDefinitions. First I'd
recommend storing the solution data in the form Psit[t] instead of
Psit###, it is much easier to work with. Then you can just call
DistributeDefinitions[Psit] before your ParallelTable and it should
work.

One thing to look out for, if the data is massive, you might not want
to send all of it to 8 parallel kernels. ParallelMap or ParallelSubmit
might help.

Also, the actual rendering probably takes a lot of time too, at least
in my case. But based on my experience, the rendering and exporting
can be done only on the main kernel, that's the one who's doing all
the work when you use ParallelSubmit[Export[file,plot]].

Best,
Norbert

On Feb 7, 3:15 am, Very Bad Mother... <shinytinkerb... at googlemail.com>
wrote:
> Hello,
> I would like to create a "film" from the numerical data that I got.
> Hence, I've created a table of plots and then by exporting to gif I
> can observe the dynamics. The problem is that I'd like to have many
> plots inside this table (many frames of my film, so to say) and it
> takes a hell of a time. This is why I thought about making this
> parallel (got 8 cores). I've used ParallelTable but there are some
> errors occuring:
>
> DensityGraphicsTable =
>   ParallelTable[
>    ListDensityPlot[ToExpression["Psit" <> ToString[j - 1]],
>     FrameLabel -> {"m", "z"},
>     LabelStyle -> {FontFamily -> "Helvetica", FontSize -> 12},
>     PlotRange -> All, PlotLabel -> "t=" <> ToString[dt*(j - 1)]], {=
j,
>     1, tmax, tstep}];
>
> ListDensityPlot::arrayerr: Psit0 must be a valid array.
> ListDensityPlot::arrayerr: Psit250000 must be a valid array.
> ListDensityPlot::arrayerr: Psit500000 must be a valid array.
> ListDensityPlot::arrayerr: Psit750000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1000000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1250000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1500000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1750000 must be a valid array.
> ListDensityPlot::arrayerr: Psit50000 must be a valid array.
> ListDensityPlot::arrayerr: Psit300000 must be a valid array.
> ListDensityPlot::arrayerr: Psit550000 must be a valid array.
> ListDensityPlot::arrayerr: Psit800000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1050000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1300000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1550000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1800000 must be a valid array.
> ListDensityPlot::arrayerr: Psit100000 must be a valid array.
> ListDensityPlot::arrayerr: Psit350000 must be a valid array.
> ListDensityPlot::arrayerr: Psit600000 must be a valid array.
> ListDensityPlot::arrayerr: Psit850000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1100000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1350000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1600000 must be a valid array.
> ListDensityPlot::arrayerr: Psit1850000 must be a valid array.
>
> General::stop: Further output of ListDensityPlot::arrayerr will be
> suppressed during this calculation.
> General::stop: Further output of ListDensityPlot::arrayerr will be
> suppressed during this calculation.
> General::stop: Further output of ListDensityPlot::arrayerr will be
> suppressed during this calculation.
> General::stop: Further output of ListDensityPlot::arrayerr will be
> suppressed during this calculation.
> General::stop: Further output of ListDensityPlot::arrayerr will be
> suppressed during this calculation.
> General::stop: Further output of ListDensityPlot::arrayerr will be
> suppressed during this calculation.
> General::stop: Further output of ListDensityPlot::arrayerr will be
> suppressed during this calculation.
> General::stop: Further output of ListDensityPlot::arrayerr will be
> suppressed during this calculation.
>
> So I don't know what to do, especially that when I use regular Table
> instead of ParallelTable, everything works (but it takes damn long
> time).
> Any help would be appreciated,
> --
> regards,
> tinkerbell



  • Prev by Date: Re: parallel table
  • Next by Date: Re: Re: DeleteDuplicates is too slow?
  • Previous by thread: Re: parallel table
  • Next by thread: Re: parallel table