Is this a bug in ParallelDo? The parallel Kernels do not seem to see the
definitions propely.
LaunchKernels[]
\[ScriptCapitalD] = SmoothKernelDistribution[{1, 2, 3, 4}]
DistributeDefinitions[\[ScriptCapitalD]]
Print@"Table:"
Table[{$KernelID,RandomVariate[\[ScriptCapitalD]]}, {2}] (* This is fine *)
Print@"Do:"
Do[Print@{$KernelID,RandomVariate[\[ScriptCapitalD]]}, {2}] (* This is
fine *)
Print@"ParallelTable:"
ParallelTable[{$KernelID,RandomVariate[\[ScriptCapitalD]]}, {2}] (* This
is fine *)
Print@"ParallelDo:"
ParallelDo[Print@{$KernelID,RandomVariate[\[ScriptCapitalD]]}, {2}] (*
This is NOT fine *)
This is Mathematica V8 on Windows XP, machine with 4 Cores. I have
reported this to TechSupport.