[Bioc-devel] multicore on Windows

Hervé Pagès hpages at fhcrc.org
Fri Apr 16 01:46:06 CEST 2010

Hi developpers,

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

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

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.


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