Parallelization setup for parallelMap.
Defines the underlying parallelization mode for
Also allows to set a “level” of parallelization.
Only calls to
parallelMap with a matching level are parallelized.
The defaults of all settings are taken from your options, which you can
also define in your R profile.
For an introductory tutorial and information on the options configuration, please
go to the project's github page at https://github.com/berndbischl/parallelMap.
parallelStart(mode, cpus, socket.hosts, bj.resources = list(), bt.resources = list(), logging, storagedir, level, load.balancing = FALSE, show.info, suppress.local.errors = FALSE, ...)
parallelStartLocal(show.info, suppress.local.errors = FALSE, ...)
parallelStartMulticore(cpus, logging, storagedir, level, load.balancing = FALSE, show.info, ...)
parallelStartSocket(cpus, socket.hosts, logging, storagedir, level, load.balancing = FALSE, show.info, ...)
parallelStartMPI(cpus, logging, storagedir, level, load.balancing = FALSE, show.info, ...)
parallelStartBatchJobs(bj.resources = list(), logging, storagedir, level, show.info, ...)
parallelStartBatchtools(bt.resources = list(), logging, storagedir, level, show.info, ...)
character(1)] Which parallel mode should be used: “local”, “multicore”, “socket”, “mpi”, “BatchJobs”. Default is the option
parallelMap.default.modeor, if not set, “local” without parallel execution.
integer(1)] Number of used cpus. For local and BatchJobs mode this argument is ignored. For socket mode, this is the number of processes spawned on localhost, if you want processes on multiple machines use
socket.hosts. Default is the option
parallelMap.default.cpusor, if not set,
detectCoresfor multicore mode,
max(1, mpi.universe.size - 1)for mpi mode and 1 for socket mode.
character] Only used in socket mode, otherwise ignored. Names of hosts where parallel processes are spawned. Default is the option
parallelMap.default.socket.hosts, if this option exists.
list] Resources like walltime for submitting jobs on HPC clusters via BatchJobs. See
submitJobs. Defaults are taken from your BatchJobs config file.
list] Analog to
logical(1)] Should slave output be logged to files via
storagedir? Files are named "<iteration_number>.log" and put into unique subdirectories named “parallelMap_log_<nr>” for each subsequent
parallelMapoperation. Previous logging directories are removed on
loggingis enabled. Logging is not supported for local mode, because you will see all output on the master and can also run stuff like
tracebackin case of errors. Default is the option
parallelMap.default.loggingor, if not set,
character(1)] Existing directory where log files and intermediate objects for BatchJobs mode are stored. Note that all nodes must have write access to exactly this path. Default is the current working directory.
character(1)] You can set this so only calls to
parallelMapthat have exactly the same level are parallelized. Default is the option
parallelMap.default.levelor, if not set,
NAwhich means all calls to
parallelMapare are potentially parallelized.
logical(1)] Enables load balancing for multicore, socket and mpi. Set this to
TRUEif you have heterogeneous runtimes. Default is
logical(1)] Verbose output on console for all further package calls? Default is the option
parallelMap.default.show.infoor, if not set,
logical(1)] Should reporting of error messages during function evaluations in local mode be suppressed? Default ist FALSE, i.e. every error message is shown.
[any] Optional parameters, for socket mode passed to
makePSOCKcluster, for mpi mode passed to
makeClusterand for multicore passed to
mc.cleanupare supported for multicore).
Currently the following modes are supported, which internally dispatch the mapping operation to functions from different parallelization packages:
No parallelization with
Multicore execution on a single machine with
Parallelization on batch queuing HPC clusters, e.g., Torque, SLURM, etc., with
For BatchJobs mode you need to define a storage directory through the argument