SplitRanks - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Iterator

  

SplitRanks

  

compute the starting ranks and iterations suitable for parallelizing an iterator

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

SplitRanks(n, opts)

Parameters

n

-

nonnegint; number to split

opts

-

(optional) equation(s) of the form option = value; specify options for the SplitRanks command

Options

• 

numtasks = posint

  

Number of tasks. The default is the value of kernelopts(numcpus).

Description

• 

The SplitRanks command computes the starting ranks and number of iterations needed to split an iterator into separate tasks.

• 

It returns a list of two-element sublists. Each sublist consist of a rank and number of iterations. The number of sublists equals the value of the numtasks option.  The number of iterations differ by at most one.

• 

The n parameter is the total number of iterations.

• 

See the example section of RevolvingDoorCombination for a use of this procedure to parallelize a search.

Examples

withIterator:

Split 102 tasks.

SplitRanks102,numtasks=4

1,26,27,26,53,25,78,25

(1)

Compatibility

• 

The Iterator[SplitRanks] command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

Iterator