orderBottomLevel: Order Nodes By Bottom Level Order

Description Usage Arguments Details Value References Examples

View source: R/order.R

Description

Permute the nodes of the graph so that they are ordered in decreasing bottom level precedence order. The bottom level of a node is the length of the longest path starting at that node and going to the end of the program.

Usage

1

Arguments

graph

TimedTaskGraph

Details

This permutation respects the partial order of the graph, so executing the permuted code will produce the same result as the original code. There are many possible node precedence orders.

Value

integer vector to permute the expressions in x@code

References

Task Scheduling for Parallel Systems, Sinnen, O. claim bottom level order provides good average performance. I'm not sure if this claim holds for general data analysis scripts.

Examples

1
2
3
4
graph <- inferGraph(code = parse(text = "x <- 1:100
y <- rep(1, 100)
z <- x + y"), time = c(1, 2, 1))
bl <- orderBottomLevel(graph)

clarkfitzg/autoparallel documentation built on Nov. 24, 2020, 2:20 p.m.