Mathematica 9 is now available
Previous section-----Next section

Dispatching Evaluations to Remote Kernels

ParallelDispatch[h[e1,e2,...,en],{k1,k2,...,km}]
evaluateseion kernel ki and returns h[ r1, r2, ... rn],whereriis the result of evaluatingei. The default list of kernels is $Slaves
ParallelEvaluate[h[e1,e2,...,en],f,comb]
evaluates f[h[e1,e2,...,en]] in parallel by distributing chunks f[h[ei,ei+1,...,ei+k]] to all kernels and combining the results with comb[].
ParallelEvaluate[h[e1,e2,...,en],f]
the default combiner comb is h, if h has attribute Flat, and Join otherwise
ParallelEvaluate[h[e1,e2,...,en]]
the default function f is Identity

Basic parallel dispatch of evaluations.

In ParallelDispatch[h[e1,e2,...,en],{k1,k2,...,km}], the number m of kernels must be at least as large as the number n of expressions. ParallelDispatch has the attribute HoldFirst so that h[e1,e2,...,en] is not evaluated on the master kernel before the parallelization.
ParallelDispatch[{e1,e2,...,en},{k1,k2,...,kn}] is equivalent to Receive[Inner[Send,{k1,k2,...,kn},{e1,e2,...,en}]].
ParallelEvaluate[h[e1,e2,...,en],f,comb] breaks h[e1,e2,...,en] into as many pieces h[ei,ei+1,...,ei+k] as there are remote kernels, evaluates f[h[ei,ei+1,...,ei+k]] in parallel (using ParallelDispatch[]), then combines the results ri using comb[r1,r2,...,rm]. ParallelEvaluate has the attribute HoldFirst so that h[e1,e2,...,en] is not evaluated on the master kernel before the parallelization.
The size of the pieces of the input expression is chosen to be proportional to the remote processor speed estimates for optimal load balancing.


Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.