snow (version 0.4-3)

snow-timing: Timing SNOW Clusters

Description

Experimental functions to collect and display timing data for cluster computations.

Usage

snow.time(expr)
# S3 method for snowTimingData
print(x, ...)
# S3 method for snowTimingData
plot(x, xlab = "Elapsed Time", ylab = "Node",
                              title = "Cluster Usage", ...)

Arguments

expr

expression to evaluate

x

timing data object to plot or print

xlab

x axis label

ylab

y axis label

title

plot main title

...

additional arguments

Details

snow.time collects and returns and returns timing information for cluster usage in evaluating expr. The return value is an object of class snowTimingData; details of the return value are subject to change. The print method for snowTimingData objects shows the total elapsed time, the total communication time between master and worker nodes, and the compute time on each worker node. The plot, motivated by the display produced by xpvm, produces a Gantt chart of the computation, with green rectangles representing active computation, blue horizontal lines representing a worker waiting to return a result, and red lines representing master/worker communications.

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
cl <- makeCluster(2,type="SOCK")
x <- rnorm(1000000)
tm <- snow.time(clusterCall(cl, function(x) for (i in 1:100) sum(x), x))
print(tm)
plot(tm)
stopCluster(cl)
  
# }

Run the code above in your browser using DataLab