MathGroup Archive 2012

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

Search the Archive

ParallelTable complaining while Table executes

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127628] ParallelTable complaining while Table executes
  • From: narducci60 at gmail.com
  • Date: Wed, 8 Aug 2012 03:17:25 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

I'm having trouble parallelizing a simple code. Table[] executes it without any problem but if I try to use ParallelTable something seems to go wrong.
Here is the snippet:

Table[Show[
  Plot3D[h2Dbreak[xx, yy, t, -1], {xx, 0, 10}, {yy, 0, 10}, 
   PlotStyle -> Yellow, ColorFunctionScaling -> False, 
   BoxRatios -> {1, 1, .5}, MaxRecursion -> 7, Mesh -> None, 
   Filling -> \[Phi]2D[0, 0, t], FillingStyle -> psau, Axes -> False, 
   Ticks -> None, Boxed -> False, 
   PlotRange -> {{0, 10}, {0, 10}, {-5, 1.5}}],
  Plot3D[\[Phi]2Dbreak[xx, yy, t, -1], {xx, 0, 10}, {yy, 0, 10}, 
   PlotStyle -> ps, BoxRatios -> {1, 1, 2}, MaxRecursion -> 7, 
   Mesh -> None, Filling -> Bottom, FillingStyle -> psbulk, 
   Axes -> False, Ticks -> None, Boxed -> False, 
   PlotRange -> {{0, 10}, {0, 10}, {-5, 1.5}}]
  ], {t, 0, .02, .01}]

where 

\[Phi]2Dbreak[x_, y_, t_, nabla2\[Phi]crit_] := 
 If[t < tbreak[x, y, nabla2\[Phi]crit], \[Phi]2D[x, y, t], \[Phi]2D[x,
    y, tbreak[x, y, nabla2\[Phi]crit]]]

h2Dbreak[x_, y_, t_, nabla2\[Phi]crit_] := 
 If[nabla2\[Phi][x, y, t] < nabla2\[Phi]crit, Indeterminate, 
  h2D[x, y, t]]

tbreak[x_, y_, nabla2\[Phi]crit_] := 
 If[tbreaktmp[x, y, nabla2\[Phi]crit] > 0, 
  tbreaktmp[x, y, nabla2\[Phi]crit], 1000] 

tbreaktmp[x_, y_, nabla2\[Phi]crit_] := 
 t //. FindRoot[
   nabla2\[Phi][x, y, t] == nabla2\[Phi]crit, {t, 0.1, 2}]

h2Dbreak[x_, y_, t_, nabla2\[Phi]crit_] := 
 If[nabla2\[Phi][x, y, t] < nabla2\[Phi]crit, Indeterminate, 
  h2D[x, y, t]]

Needs["VectorAnalysis`"]

nabla2\[Phi][x_, y_, t_] := 
 Laplacian[\[Phi]2D[Xx, Yy, t]] //. {Xx -> x, Yy -> y}



Table[...] works fine while ParallelTable complains:
FindRoot::nlnum: The function value {0.5 +VectorAnalysis`Laplacian[-0.2]}
 is not a list of numbers with dimensions {1} at {t} = {0.1}.

FindRoot::nlnum: The function value {0.5 +VectorAnalysis`Laplacian[-0.2]}
 is not a list of numbers with dimensions {1} at {t} = {0.1}.

ReplaceRepeated::reps: {FindRoot[nabla2\[Phi][0.000715,0.000715,t]==-0.5,{t,0.1,2}]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

ReplaceRepeated::reps: {FindRoot[nabla2\[Phi][0.000715,0.000715,t]==-0.5,{t,0.1,2}]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

FindRoot::nlnum: The function value {0.5 +VectorAnalysis`Laplacian[-0.2]}
 is not a list of numbers with dimensions {1} at {t} = {0.1}.

FindRoot::nlnum: The function value {0.5 +VectorAnalysis`Laplacian[-0.2]}
 is not a list of numbers with dimensions {1} at {t} = {0.1}.

FindRoot::nlnum: The function value {0.5 +VectorAnalysis`Laplacian[-0.2]}
 is not a list of numbers with dimensions {1} at {t} = {0.1}.

FindRoot::nlnum: The function value {0.5 +VectorAnalysis`Laplacian[-0.2]}
 is not a list of numbers with dimensions {1} at {t} = {0.1}.

ReplaceRepeated::reps: {FindRoot[nabla2\[Phi][0.000715,0.000715,t]==-0.5,{t,0.1,2}]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

FindRoot::nlnum: The function value {0.5 +VectorAnalysis`Laplacian[-0.2]}
 is not a list of numbers with dimensions {1} at {t} = {0.1}.

General::stop: Further output of FindRoot::nlnum will be suppressed during this calculation.

FindRoot::nlnum: The function value {0.5 +VectorAnalysis`Laplacian[-0.2]}
 is not a list of numbers with dimensions {1} at {t} = {0.1}.

General::stop: Further output of FindRoot::nlnum will be suppressed during this calculation.

ReplaceRepeated::reps: {FindRoot[nabla2\[Phi][0.000715,0.000715,t]==-0.5,{t,0.1,2.}]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

FindRoot::nlnum: The function value {0.5 +VectorAnalysis`Laplacian[-0.2]}
 is not a list of numbers with dimensions {1} at {t} = {0.1}.

ReplaceRepeated::reps: {FindRoot[nabla2\[Phi][0.000715,0.000715,t]==-0.5,{t,0.1,2.}]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

ReplaceRepeated::reps: {FindRoot[nabla2\[Phi][0.000715,0.000715,t]==-0.5,{t,0.1,2.}]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

General::stop: Further output of FindRoot::nlnum will be suppressed during this calculation.

ReplaceRepeated::reps: {FindRoot[nabla2\[Phi][0.000715,0.000715,t]==-0.5,{t,0.1,2.}]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

General::stop: Further output of ReplaceRepeated::reps will be suppressed during this calculation.

ReplaceRepeated::reps: {FindRoot[nabla2\[Phi][0.000715,0.000715,t]==-0.5,{t,0.1,2.}]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

General::stop: Further output of ReplaceRepeated::reps will be suppressed during this calculation.

ReplaceRepeated::reps: {FindRoot[nabla2\[Phi][0.000715,0.000715,t]==-0.5,{t,0.1,2.}]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

General::stop: Further output of ReplaceRepeated::reps will be suppressed during this calculation.

and returns no output. I tried to DistributeDefinitions -- no success.

Any hint?

Thanks,
Dario



  • Prev by Date: how does Rotate in 2D work?
  • Next by Date: Warning/error messages NMinimize
  • Previous by thread: Re: how does Rotate in 2D work?
  • Next by thread: Warning/error messages NMinimize