Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

makeClusterFunctions

Create a ClusterFuntions object.


Description

Use this funtion when you implement a backend for a batch system. You must define the functions specified in the arguments.

Usage

makeClusterFunctions(name, submitJob, killJob, listJobs, getArrayEnvirName,
  class = NULL, ...)

Arguments

name

[character(1)]
Name of cluster functions.

submitJob

[function(conf, reg, job.name, rscript, log.file, job.dir, resources, ...)]
Function to submit a new job. Must return a SubmitJobResult object.
The arguments are:
conf [environment]: The user configuration.
reg [Registry]: The registry.
job.name [character(1)]: Name of job, used if the job is displayed on the batch system. This is just for display and not an id!
rscript [character(1)]: File path to R script that is used to execute the job.
log.file [character(1)]: File path where log file (.Rout) has to be placed.
job.dir [character(1)]: Directory where all files relating to this job are placed.
resources [list]: Freely definable list of required resources for this job, e.g. walltime or memory.

killJob

[function(conf, reg, batch.job.id)]
Function to kill a job on the batch system. Make sure that you definately kill the job! Return value is currently ignored.
The arguments are:
conf [environment]: The user configuration.
reg [Registry]: The registry.
batch.job.id [character(1)]: Batch job id, as produced by submitJob.
Set killJob to NULL if killing jobs cannot be supported.

listJobs

[function(conf, reg)]
List all jobs on the batch system for the current user / registry. This includes queued, running, held, idle, etc. jobs. Must return an integer vector of batch job ids, same format as they are produced by submitJob. It does not matter if you return a few job ids too many (e.g. all for the current user instead of all for the current registry), but you have to include all relevant ones. The arguments are:
conf [environment]: The user configuration.
reg [Registry]: The registry.
Set listJobs to NULL if listing jobs cannot be supported.

getArrayEnvirName

[function()]
Returns the name of the environment variable specifying the array ID. Should return NA if not supported.

class

[character(1)]
Optional class name for cluster functions object. Useful to provide a nice print method which might show additional information about the workers. Default is NULL.

...

[any]
Currently ignored.

See Also


BatchJobs

Batch Computing with R

v1.8
BSD_2_clause + file LICENSE
Authors
Bernd Bischl <bernd_bischl@gmx.net>, Michel Lang <michellang@gmail.com>, Henrik Bengtsson <henrikb@braju.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.