PRODUCTS
Products Overview
Mathematica
Mathematica Student Edition
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Mathematica
Documentation
Knowledge Base
Learning Center
Technical Services
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News
Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE
DOCUMENTATION CENTER
FOR THE LATEST INFORMATION.
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
Mathematica
>
Systems Interfaces & Deployment
>
Parallel Computing
>
Concurrency
>
WaitAll
>
Mathematica
>
Core Language
>
Tuning & Debugging
>
Parallel Computing
>
Concurrency
>
WaitAll
>
BUILT-IN MATHEMATICA SYMBOL
ParallelSubmit
WaitNext
ParallelTry
See Also »
|
Concurrency
Parallel Computing
Summary of New Features in 7.0
New in 7.0: Alphabetical Listing
New in 7.0: Systems Interfaces & Deployment
More About »
WaitAll
WaitAll
[
expr
]
waits for all concurrent evaluations represented by
EvaluationObject
expressions in
expr
to finish, then returns the resulting expression obtained.
MORE INFORMATION
EvaluationObject
expressions are created with
ParallelSubmit
.
EXAMPLES
CLOSE ALL
Basic Examples
(4)
Wait for a single evaluation:
Waiting evaluations are scheduled concurrently on any available parallel kernel:
Wait for all evaluations contained in a sum:
Functions used need to be distributed first:
Wait for a single evaluation:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Waiting evaluations are scheduled concurrently on any available parallel kernel:
In[1]:=
In[2]:=
Out[2]=
Wait for all evaluations contained in a sum:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Functions used need to be distributed first:
In[1]:=
In[2]:=
Out[2]=
In[3]:=
Out[3]=
Scope
(4)
Wait for a single evaluation:
Wait for a number of evaluations in a list:
Wait for evaluations contained in an arbitrarily nested structure:
Wait for evaluations contained in an arbitrary arithmetic expression:
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 search loop for each kernel:
Run them until manually aborted:
Properties & Relations
(4)
Evaluate an expression on any parallel kernel:
ParallelEvaluate
does the same:
The
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:
Measure the time for parallel execution:
Scheduling larger tasks first improves load balancing:
Possible Issues
(2)
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:
SEE ALSO
ParallelSubmit
WaitNext
ParallelTry
MORE ABOUT
Concurrency
Parallel Computing
Summary of New Features in 7.0
New in 7.0: Alphabetical Listing
New in 7.0: Systems Interfaces & Deployment
New in 7