Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mc.cores for mclapply in gene_summary defaults to 2; allow user input? #81

Closed
warrenmcg opened this issue Jul 29, 2016 · 1 comment
Closed

Comments

@warrenmcg
Copy link
Collaborator

Related to my other issue (#80), I also noticed that mc.cores is not set when mclapply runs within gene_summary. According to its documentation, it's set to either the MC_CORES environmental variable, or to 2. I don't think this default will work for the typical user, whose computer likely have more than 2 cores but who will also likely not know to set MC_CORES to make use of those cores effectively.

One option is to use a simple fix by setting mc.cores = parallel::detectCores(). Another is to let the user the decide on the number of cores. In either case, the memory footprint may be too big for some computers, depending on their specs (on my machine, the job used roughly ~900 MB RAM per core), and I would guess that the error thrown when the RAM is full will be uninformative, so you may need to consider adding in a safeguard to let users know if their RAM can't handle the number of cores used.

@warrenmcg
Copy link
Collaborator Author

Because my code has been implemented into the devel branch, I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant