Chapter 8 Parallel Processing

  • If a model function is not thread-safe, the documentation should clearly state that it cannot be run in parallel.

  • Parallel processing should always be implemented on the longest running operation. {note}

  • Parallel processing must be explictly requested by the user.

  • Provide an argument to specify the amount (e.g. number of cores if appropriate) and default the function to run sequentially.

  • Computations should be easily reproducible, even when run in parallel. Parallelism should not be an excuse for irreproducibility. {note}

  • Computational code in other languages (e.g. Cpp, etc.) should pull from R’s random number streams so that setting the seed prior to invoking these routines ensures reproducibility.