If your an array job generated through `easypar`'s function run_lsf
,
you can use this function to inspect the logs. The functions takes a process
identifier (PID), and then scans logs in a folder selecting those
belonging to the array jobs run with that PID. For every output file, the
standard LSF closing text "Successfully completed."
is searched for.
If it is not found the relative error file is scanned to find the error message
(grepping an "Error"
term in the file), and displayed to screen. Log
files for jobs run succesfully are compressed into a zip file stored in the log
folders, and error logs are retained. The list of input(s) that are
associated with error logs is also print to screen, and a summary table is retuned.
Arguments
- PID
Process identier, it should appear in the names of the logfiles.
- errors_folder
A folder with logs to inspect.
- input_file
The input file associated to the job, if not
NULL
the inputs for the runs with error are shown to screen.
Examples
# very dummy example function
FUN = function(x, y){ print(x, y) }
# input for 25 array jobs
PARAMS = data.frame(x = runif(25), y = runif(25))
if (FALSE) {
# not run
run_lsf(FUN, PARAMS)
# Once logs are produced... we can inspect them
# inspect using default params (as in job submission)
lsf_logs_inspector(PID = 1234, errors_folder = 'log', input_file = 'EASYPAR_LSF_input_jobarray.csv')
}