From mtmorgan at fhcrc.org  Tue Aug 28 19:29:29 2012
From: mtmorgan at fhcrc.org (Martin Morgan)
Date: Tue, 28 Aug 2012 10:29:29 -0700
Subject: [Rd] parLapply fails to detect default cluster?
In-Reply-To: <5033923B.1050107@fhcrc.org>
References: <5033923B.1050107@fhcrc.org>
Message-ID: <503CFFF9.1030700@fhcrc.org>

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 at 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



[Rd] parLapply fails to detect default cluster?
Martin Morgan