scheduleTaskList: Minimize Expression Start Time

Description Usage Arguments Details Value References Examples

View source: R/scheduleTaskList.R

Description

Implementation of "list scheduling". This is a greedy algorithm that assigns each expression to the earliest possible processor.

Usage

1
2
3
4
scheduleTaskList(graph, platform = Platform(), data = list(),
  orderFun = orderBottomLevel, timeDefault = 1e-05,
  sizeDefault = as.numeric(utils::object.size(1L)), overhead = 8e-06,
  bandwidth = 1.5e+09)

Arguments

graph

TaskGraph as returned from inferGraph

orderFun

function that takes in a graph and returns a permutation of 1:length(graph@code) that respects the topological ordering of the graph.

timeDefault

numeric time in seconds to execute a single expression. Expression times default to this value, with a warning, if we can't find time from graph.

sizeDefault

numeric default size of objects to transfer in bytes

overhead

numeric seconds to send any object

bandwidth

numeric speed that the network can transfer an object between processors in bytes per second. We don't take network contention into account. This will have to be extended to account for multiple machines.

nWorkers

integer maximum number of processors

Details

This function is experimental and unstable. If you're trying to actually speed up your code through parallelism then consider using the default method in schedule for data parallelism. This function rewrites code to use task parallelism. Task parallelism means two or more processors run different R expressions simultaneously.

Value

schedule object of class TaskSchedule

References

Algorithm 10 in Task Scheduling for Parallel Systems, Sinnen (2007)

Examples

1
2
3
4
5
6
7
code <- parse(text = "a <- 100
     b <- 200
     c <- a + b")

g <- inferGraph(code)
s <- scheduleTaskList(g)
plot(s)

clarkfitzg/codedoctor documentation built on Nov. 18, 2020, 4:34 p.m.