Mathematica > Systems Interfaces & Deployment > Mathematica System Setup > Parallel Computation Setup & Configuration >
Mathematica > Systems Interfaces & Deployment > Parallel Computing > Parallel Computation Setup & Configuration >
Mathematica > Core Language > Tuning & Debugging > Parallel Computing > Parallel Computation Setup & Configuration >

DistributeDefinitions

DistributeDefinitions[s1, s2, ...]
distributes all definitions for the symbols si to all parallel kernels.
DistributeDefinitions["context`"]
distributes definitions for all symbols in the specified context.
  • DistributeDefinitions in effect applies ParallelEvaluate to all assignments for values and attributes with the symbols si, including not only ownvalues but also downvalues, upvalues and other types of values.
  • DistributeDefinitions in effect "registers" the definitions for the symbols si so that they are automatically distributed to every new parallel kernel that may be launched.
Functions used in subkernels usually need to be distributed first:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team