|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
ParallelDo
ParallelDo[expr, {imax}]
evaluates expr in parallel
times.
ParallelDo[expr, {i, imax}]
evaluates expr in parallel with the variable i successively taking on the values 1 through
(in steps of 1).
ParallelDo[expr, {i, imin, imax}]
starts with
.
ParallelDo[expr, {i, imin, imax, di}]
uses steps di.
ParallelDo[expr, {i, {i1, i2, ...}}]
uses the successive values
,
, ....
ParallelDo[expr, {i, imin, imax}, {j, jmin, jmax}, ...]
evaluates expr looping in parallel over different values of j, etc. for each i.
Details and OptionsDetails and Options
- ParallelDo is a parallel version of Do that automatically distributes different evaluations of expr among different kernels and processors.
- If side effects involve unshared variables, they will in general work differently than in Do.
- Parallelize[Do[expr, iter, ...]] is equivalent to ParallelDo[expr, iter, ...].
- ParallelDo takes the same Method option as Parallelize.
- ParallelDo takes the same DistributedContexts option as ParallelTable.
ExamplesExamplesopen allclose all
Basic Examples (3)Basic Examples (3)
ParallelDo works like Do, but in parallel:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| Out[2]= |
No results are returned by ParallelDo:
Use a shared variable to communicate results found to the master kernel:
| In[1]:= |
| In[2]:= |
| Out[2]= |
New in 7 | Last modified in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »

