WaitAll
WaitAll[expr]
waits for all concurrent evaluations represented by EvaluationObject expressions in expr to finish, then returns the resulting expression obtained.
Details and Options
- EvaluationObject expressions are created with ParallelSubmit.
- EvaluationObject expressions may occur anywhere inside expr.
- The ProgressReporting option specifies whether to report the progress of the parallel computation.
- The default value is ProgressReporting:>$ProgressReporting.
Examples
open allclose allBasic Examples (4)
Scope (5)
Applications (4)
Run a search for a random prime on each parallel kernel:
Watch the scheduling of the evaluations while they are running:
Write a command that evaluates the arguments of a list in parallel:
Watch the scheduling of evaluations taking vastly varying amounts of time:
Find such that is prime, scheduling one infinite search loop for each kernel:
Properties & Relations (4)
Evaluate an expression on any parallel kernel:
ParallelEvaluate does the same:
The "FinestGrained" Method setting schedules each item as a single evaluation:
Internally it works similarly to WaitAll[ParallelSubmit[…]]:
Parallelize at the innermost level of a multidimensional table:
Scheduled evaluations no longer needed can be aborted with AbortKernels:
Define a number of tasks with varying runtimes:
Possible Issues (3)
Each evaluation should be waited for exactly once:
The evaluation object has already been completed:
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:
Functions used inside parallel evaluations need to be distributed first:
Text
Wolfram Research (2008), WaitAll, Wolfram Language function, https://reference.wolfram.com/language/ref/WaitAll.html.
CMS
Wolfram Language. 2008. "WaitAll." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WaitAll.html.
APA
Wolfram Language. (2008). WaitAll. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WaitAll.html