LSF broken for runtimes given in HH:MM:SS format
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- hpc, python
调研方向
从 LSFCluster 入口点开始,检查其 walltime 值如何传入生成的作业脚本。将接受的运行时格式与链接的 LSF 文档以及所示的 01:00:00 和无效值示例进行比较。有效输入得到适当处理且无效输入产生清晰、可执行的结果,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I ran into a really strange issue all of a sudden which took me quite a while to figure out.
Turns out, I had changed from using a walltime="01:00" to a walltime of walltime="01:00:00". This is unexpected because SLURM supports the HH:MM:SS format and some of the documentation presents walltimes in this format.
Currently the walltime seems to be passed down directly to the generated jobscript.
Example
cluster = LSFCluster(
queue="hpc",
cores=4,
memory="8GB",
walltime="01:00:00",
)
client = Client(
cluster,
)
Produces:
2026-07-28 16:09:26,984 - dask_jobqueue.lsf - DEBUG - Job script:
#!/usr/bin/env bash
#BSUB -J dask-worker
#BSUB -q hpc
#BSUB -n 4
#BSUB -R "span[hosts=1]"
#BSUB -M 8000
#BSUB -W 01:00:00
Indeed putting any string in there just gets directly interpolated into the jobscript (tested with 01:abc:00).
Unfortunately misconfiguration gives a very misleading error trace:
2026-07-28 16:17:22,553 - dask_jobqueue.core - DEBUG - Executing the following command to command line
bsub< /tmp/tmpbydzjudm.sh 2> /dev/null
2026-07-28 16:17:22,565 - tornado.application - ERROR - Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f5e03c7afd0>>, <Task finished name='Task-98' coro=<SpecCluster._correct_state_internal() done, defined at /zhome/1a/a/219376/Code/qim-naturarv3d-compression/.pixi/envs/default/lib/python3.14/site-packages/distributed/deploy/spec.py:352> exception=RuntimeError('Command exited with non-zero exit code.\nExit code: 255\nCommand:\nbsub< /tmp/tmpbydzjudm.sh 2> /dev/null\nstdout:\n\nstderr:\n\n')>)
Traceback (most recent call last):
File "/zhome/1a/a/219376/Code/qim-naturarv3d-compression/.pixi/envs/default/lib/python3.14/site-packages/tornado/ioloop.py", line 758, in _run_callback
ret = callback()
File "/zhome/1a/a/219376/Code/qim-naturarv3d-compression/.pixi/envs/default/lib/python3.14/site-packages/tornado/ioloop.py", line 782, in _discard_future_result
future.result()
~~~~~~~~~~~~~^^
File "/zhome/1a/a/219376/Code/qim-naturarv3d-compression/.pixi/envs/default/lib/python3.14/site-packages/distributed/deploy/spec.py", line 396, in _correct_state_internal
await asyncio.gather(*worker_futs)
File "/zhome/1a/a/219376/Code/qim-naturarv3d-compression/.pixi/envs/default/lib/python3.14/asyncio/tasks.py", line 723, in _wrap_awaitable
return await awaitable
^^^^^^^^^^^^^^^
File "/zhome/1a/a/219376/Code/qim-naturarv3d-compression/.pixi/envs/default/lib/python3.14/site-packages/distributed/deploy/spec.py", line 74, in _
await self.start()
File "/zhome/1a/a/219376/Code/qim-naturarv3d-compression/.pixi/envs/default/lib/python3.14/site-packages/dask_jobqueue/core.py", line 426, in start
out = await self._submit_job(fn)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/zhome/1a/a/219376/Code/qim-naturarv3d-compression/.pixi/envs/default/lib/python3.14/site-packages/dask_jobqueue/lsf.py", line 111, in _submit_job
return await self._call(piped_cmd, shell=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/zhome/1a/a/219376/Code/qim-naturarv3d-compression/.pixi/envs/default/lib/python3.14/site-packages/dask_jobqueue/core.py", line 514, in _call
raise RuntimeError(
...<5 lines>...
)
RuntimeError: Command exited with non-zero exit code.
Exit code: 255
Command:
bsub< /tmp/tmpbydzjudm.sh 2> /dev/null
stdout:
stderr:
Proposed solution
I think it would be nice if the runtime as parsed as a timedelta and then rendered into either HH:MM or just minutes for the LSFCluster specifically. Alternatively, just checking whether the format is HH:MM:SS for LSFCluster and raising an error that clearly explains this footgun would be a good solution as well.
If there is appetite and one of the solutions above is preferred, I would be happy to submit a PR for it.
Relevant LSF documentation: https://www.ibm.com/docs/en/spectrum-lsf/10.1.0?topic=o-w-1
- 主要语言
- Python
- 星标
- 256
- 派生
- 149
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dask/dask-jobqueue 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
dask/dask-jobqueue#701 ·
-
难度 3/5 1-2 天 新手友好度 45/100
dask/dask-jobqueue#699 · 2 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 38/100
dask/dask-jobqueue#692 · 1 条评论 ·
-
bug
难度 4/5 3-5 天 新手友好度 35/100
dask/dask-jobqueue#691 · 7 条评论 ·
-
难度 2/5 半天 新手友好度 45/100
dask/dask-jobqueue#686 · 3 条评论 ·
查看 dask/dask-jobqueue 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
instance instance add
难度 2/5 1-3 小时 新手友好度 68/100
searxng/searx-instances#941 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
FluidNumerics/fluid-walk-blocker#89 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复