Created attachment 2051 [details]
Reproducible example and suggested fix
The function 'parLapplyLB' does not perform load balancing (despite the documentation) because it creates a list of jobs with the same length as the length of the cluster (instead of an integer vector or of a list that is longer than the cluster).
The function 'clusterApplyLB' performs load balancing if its argument 'x' is a vector of integer indices.
Load balancing is achieved through the function 'dynamicClusterApply' by the line "if (j <= n) submit(d$node, j)", i.e., the list of jobs that 'parLapplyLB' passes to 'dynamicClusterApply' via 'clusterApplyLB' should be longer than the cluster for j to become smaller than n and load balancing to occur.
Attached a reproducible example, one suggestion to fix 'parLapplyLB', and some timing examples.
Resolved in R-devel