I am trying to redistribute a definition after removing the definition on parallel kernels.
Sample code on version 10.4.0.0:
x=3;
DistributeDefinitions[x] (* {x} *)
ParallelEvaluate[Print[x];]; (* displayed as "3", "3", ... *)
ParallelEvaluate[Remove[x];];
DistributeDefinitions[x] (* {} *)
ParallelEvaluate[Print[x];]; (* displayed as "x", "x", ... *)
The first behavior of parallel Print[x]
is as expected, but the second is not. For unchanged x
on the master kernel, is there a way to make DistribteDefinitions[x]
work again ?