adegenet icon indicating copy to clipboard operation
adegenet copied to clipboard

Global option for parallel processing

Open zkamvar opened this issue 8 years ago • 7 comments

Right now for anything dealing with genlight objects, parallel processing is dependent on whether or not the package parallel is installed:

glSim(..., parallel = require("parallel"))

It can be a pain to specify parallel = FALSE for all the functions when dealing with genlight. I propose to add a global option adegenet.parallel to be set when the package is loaded in a similar fashion to dplyr: https://github.com/hadley/dplyr/blob/master/R/zzz.r

This way, the checking could be done with the option, as opposed to loading the parallel package:

options(adegenet.parallel = FALSE)
glSim(..., parallel = getOption("adegenet.parallel"))

I'm just putting this here so I can open a pull request later 😄

zkamvar avatar Oct 15 '16 23:10 zkamvar

Great idea :)

thibautjombart avatar Oct 20 '16 13:10 thibautjombart

I thought parallel was installed automatically now with R ?

thierrygosselin avatar Jan 04 '17 14:01 thierrygosselin

@thierrygosselin it's not a matter of installing the package but passing parameters to various functions.

romunov avatar Jan 04 '17 16:01 romunov

@thierrygosselin, there have been a history of problems with parallel on windows, but the main issue this would fix is testing on clusters (as was brought up in #128).

zkamvar avatar Jan 04 '17 17:01 zkamvar

Ha ! ok great!

thierrygosselin avatar Jan 04 '17 17:01 thierrygosselin

I can't remember: has this been implemented - shall I close the issue?

thibautjombart avatar Jan 09 '17 12:01 thibautjombart

No, it has not.

Sent from my iPhone

On Jan 9, 2017, at 04:16, Thibaut Jombart [email protected] wrote:

I can't remember: has this been implemented - shall I close the issue?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.

zkamvar avatar Jan 09 '17 13:01 zkamvar