Slurm_collect {slurmR}R Documentation

Collect the results of a slurm job

Description

This function takes an object of class slurm_job and retrieves the results, this is, combines the R objects generated by each job. Object of class slurm_job.

Usage

Slurm_collect(...)

## S3 method for class 'slurm_job'
Slurm_collect(x, any. = FALSE, wait = 10L, ...)

Arguments

...

Further arguments passed to the method.

x

An object of class slurm_job.

any.

Logical. When TRUE, will collect any output available regardless of whether the job is completed or not.

wait

Integer scalar. Number of seconds to wait before checking the state of a job if the first try returned -1 (no job found).

Details

If the given job has hooks, which is a list of functions, these will be applied sequentially to the set of retrieved results before returning.

Value

By default, it returns a concatenated list of the output files generated by each job. If the job object has a hook, it will apply each hook to the full list before returning. See new_slurm_job.

See Also

Other post submission: Slurm_clean(), Slurm_log(), status()

Examples

## Not run: 
# Collecting a job after calling it
job <- Slurm_EvalQ(slurmR::WhoAmI(), njobs = 4, plan = "wait")
Slurm_collect(job)

# Collecting a job from a previous R session
job <- read_slurm_job("/path/to/a/job/tmp_dir")
Slurm_collect(job)

## End(Not run)

[Package slurmR version 0.5-4 Index]