This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ParallelSubmit

ParallelSubmit[expr]
submits expr for evaluation on the next available parallel kernel and returns an EvaluationObject expression representing the submitted evaluation.
ParallelSubmit
builds a closure for the variables given before submitting expr.
  • ParallelSubmit substitutes the current values of the into expr before submitting it for evaluation.
Schedule a range of evaluations concurrently:
Start the calculations and wait for all results:
Functions used need to be distributed first:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Schedule a range of evaluations concurrently:
In[1]:=
Click for copyable input
Out[1]=
Start the calculations and wait for all results:
In[2]:=
Click for copyable input
Out[2]=
 
Functions used need to be distributed first:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Use Table to submit evaluations:
Use a function to generate evaluations:
Schedule the same expression on each available kernel:
Run a search for a random prime on each parallel kernel:
Watch the scheduling of the evaluations while they are running:
Stop all evaluations as soon as one result has been found using a shared variable:
Write a command that evaluates the arguments of a list in parallel:
Use ParallelCombine for the same purpose:
Submit evaluations for searching adjacent ranges:
Use Parallelize for the same purpose:
The Method setting schedules each item as a single evaluation:
Internally it works similarly to WaitAll:
Scheduling larger evaluations first usually leads to better load balancing:
ParallelSubmit does not evaluate its arguments on the master kernel:
Use a closure to insert the values of local variables into the expressions to be evaluated:
Use With to insert the values of local variables:
Side effects are local to each evaluation:
Use a shared variable to support global side effects:
There is a considerable overhead for scheduling trivial calculations:
The overhead is smaller for generating fewer, but larger, evaluation units:
A sequential evaluation avoids all communication overhead:
Parallelize a functional operation by functional composition with ParallelSubmit:
Watch the scheduling of evaluations taking vastly varying amounts of time:
New in 7