When a job is approaching it's maximum run-time limit, LSF sends a SIGINT 10 seconds before sending a SIGKILL (abrupt; not capturable).
R code can handle the SIGINT, but the 10-second heads up might be a bit tight. To adjust this, we can use LSF options -wa <action> and -wt <minutes>, e.g. -wa INT -wt 1 will give us a 60-second heads up.
Idea
Update the default LSF template to signal SIGINT 60 seconds in advance. Something like:
<%
## Signal SIGINT 60 seconds (1 minute) before the run-time limit
if (is.null(resources[["wa"]])) {
resources[["wa"]] <- "INT"
}
if (is.null(resources[["wt"]])) {
resources[["wt"]] <- 1
}
%>
When a job is approaching it's maximum run-time limit, LSF sends a
SIGINT10 seconds before sending aSIGKILL(abrupt; not capturable).R code can handle the
SIGINT, but the 10-second heads up might be a bit tight. To adjust this, we can use LSF options-wa <action>and-wt <minutes>, e.g.-wa INT -wt 1will give us a 60-second heads up.Idea
Update the default LSF template to signal
SIGINT60 seconds in advance. Something like: