Learn R Programming

batchtools (version 0.9.17)

Worker: Create a Linux-Worker

Description

R6Class to create local and remote linux workers.

Arguments

Value

[Worker].

Format

An R6Class generator object

Fields

nodename

Host name. Set via constructor.

ncpus

Number of CPUs. Set via constructor and defaults to a heuristic which tries to detect the number of CPUs of the machine.

max.load

Maximum load average (of the last 5 min). Set via constructor and defaults to the number of CPUs of the machine.

status

Status of the worker; one of “unknown”, “available”, “max.cpus” and “max.load”.

Methods

new(nodename, ncpus, max.load)

Constructor.

update(reg)

Update the worker status.

list(reg)

List running jobs.

start(reg, fn, outfile)

Start job collection in file “fn” and output to “outfile”.

kill(reg, batch.id)

Kill job matching the “batch.id”.

Examples

Run this code
if (FALSE) {
# create a worker for the local machine and use 4 CPUs.
Worker$new("localhost", ncpus = 4)
}

Run the code above in your browser using DataLab