Learn R Programming

⚠️There's a newer version (0.9.17) of this package.Take me there.

batchtools

As a successor of the packages BatchJobs and BatchExperiments, batchtools provides a parallel implementation of Map for high performance computing systems managed by schedulers like Slurm, Sun Grid Engine, OpenLava, TORQUE/OpenPBS, Load Sharing Facility (LSF) or Docker Swarm (see the setup section in the vignette).

Main features:

  • Convenience: All relevant batch system operations (submitting, listing, killing) are either handled internally or abstracted via simple R functions
  • Portability: With a well-defined interface, the source is independent from the underlying batch system - prototype locally, deploy on any high performance cluster
  • Reproducibility: Every computational part has an associated seed stored in a data base which ensures reproducibility even when the underlying batch system changes
  • Abstraction: The code layers for algorithms, experiment definitions and execution are cleanly separated and allow to write readable and maintainable code to manage large scale computer experiments

Installation

Install the stable version from CRAN:

install.packages("batchtools")

For the development version, use devtools:

devtools::install_github("mllg/batchtools")

Why batchtools?

The development of BatchJobs and BatchExperiments is discontinued for the following reasons:

  • Maintainability: The packages BatchJobs and BatchExperiments are tightly connected which makes maintenance difficult. Changes have to be synchronized and tested against the current CRAN versions for compatibility. Furthermore, BatchExperiments violates CRAN policies by calling internal functions of BatchJobs.
  • Data base issues: Although we invested weeks to mitigate issues with locks of the SQLite data base or file system (staged queries, file system timeouts, ...), BatchJobs kept working unreliable on some systems with high latency under certain conditions. This made BatchJobs unusable for many users.

BatchJobs and BatchExperiments will remain on CRAN, but new features are unlikely to be ported back. The vignette contains a section comparing the packages.

Resources

Citation

Please cite the JOSS paper using the following BibTeX entry:

@article{,
  doi = {10.21105/joss.00135},
  url = {https://doi.org/10.21105/joss.00135},
  year  = {2017},
  month = {feb},
  publisher = {The Open Journal},
  volume = {2},
  number = {10},
  author = {Michel Lang and Bernd Bischl and Dirk Surmann},
  title = {batchtools: Tools for R to work on batch systems},
  journal = {The Journal of Open Source Software}
}

Related Software

Contributing to batchtools

This R package is licensed under the LGPL-3. If you encounter problems using this software (lack of documentation, misleading or wrong documentation, unexpected behaviour, bugs, ...) or just want to suggest features, please open an issue in the issue tracker. Pull requests are welcome and will be included at the discretion of the author. If you have customized a template file for your (larger) computing site, please share it: fork the repository, place your template in inst/templates and send a pull request.

Copy Link

Version

Install

install.packages('batchtools')

Monthly Downloads

3,097

Version

0.9.10

License

LGPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Michel Lang

Last Published

May 20th, 2018

Functions in batchtools (0.9.10)

makeJobCollection

JobCollection Constructor
makeClusterFunctionsDocker

ClusterFunctions for Docker
batchMapResults

Map Over Results to Create New Jobs
makeClusterFunctionsMulticore

ClusterFunctions for Parallel Multicore Execution
batchtools-package

batchtools: Tools for Computation on Batch Systems
batchtools-deprecated

Deprecated function in the batchtools package
makeClusterFunctionsOpenLava

ClusterFunctions for OpenLava
reduceResults

Reduce Results
reduceResultsList

Apply Functions on Results
showLog

Inspect Log Files
addAlgorithm

Define Algorithms for Experiments
Tags

Add or Remove Job Tags
submitJobs

Submit Jobs to the Batch Systems
addExperiments

Add Experiments to the Registry
findJobs

Find and Filter Jobs
Worker

Create a Linux-Worker
batchReduce

Reduce Operation for Batch Systems
btlapply

Synchronous Apply Functions
cfBrewTemplate

Cluster Functions Helper to Write Job Description Files
execJob

Execute a Single Jobs
cfHandleUnknownSubmitError

Cluster Functions Helper to Handle Unknown Errors
loadResult

Load the Result of a Single Job
cfKillJob

Cluster Functions Helper to Kill Batch Jobs
makeClusterFunctionsSlurm

ClusterFunctions for Slurm Systems
removeRegistry

Remove a Registry from the File System
findConfFile

Find a batchtools Configuration File
grepLogs

Grep Log Files for a Pattern
removeExperiments

Remove Experiments
unwrap

Unwrap Nested Data Frames
cfReadBrewTemplate

Cluster Functions Helper to Parse a Brew Template
findTemplateFile

Find a batchtools Template File
doJobCollection

Execute Jobs of a JobCollection
estimateRuntimes

Estimate Remaining Runtimes
getStatus

Summarize the Computational Status
makeClusterFunctionsSocket

ClusterFunctions for Parallel Socket Execution
makeClusterFunctionsSGE

ClusterFunctions for SGE Systems
getJobTable

Query Job Information
makeExperimentRegistry

ExperimentRegistry Constructor
chunk

Chunk Jobs for Sequential Execution
killJobs

Kill Jobs
makeClusterFunctionsTORQUE

ClusterFunctions for OpenPBS/TORQUE Systems
makeClusterFunctionsSSH

ClusterFunctions for Remote SSH Execution
waitForJobs

Wait for Termination of Jobs
getDefaultRegistry

Get and Set the Default Registry
getErrorMessages

Retrieve Error Messages
makeClusterFunctionsInteractive

ClusterFunctions for Sequential Execution in the Running R Session
runOSCommand

Run OS Commands on Local or Remote Machines
makeClusterFunctionsLSF

ClusterFunctions for LSF Systems
saveRegistry

Store the Registy to the File System
syncRegistry

Synchronize the Registry
makeRegistry

Registry Constructor
testJob

Run Jobs Interactively
makeSubmitJobResult

Create a SubmitJobResult
resetJobs

Reset the Computational State of Jobs
summarizeExperiments

Quick Summary over Experiments
sweepRegistry

Check Consistency and Remove Obsolete Information
runHook

Trigger Evaluation of Custom Function
JoinTables

Inner, Left, Right, Outer, Semi and Anti Join for Data Tables
assertRegistry

assertRegistry
makeJob

Jobs and Experiments
JobNames

Set and Retrieve Job Names
addProblem

Define Problems for Experiments
batchExport

Export Objects to the Slaves
batchMap

Map Operation for Batch Systems
chunkIds

Chunk Jobs for Sequential Execution
makeClusterFunctions

ClusterFunctions Constructor
clearRegistry

Remove All Jobs
loadRegistry

Load a Registry from the File System