MyNixOS website logo
Description

A Simplified Interface for Running Commands on Parallel Processes.

Provides a function that wraps mcparallel() and mccollect() from 'parallel' with temporary variables and a task handler. Wrapped in this way the results of an mcparallel() call can be returned to the R session when the fork is complete without explicitly issuing a specific mccollect() to retrieve the value. Outside of top-level tasks, multiple mcparallel() jobs can be retrieved with a single call to mcparallelDoCheck().

mcparallelDo License Travis-CI Build Status CRAN_Status_Badge Coverage Status

A Simplified Interface for Running Commands on Parallel Processes.

mcparallelDo wraps mcparallel() and mccollect() from 'parallel' with temporary variables and a task handler. Wrapped in this way the results of an mcparallel() call can be returned to the R session when the fork is complete without explicitly issuing a specific mccollect() to retrieve the value. Outside of top-level tasks, multiple mcparallel() jobs can be retrieved with a single call to mcparallelDoCheck(). A warning, like a regular fork these functions do not currently return warnings, only errors.

NOTE: Given that Windows does not support parallalism through forks, the R base functions mcparallel and mccollect do not work. Therefore, although mcparallelDo will work on windows and pass through commands to be evaluated, it has no meaningful effect on Windows.

NOTE2: The package future appears to contain much of the functionality of mcparallelDo and more. Consider using it before using package:mcparallelDo if all you want to do is defer the execution of code. If you want an automatic notification when the code you are running is complete, then consider using package:mcparallelDo.

Purpose

In an interactive session one may be blocked in performing additional work by waiting for a model fit. It is cumbersome to launch an mcparallel fork to perform the work and the manually collect the result via mccollect. Specfically, one is left uncertain about when the work might be completed, requiring either some blocking due to the use of wait = TRUE or some inconvience by repeatedly running mccollect every now and again to see if the computation has finished.

Dependencies

  • parallel (for forking functions)
  • R.utils (for temporary variables)
  • checkmate (for argument checking)
  • R6 (for the management object that keeps track of jobs)

Getting Started

The package should install from source like any other R package.

Status

The package works well, is used in production, and has been on CRAN continuously since 2015-12-09. All issues related to desirable additional functionality. Pull requests, bug reports, and other contributions are welcome.

Author

Russell S. Pierce

License

GPL (>= 2)

Metadata

Version

1.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows