size: Vector of problem sizes (recycled if needed). The default 1 indicates equality of problem sizes.
balancing: Character, type of balancing to perform, one of c("none", "load", "size", "both").
plot: Logical, if a plot should be drawn.
col: Color of the polygons for work load pieces.
xlim, ylim: Limits for the x and the y axis, respectively (optional).
main: Title of the plot, can be missing.
...: Other arguments passed to polygon.
Details
These functions help determine the optimal number of workers needed for different sized problems ('size' indicates approximate processing time here). The number of workers needed depends on the type of balancing.
For the description of the balancing types, see parDosa.
Returns
clusterSize returns a data frame with approximate processing time as the function of the number of workers (rows, in 1:length(size)) and the type of balancing (c("none", "load", "size", "both")). Approximate processing time is calculated from values in size
without taking into account any communication overhead.
plotClusterSize invisibly returns the total processing time needed for a setting given its arguments. As a side effect, a plot is produced (if plot = TRUE).
## determine the number of workers neededclusterSize(1:5)## visually compare balancing optionsopar <- par(mfrow=c(2,2))plotClusterSize(2,1:5,"none")plotClusterSize(2,1:5,"load")plotClusterSize(2,1:5,"size")plotClusterSize(2,1:5,"both")par(opar)