Following suggestion I created the simplest error giving code
Star[f_, g_] := Sum[ D[f , {x, n}] D[g , {x, 2 - n}], {n, 1, 2}]
T1 = x + t12 x^2 + x^3; T2 = t21 x + t22 x^2 + x^4;
DistributeDefinitions[T1, T2, Star];
Star[T1, T2] // Coefficient[#, x^2] &
ParallelTable[Star[T1, T2] // Coefficient[#, x^u] & , {u, 2, 2}]
ParallelTable[Star[T1, T2], {u, 5, 5}] //Coefficient[#, x^2] &
The results of calculation are
9 t21 + 6 t12 t22
{0}
{9 t21 + 6 t12 t22}
What can be causing the problem please?
StrO[u]
andPrdW[u]
defined in the same way in the local and remote Kernels? SeeDistributeDefinitions
and strategies for clean kernel. $\endgroup$DistributeDefinitions
is essentially a bug. I don't mean that it should necessarily succeed, although I don't quite see whyDistributeDefinitions
should not be applied to un-Protected
symbols when explicitly asked. What I mean is that there ought to be at least two warnings: The documentation forDistributeDefinitions
should indicate the limitation with regard to"System`"
and other(?) contexts.DistributeDefinitions
should give an error message for any arguments whose definitions will not be distributed. $\endgroup$