ParallelProduct
✖
ParallelProduct
Details and Options


- ParallelProduct is a parallel version of Product, which automatically distributes partial multiplications among different kernels and processors.
- ParallelProduct will give the same results as Product, except for side effects during the computation.
- Parallelize[Product[expr,iter,…]] is equivalent to ParallelProduct[expr,iter,…].
- If an instance of ParallelProduct cannot be parallelized it is evaluated using Product.
- The following options can be given:
-
Method Automatic granularity of parallelization DistributedContexts $DistributedContexts contexts used to distribute symbols to parallel computations ProgressReporting $ProgressReporting whether to report the progress of the computation - The Method option specifies the parallelization method to use. Possible settings include:
-
"CoarsestGrained" break the computation into as many pieces as there are available kernels "FinestGrained" break the computation into the smallest possible subunits "EvaluationsPerKernel"->e break the computation into at most e pieces per kernel "ItemsPerEvaluation"->m break the computation into evaluations of at most m subunits each Automatic compromise between overhead and load balancing - Method->"CoarsestGrained" is suitable for computations involving many subunits, all of which take the same amount of time. It minimizes overhead, but does not provide any load balancing.
- Method->"FinestGrained" is suitable for computations involving few subunits whose evaluations take different amounts of time. It leads to higher overhead, but maximizes load balancing.
- The DistributedContexts option specifies which symbols appearing in expr have their definitions automatically distributed to all available kernels before the computation.
- The default value is DistributedContexts:>$DistributedContexts with $DistributedContexts:=$Context, which distributes definitions of all symbols in the current context, but does not distribute definitions of symbols from packages.
- The ProgressReporting option specifies whether to report the progress of the parallel computation.
- The default value is ProgressReporting:>$ProgressReporting.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases

https://wolfram.com/xid/0dqvdhyew1m-f3p5kt

Options (9)Common values & functionality for each option
DistributedContexts (5)
By default, definitions in the current context are distributed automatically:

https://wolfram.com/xid/0dqvdhyew1m-g9gh34

https://wolfram.com/xid/0dqvdhyew1m-clbr3t

Do not distribute any definitions of functions:

https://wolfram.com/xid/0dqvdhyew1m-6xao0

https://wolfram.com/xid/0dqvdhyew1m-kx0x4h

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

https://wolfram.com/xid/0dqvdhyew1m-hu6d1y

https://wolfram.com/xid/0dqvdhyew1m-s80e6

Distribute only definitions in the given contexts:

https://wolfram.com/xid/0dqvdhyew1m-yht7o

https://wolfram.com/xid/0dqvdhyew1m-n7ym7a

Restore the value of the DistributedContexts option to its default:

https://wolfram.com/xid/0dqvdhyew1m-qkhgjy

Method (2)
Calculations with vastly differing runtimes should be parallelized as finely as possible:

https://wolfram.com/xid/0dqvdhyew1m-b82tnj

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

https://wolfram.com/xid/0dqvdhyew1m-bq3f3v

ProgressReporting (2)
Do not show a temporary progress report:

https://wolfram.com/xid/0dqvdhyew1m-o979po

Show a temporary progress report, even if the default $ProgressReporting may be False:

https://wolfram.com/xid/0dqvdhyew1m-nnl4my
![]() |

https://wolfram.com/xid/0dqvdhyew1m-1ygva9

Possible Issues (1)Common pitfalls and unexpected behavior
Products with trivial terms may be slower in parallel than sequentially:

https://wolfram.com/xid/0dqvdhyew1m-oa1jz


https://wolfram.com/xid/0dqvdhyew1m-cffjjh

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

https://wolfram.com/xid/0dqvdhyew1m-epicao

Wolfram Research (2008), ParallelProduct, Wolfram Language function, https://reference.wolfram.com/language/ref/ParallelProduct.html (updated 2010).
Text
Wolfram Research (2008), ParallelProduct, Wolfram Language function, https://reference.wolfram.com/language/ref/ParallelProduct.html (updated 2010).
Wolfram Research (2008), ParallelProduct, Wolfram Language function, https://reference.wolfram.com/language/ref/ParallelProduct.html (updated 2010).
CMS
Wolfram Language. 2008. "ParallelProduct." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/ParallelProduct.html.
Wolfram Language. 2008. "ParallelProduct." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/ParallelProduct.html.
APA
Wolfram Language. (2008). ParallelProduct. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ParallelProduct.html
Wolfram Language. (2008). ParallelProduct. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ParallelProduct.html
BibTeX
@misc{reference.wolfram_2025_parallelproduct, author="Wolfram Research", title="{ParallelProduct}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/ParallelProduct.html}", note=[Accessed: 23-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_parallelproduct, organization={Wolfram Research}, title={ParallelProduct}, year={2010}, url={https://reference.wolfram.com/language/ref/ParallelProduct.html}, note=[Accessed: 23-April-2025
]}