clustermq_get_logs: Get/read clustermq cluster job log files

View source: R/cluster.R

clustermq_get_logsR Documentation

Get/read clustermq cluster job log files

Description

If you use "log_file = clustermq_logfile()" in your template, then you can use this function to get the log file paths or directly read the contents of the log files.

Usage

clustermq_get_logs(lines = 0, logfile_dir = NULL)

Arguments

lines

The number of lines of each log file to read. If 0, then the log file paths will be returned; if >0 then the first N lines will be printed; if <0 then the last N lines will be printed.

logfile_dir

The base directory containing all of the logfiles. If not provided, then this is obtained by getOption('clustermq.logfile')

Value

logfile paths or NULL

Examples

clustermq_setup()
tmpl = list(job_mem = '8G', log_file = clustermq_logfile())
fx = function(x, y) x * 2 + y
Q(fx, x=1:3, const=list(y=10), n_jobs=10, job_size=1, template=tmpl)
clustermq_get_logs()             # getting log file paths
clustermq_get_logs(lines=10)     # reading the first 10 lines
clustermq_get_logs(lines=-10)    # reading the list 10 lines

leylabmpi/LeyLabRMisc documentation built on Nov. 3, 2022, 3:45 p.m.