Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#103 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
66/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
r

调研方向

定位 Slurm 模板以及 plan(..., resources = list(signal = ...)) 背后的资源处理逻辑;先检查调度器特定的默认值和显式 signal 值目前是如何传递的。完成标准是 Slurm 默认使用 B:INT@60,显式提供的 signal 仍然有效,并且在项目对模板有覆盖的情况下,相关现有测试已更新或新增。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
R
星标
87
派生
10
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

futureverse/future.batchtools 的其他 Issue

查看 futureverse/future.batchtools 的全部 Issue

相似的 Issue

更多 R Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。