Paul Johnson
2016-Dec-13 17:05 UTC
[Rd] syntax difference clusterExport in parallel and snow
We got some errors and eventually figured out that parallel::clusterExport second argument is "varlist" while in snow::clusterExport it is "list". The user had loaded parallel first, but did something else which inadvertently loaded snow, then clusterExport failed because we had "varlist" and not "list". Are these different on purpose? pj -- Paul E. Johnson http://pj.freefaculty.org Director, Center for Research Methods and Data Analysis http://crmda.ku.edu To write to me directly, please address me at pauljohn at ku.edu.
Prof Brian Ripley
2016-Dec-13 17:33 UTC
[Rd] syntax difference clusterExport in parallel and snow
On 13/12/2016 17:05, Paul Johnson wrote:> We got some errors and eventually figured out that > parallel::clusterExport second argument is "varlist" while in > snow::clusterExport it is "list". > > The user had loaded parallel first, but did something else which > inadvertently loaded snow, then clusterExport failed because we had > "varlist" and not "list". > > Are these different on purpose?Yes. ('list' is an unhelpful name for an argument that is not a list.) -- Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford
Hervé Pagès
2016-Dec-17 01:07 UTC
[Rd] syntax difference clusterExport in parallel and snow
On 12/13/2016 09:33 AM, Prof Brian Ripley wrote:> On 13/12/2016 17:05, Paul Johnson wrote: >> We got some errors and eventually figured out that >> parallel::clusterExport second argument is "varlist" while in >> snow::clusterExport it is "list". >> >> The user had loaded parallel first, but did something else which >> inadvertently loaded snow, then clusterExport failed because we had >> "varlist" and not "list". >> >> Are these different on purpose? > > Yes. > > ('list' is an unhelpful name for an argument that is not a list.) > >Yes 'list' is a misleading name for a character vector. OTOH I guess snow::clusterExport() was just following the lead of base::save() and base::remove() on this. I don't see 'varlist' as being much less confusing though: it still suggests that the thing is a list and parallel::clusterExport() is now inconsistent with snow::clusterExport(). So it doesn't really address the 1st problem and introduces a new one. Sounds like using a plural form instead of the "list" prefix would be less confusing e.g. 'vars', 'varnames', 'objnames' or something like that. H. -- Herv? Pag?s Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpages at fredhutch.org Phone: (206) 667-5791 Fax: (206) 667-1319