Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Slurm template: Signal SIGINT by default to allow R code to catch it gracefully

Đang mở
#103 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
66/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
r

Hướng nghiên cứu

Xác định template Slurm và phần xử lý tài nguyên phía sau plan(..., resources = list(signal = ...)); trước tiên hãy kiểm tra cách các giá trị mặc định dành riêng cho scheduler và các giá trị signal được chỉ định rõ ràng hiện đang được truyền qua. Công việc được hoàn tất khi giá trị mặc định của Slurm sử dụng B:INT@60, signal được cung cấp rõ ràng vẫn có hiệu lực, và các test hiện có liên quan được cập nhật hoặc bổ sung nếu dự án có coverage cho template.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

feature/resources scheduler/slurm

When a job is approaching it's maximum run-time limit, Slurm sends a SIGTERM 30 seconds before sending a SIGKILL (abrupt; not capturable).

R code cannot handle SIGTERM signals, only SIGINT. If Slurm would signal SIGINT instead, we could capture it internally as an interrupt condition, and using tryCatch(..., interrupt = ...), on.exit(), and likes to gracefully exit, e.g. close connections, checkpoint intermediate results, etc.

Slurm allows us to declare what type of signal, and when, to signal when we approach the run-time limit. This can be done by declaring, e.g. --signal=B:INT@60.

Idea

First, should be able to control the signal explicitly via:

plan(..., resources = list(signal = "INT@60"))

already today.

Second, we could update the default to be signal = "INT@60" by adding the following to the template:

## Resources needed
<%
 ## Default to sending SIGINT 60 seconds before walltime limit 
 ## to allow graceful R-level cleanup/checkpointing
 if (is.null(resources[["signal"]])) {
   resources[["signal"]] <- "B:INT@60"
 }
 ...
%>

Third, alternative to a Slurm-specific resource name, we might harmonize the signal type and signal grace period with what is used by other job schedulers.

Ngôn ngữ chính
R
Star
87
Fork
10
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của futureverse/future.batchtools

Tất cả issue của futureverse/future.batchtools

Issue tương tự

Thêm issue về R

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.