Slurm template: Signal SIGINT by default to allow R code to catch it gracefully
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 66/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- r
调研方向
定位 Slurm 模板以及 plan(..., resources = list(signal = ...)) 背后的资源处理逻辑;先检查调度器特定的默认值和显式 signal 值目前是如何传递的。完成标准是 Slurm 默认使用 B:INT@60,显式提供的 signal 仍然有效,并且在项目对模板有覆盖的情况下,相关现有测试已更新或新增。
由索引模型根据 Issue 内容生成。
描述
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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
futureverse/future.batchtools 的其他 Issue
-
feature/resources scheduler/lsf
难度 2/5 1-3 小时 新手友好度 68/100
futureverse/future.batchtools#105 ·
-
feature/resources scheduler/sge
难度 4/5 3-5 天 新手友好度 50/100
futureverse/future.batchtools#104 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
futureverse/future.batchtools#102 ·
-
难度 4/5 3-5 天 新手友好度 15/100
-
难度 3/5 1-2 天 新手友好度 35/100
查看 futureverse/future.batchtools 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 78/100
-
难度 1/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 69/100
Merck/metalite.ae#261 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
-
[R][Parquet] ParquetReaderProperties does not expose page_checksum_verification, so a corrupt page CRC reads silently可能重新可做 关联的 PR 已关闭且未合并。 未关闭Component: R Type: enhancement
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复