ParallelSum

ParallelSum[expr,{i,imax}]

evaluates in parallel the sum .

ParallelSum[expr,{i,imin,imax}]

starts with i=i_(min).

ParallelSum[expr,{i,imin,imax,di}]

uses steps di.

ParallelSum[expr,{i,{i1,i2,}}]

uses successive values i_(1), i_(2), ..

ParallelSum[expr,{i,imin,imax},{j,jmin,jmax},]

evaluates in parallel the multiple sum .

Details and Options

Examples

open allclose all

Basic Examples  (1)

Options  (7)

Method  (2)

Calculations with vastly differing runtimes should be parallelized as finely as possible:

A large number of simple calculations should be distributed into as few batches as possible:

DistributedContexts  (5)

By default, definitions in the current context are distributed automatically:

Do not distribute any definitions of functions:

Distribute definitions for all symbols in all contexts appearing in a parallel computation:

Distribute only definitions in the given contexts:

Restore the value of the DistributedContexts option to its default:

Possible Issues  (2)

Sums with trivial terms may be slower in parallel than sequentially:

Splitting the computation into as few pieces as possible decreases the parallel overhead:

Sum may employ symbolic methods that are faster than an iterative addition of all terms:

Introduced in 2008
 (7.0)
 |
Updated in 2010
 (8.0)