Skip to content

LSF/OpenLava template: Signal SIGINT by default to allow R to catch it gracefully #105

Description

@HenrikBengtsson

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 limitif (is.null(resources[["wa"]])) {
resources[["wa"]] <- "INT"
}
if (is.null(resources[["wt"]])) {
resources[["wt"]] <- 1
}
%>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions