Thank you for the fix, in svn R-devel and 2-15-patched r60447, r60448. Martin

On 08/21/2012 06:50 AM, Martin Morgan wrote:
invoking parLapply without a cluster fails to find a previously
registered cluster

 > library(parallel)
 > setDefaultCluster(makePSOCKcluster(2))
 > parLapply(X=1:2, fun=function(...) {})
Error in cut.default(i, breaks) : invalid number of intervals

This is because in parLapply length(cl) is determined before
defaultCluster(cl) is called. By inspection, this appears to be true of
other high-level functions, but ironically not of parApply.

In defaultCluster, t would also be helpful to check that the detected
cluster, user-supplied or other, is a valid cluster.

diff attached.

Martin


______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to