Linux and macOS use MulticoreParam() by default, and the 'workers' inherit the environment (e.g., loaded packages) of the 'manager'. Windows doesn't support this mode, and instead uses SnowParam() by default; likely you'll be able to reproduce the error on your system by using SnowParam(), perhaps via register(SnowParam()) or explicitly in your function.
Likely, your function assumes that it has access to a variable defined in the global environment; this should be made explicit by passing that variable as an argument. Here's an illustration of the principle (not exactly your error) > m = matrix(0, 26, 26, dimnames = list(letters, LETTERS)) > library(BiocParallel) > bplapply(1:3, function(...) rownames(m), BPPARAM = MulticoreParam(2)) [[1]] [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" [20] "t" "u" "v" "w" "x" "y" "z" [[2]] [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" [20] "t" "u" "v" "w" "x" "y" "z" [[3]] [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" [20] "t" "u" "v" "w" "x" "y" "z" > bplapply(1:3, function(...) rownames(m), BPPARAM = SnowParam(2)) Error: BiocParallel errors 2 remote errors, element index: 1, 2 1 unevaluated and other errors first remote error: Error in rownames(m): object 'm' not found and the solution (by passing 'm' explicitly to the function) > bplapply(1:3, function(..., m) rownames(m), m = m, BPPARAM = SnowParam(2)) [[1]] [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" [20] "t" "u" "v" "w" "x" "y" "z" [[2]] [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" [20] "t" "u" "v" "w" "x" "y" "z" [[3]] [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" [20] "t" "u" "v" "w" "x" "y" "z" Martin On 11/22/21, 12:15 PM, "Bioc-devel on behalf of Daniel, Dimitrov" <bioc-devel-boun...@r-project.org on behalf of daniel.dimit...@uni-heidelberg.de> wrote: Dear BioConductor developers, Two windows users of a package that I'm developing (soon to be submitted to BioC) have encountered the same error <https://github.com/saezlab/liana/issues/25>: ``` Error: BiocParallel errors � element index: 1, 2, 3 � first error: invalid length of row names ``` This error is not reproducible in either Mac, nor Linux, and from my search I could pin point it to differences in which variables from the parent environment are handled on Windows. The package that seems to be throwing this error is *scuttle*, and in particular the summarizeAssayByGroup function's call to BiocParallel. Any help would be appreciated. Kindest regards, Daniel Dimitrov [[alternative HTML version deleted]] _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel