[Bioc-devel] multicore on Windows
Pavelka, Norman
NXP at stowers.org
Fri Apr 16 16:40:44 CEST 2010
Hi Herve,
Thanks for your note on 'multicore'. I discovered this package only
recently and found it very attractive. However, the fact that it
was a "Unix-only" package refrained me from starting implementing
it in my packages and functions, because I like my code to be as
platform-independent as possible. Your suggestions below are quite
useful! Thanks!
BTW, do you know why it cannot be installed on Windows? Is there
something special about how Windows treats multicore processors or
simply no-one has written yet the Windows version of some
underlying system library? In other words, is there hope for the
future or is this likely stay a Unix-only package for the
foreseeable future?
Thanks!
Norman
> Hi developers,
>
> In BioC 2.6 we started to see packages using multicore and that's
> great, but currently they almost all fail to pass 'R CMD check' on
> Windows because, unfortunately, multicore is not available for this
> platform.
>
> A nice approach used by the ShortReads package is to:
>
> - put multicore in the Enhances field of your package (instead
> of Suggests);
>
> - adapt the code of your "multicore aware" functions so they
> detect whether multicore is loaded or not (it will be up to
> the user to load it or not before calling the function),
> and have these functions use the multicore capabilities only
> if it's loaded;
>
> - IMPORTANT: the "multicore aware" functions shouldn't try to
> load multicore;
>
> - adapt the documentation for the "multicore aware" functions
> to show the user how to take advantage of the multicore
> capabilities.
>
> This approach has 2 important advantages: (1) your package will build
> and pass check on Windows and (2) it will give the user more control
> especially in the number of nodes that the "multicore aware"
> functions should use.
>
> Please let us know if you have any question or if you need help for
> migrating your package to this approach.
>
> H.
>
> --
> Herv? Pag?s
>
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M2-B876
> P.O. Box 19024
> Seattle, WA 98109-1024
>
> E-mail: hpages at fhcrc.org
> Phone: (206) 667-5791
> Fax: (206) 667-1319
More information about the Bioc-devel
mailing list