Skip to content
Prev 14536 / 21307 Next

[Bioc-devel] What is good convention for package-local BiocParallel param?

My current set-up in a variety of packages is that every parallelizable function has a BPPARAM= argument. This makes it explicit about which steps are being parallelized. Requiring users to respecify BPPARAM= in each function isn?t as annoying as you?d think, because not many steps are actually heavy enough to warrant parallelization.

Ideally, I'd have BPPARAM=bpparam() by default, allowing me to both respond to the register()'d bpparam() as well as any custom argument that might be supplied by the user, e.g., if they don't want to change bpparam(). However, for various reasons (discussed in the other SerialParam() thread), the current default is BPPARAM=SerialParam().

To be honest, I've never thought it necessary to have a global package-specific parameter for parallelization as you've done (for scPipe, presumably). The current options - global across all packages with register(), or local to individual functions with BPPARAM= - seem to be satisfactory in the vast majority of cases. At least to me.

And at least for RNGs, if a function from another package is giving greatly different results upon parallelization (excepting some numerical error with changed order of summation), I'd say that's a bug of some sort. That should be fixed on their end, rather than requiring other packages and users to tiptoe around them.

-A