initCluster: Initialize a Cluster

Description Usage Arguments Value

View source: R/clusterSSH.R

Description

Initialize a cluster running a job scheduling engine such as the Sun Grid Engine (SGE) software

Usage

1
initCluster(userFuns, remFun = NULL, sshOpts = NULL)

Arguments

userFuns

a list which contain at least the functions printId, start, and isRunning

remFun

object as returned from the initSSH function of the remoteFunctionSSH package

sshOpts

named list of arguments passed to remoteFunctionSSH

Value

Returns a list which contains the following functions:

start(fun, input, inputsPerTask=1, runOpts)

eval(fun, input, inputsPerTask=1, runOpts, pollTime)

result(job, selection=TRUE)

numberOfTasks(job)

closeCon()

status(job, raw=FALSE)

The meaning of the arguments is

fun a function taking as argument a list input; it must return a list of the same length as input where each element of the resulting list contains the result associated with the respective element in input
input a list where each element is an input for a calculation
inputsPerTask how many elements in input should be submitted as one task
runOpts a list with arguments for the SGE engine, which are cputime (seconds), vmem, and fsize (megabytes).
pollTime pause in seconds between two consecutive queries of the job status
selection select for which tasks the results should returned
raw should raw output of qstat be returned

The return values of the functions are

start returns job object
eval returns the results associated with the elements of input
result returns the same as eval
status returns either a dataframe with information about the tasks or a character vector with the raw output of qstat

gschnabel/clusterSSH documentation built on Aug. 29, 2020, 7:01 p.m.