scheduleTaskList: Minimize Expression Start Time

Description Usage Arguments Details Value References Examples

Description

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

Usage

1
2
3
scheduleTaskList(graph, maxWorker = 2L, exprTime = NULL,
  exprTimeDefault = 1e-05, sizeDefault = as.numeric(utils::object.size(1L)),
  overhead = 8e-06, bandwidth = 1.5e+09)

Arguments

graph

object of class DependGraph as returned from inferGraph

maxWorker

integer maximum number of processors

exprTime

time in seconds to execute each expression

exprTimeDefault

numeric time in seconds to execute a single expression. This will only be used if exprTime is NULL.

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.

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)

makeParallel documentation built on May 2, 2019, 9:40 a.m.