HPC · 高性能计算


1. 介绍

1.1 背景

高性能计算(HPC)是数据科学组中工程纪律最重、容错空间最小的方向。作业跑在共享的领导级集群上,资源按 core-hour 计费与配额,一次提交错误的作业可能占用数百节点数小时;一次编译环境不匹配的失败,浪费的不是分钟而是排队周期。

E 级(Exascale)时代已经到来。据 TOP500 官方数据,截至 2026-06-23 发布的第 67 届榜单,全球已有 5 台系统 HPL 实测持续算力超过 1 EFlop/s,并首次同时在亚洲、北美、欧洲三大洲出现 E 级系统(详见 3.1 节)。系统规模越大、异构程度越高,作业调度、并行策略与环境管理就越复杂——这正是智能体最容易帮上忙、也最容易闯祸的地方。

行业的一个共识性设计洞见来自阿贡国家实验室的实践:「LLM 从不接触调度器」(The LLM never touches a scheduler)。智能体的职责是把科学目标翻译成作业图与环境描述,而放置、并发与容错交给成熟的编排系统(Slurm、Parsl)。这不是保守,而是 L2 工具层与 L3 编排层职责分离的最佳实证。

1.2 定义

高性能计算方向的 AI Harness,是指围绕作业脚本编写、编译环境管理、并行策略设计、作业提交与监控、结果验证等环节,为智能体提供环境上下文装配、受限作业提交工具、调度复用、运行状态记忆与物理级验证的工程承载层。

它不替代 Slurm/PBS/LSF 等调度器,不替代 MPI/OpenMP 并行体系,也不替代领域求解器。它承担的是「让智能体正确理解并使用这套成熟体系」的那一层。

边界上需要澄清三点:

  • HPC Harness 不是「自动跑作业的机器人」。它的产出物是可审查的作业脚本、环境声明与作业图,提交动作受配额与审批约束。
  • HPC Harness 不重造编排层。Slurm 本身就是成熟的编排系统(job array、job dependency、backfill),Harness 的价值在于把自然语言目标翻译成这些引擎能消化的形式。
  • HPC Harness 不做实时调度决策。有研究表明,用云端 API 服务调度 100 个作业需 1~2 小时(详见 3.3 节),实时调度在推理延迟上不可行;可行的路径是推理与约束强制分离

1.3 在 AI Harness 体系中的定位

图 1-1|HPC 六层能力模型:核心在 L2 工具层与 L3 编排层

HPC 六层能力模型(核心在 L2 与 L3) 侧重基于公开案例事实 · LLM 从不接触调度器 L1 上下文工程层 ★★★ 作业脚本约定 · 模块清单 · 版本固定表 L2 工具与执行层(核心) ★★★★ 受限 sbatch 提交器 · MCP 输出 Parsl L3 编排与控制层(核心) ★★★★★ 复用 Slurm 原生编排 · 分层智能体 L4 记忆与状态层 ★★★ 作业历史记账 · 检查点快照 L5 评估与观测层 ★★★★ 物理级 ground truth · 分层评估 L6 治理与安全层 ★★★★★ 配额 · GRES 隔离 · 失控作业防护 核心在 L2 与 L3:LLM 从不接触调度器,智能体产出作业图,放置 / 并发 / 容错由 Slurm / Parsl 承担。

数据来源:基于本文分析绘制的示意图。

高性能计算方向在六层能力模型中的侧重点如下(该侧重分析基于公开案例事实,非标准):

侧重HPC 方向的具体内容
L1 上下文工程层★★★作业脚本约定、模块环境(module)可用清单、分区与 QoS 限制、历史作业效率记录(seff)、编译器与库版本固定表
L2 工具与执行层★★★★受限的 sbatch 提交器、squeue/sacct 只读查询、编译与短跑测试沙箱、MCP 工具 emit 工作流应用(Parsl)
L3 编排与控制层★★★★★复用 Slurm 原生编排(job array、dependency DAG、backfill、topology-aware);planner / executor / analyst 分层智能体
L4 记忆与状态层★★★作业历史与记账(slurmdbd)、检查点文件、环境快照、失败记录
L5 评估与观测层★★★★物理级 ground truth(守恒律、收敛性、实验对照);但评估成本极高(单次模拟可达 1,600~4,400 秒),须分层评估
L6 治理与安全层★★★★★core-hour 配额、QoS 公平性、GRES 设备隔离、作业预算审批、失控作业防护

核心在 L2 与 L3。

L2 是核心,因为 HPC 的工具契约最特殊:智能体不应直接调用 sbatch,而应产出可被工作流引擎承载的作业描述。阿贡的实证(3.2 节)表明,MCP 工具的正确形态是 emit Parsl applications,由 Parsl 负责在集群上的放置、并发与容错——工具层与编排层的分离在此处不是设计偏好,而是被大规模运行验证过的架构事实。

L3 是核心,因为调度器本身就是 HPC 的编排层。Harness 应当复用而非重造:把自然语言目标翻译成 Slurm 能消化的作业图(job array + dependency),而不是在 Slurm 之上再发明一个调度循环。

瓶颈层:L2 与 L5 的交叉。 智能体可以写出语法正确的作业脚本,但无法在没有环境上下文的情况下写对——module 缺失、编译器版本不匹配、GPU 架构不对,都会让作业在排队数小时后瞬间失败。同时,物理级验证成本极高,无法对每次变更做全量回归,必须设计分层评估。

1.4 价值与瓶颈

价值体现在三处:

  • 降低作业编写与调试成本:把「写作业脚本 + 试错编译环境」的循环交给智能体预处理,人把精力放在并行策略与科学问题本身。
  • 把调度知识变成可执行约束:分区选择、资源估算、依赖关系、检查点策略,这些过去靠资深用户记忆的东西,变成智能体每次提交前必须检查的门禁。
  • 探索新的优化空间:ORNL 的研究表明,智能体编排相比演化算法可将 time-to-solution 最高提升 1.7 倍,同时降低计算成本(详见 3.3 节)。

瓶颈同样有三处:

  • 推理延迟:LLM 调度的计算开销大,用云端 API 调度 100 个作业需 1~2 小时,限制实时部署——这正是 Harness 要用「推理与约束强制分离」来解决的问题。
  • 环境漂移:module 环境与编译器、库版本的组合空间巨大,模型训练数据无法覆盖具体集群的真实状态,必须以环境声明与短跑验证兜底。
  • 评估成本:单次模拟 1,600~4,400 秒(据公开报道的阿贡案例),无法高频回归;必须用廉价代理指标先行、昂贵验证按需触发的分层评估。

2. 名词解释

术语英文 / 缩写释义
高性能计算HPC, High Performance Computing使用并行计算集群解决大规模科学与工程计算问题的领域
HPLHigh Performance LinpackTOP500 榜单的排名基准,衡量系统的双精度线性代数持续性能
HPCGHigh Performance Conjugate Gradients以共轭梯度法为基础的补充基准,更贴近真实应用中的稀疏计算与访存模式
HPL-MxPMixed-Precision HPL混合精度版本的 Linpack 基准,反映系统在低精度加速上的能力
EFlop/sExaFLOPS per second每秒 10 的 18 次方次浮点运算,E 级算力的计量单位
SlurmSimple Linux Utility for Resource Management开源作业调度与资源管理系统,HPC 集群的事实标准之一
作业分区PartitionSlurm 中节点的逻辑分组,对应不同的队列、限制与 QoS
通用资源GRES, Generic RESourcesSlurm 中对 GPU 等特殊资源的跟踪机制,经 gres.conf 定义拓扑
整体调度Gang Scheduling多节点作业的所有 rank 要么同时放置、要么不放的调度机制
回填调度Backfill Scheduling在为大作业预留资源的同时,允许短小作业填充空闲时段,提升集群利用率
作业数组Job Array--array 方式一次提交大量近似作业的机制,常用于参数扫描
作业依赖Job Dependency--dependency 声明作业间的先后关系(afterok / afterany 等),构建作业 DAG
多因子优先级Multifactor Priority由 fair-share(衰减半衰期)、作业年龄、分区与 QoS 加权构成的优先级算法
消息传递接口MPI, Message Passing Interface分布式内存并行编程的标准接口,跨节点通信的基石
OpenMPOpen Multi-Processing共享内存多线程并行编程标准,用于节点内并行
PMIxProcess Management Interface for Exascale进程管理接口标准;Slurm 经 --mpi=pmix 启动 MPI 作业并注入进程拓扑环境变量
cgroupControl GroupLinux 内核资源隔离机制;cgroup v2 提供 memory.max、cpuset.cpus 等统一层级控制
模块环境Environment ModulesHPC 集群上管理编译器、MPI 实现与库版本动态加载的机制(module load/unload)
拓扑感知调度Topology-aware Scheduling依据交换机层级建模(topology.conf),使紧耦合作业落在物理相邻节点
ParslParallel Scripting Library面向 Python 的并行工作流库,负责作业的放置、并发与容错;阿贡案例中承载智能体产出的工作流
core-hour核时一个处理器核心运行一小时的计量单位,是 HPC 配额与计费的基本口径
强扩展 / 弱扩展Strong / Weak Scaling固定问题规模增加节点(强)与固定单节点负载增加节点(弱)的扩展性度量
生产者-消费者校验seffSlurm 对已完成作业的效率报告工具,用于历史作业的资源利用率复盘

3. 案例

3.1 案例一:E 级算力时代——TOP500 第 67 届榜单与灵晟登顶

3.1.1 背景

TOP500 榜单以 HPL 基准对全球超算排名,是 HPC 方向最权威的公共事实源。在第 65 届(2025-06-10)与第 66 届(2025-11-17,SC25)榜单上,El Capitan 保持第 1,美国 DOE 实验室的 3 台系统先后进入 E 级,JUPITER 在第 66 届成为欧洲首台 E 级系统。

2026-06-23 发布的第 67 届榜单带来了结构性变化。以下为榜单前十(数据来源:TOP500 官网,A 级):

排名系统机构 / 国家HPL 实测 (EFlop/s)峰值 (PFlop/s)核心数功耗 (kW)
1LineShine(灵晟)国家超级计算深圳中心 / 中国2.1982,735.8213,789,44042,220
2El CapitanLLNL / 美国1.8092,821.1011,340,00029,685
3FrontierORNL / 美国1.3532,055.729,066,17624,607
4AuroraALCF / 美国1.0121,980.019,264,12838,698
5JUPITER BoosterEuroHPC / FZJ / 德国1.0001,226.284,801,34415,794
6HPC7Eni S.p.A. / 意大利0.5715861.133,461,4728,735
7EagleMicrosoft Azure / 美国0.5612846.842,073,600
8HPC6Eni S.p.A. / 意大利0.4779606.973,143,5208,461
9Supercomputer FugakuRIKEN / 日本0.44201537.217,630,84829,899
10AlpsCSCS / 瑞士0.4349574.842,121,6007,124

口径说明(必须显式声明):TOP500 官方表格记录 LineShine 核心数为 13,789,440;而中科院网信工作网的中文报道另称「整机部署超过 245 万个 CPU 核心」。两者为两种统计口径(TOP500 口径通常按 HPL 使用的处理单元计数,中文报道口径可能按物理 CPU 封装计数),本文件以 TOP500 官方数字为准,两种口径并列说明,不做换算。

3.1.2 方案

LineShine(灵晟,中文名来自中科院官网)的关键事实如下:

  • 全球首台 HPL 实测持续算力突破 2 EFlop/s 的超级计算机,也是全球第五台建成投用的 E 级系统。
  • 纯 CPU 架构:全球首个仅用 CPU 即在 HPL 上超过 2 exaflops 持续双精度性能的系统;平台为「LingKun」,处理器为自研 LX2(304 核,1.55 GHz),互联为自研 LingQi,操作系统为麒麟(Kylin)。
  • 效率约 80% 峰值(2.198 / 2.736);能效 52.07 GFlops/Watt(对照组:El Capitan 能效 60.94 GFlops/Watt)。
  • HPCG 第 1:22.00 PFlop/s——说明其在更贴近真实应用的稀疏计算基准上同样领先。
  • HPL-MxP 第 4:7.92 EFlop/s,相对 HPL 仅约 3.6 倍加速——这是纯 CPU 设计(无专用低精度加速器)的直接体现。
  • 这是自 2017 年神威·太湖之光以来中国系统首次登顶 TOP500。

对 Harness 设计的启示在于榜单反差本身:同为 E 级系统,LineShine 选择了无低精度加速器的纯 CPU 路线,其 HPL-MxP/HPL 比值显著低于 GPU 系统的普遍水平。架构选择决定性能画像——智能体在为不同系统生成作业策略时,必须以目标系统的真实架构画像为上下文,而不是套用通用经验。

3.1.3 效果

第 67 届榜单确认了三个结构性事实:

  1. E 级成为常态:5 台系统 HPL 超过 1 EFlop/s,且首次同时在亚洲、北美、欧洲三大洲出现 E 级系统。
  2. 技术路线多元化:纯 CPU(LineShine)、GPU 加速(El Capitan / Frontier / Aurora)、Booster 分层(JUPITER)并存,没有单一最优架构。
  3. 能耗成为一等约束:42,220 kW(LineShine)量级的功耗使能效(GFlops/Watt)成为与峰值性能同级的指标,Green500 等能效榜单的价值随之上升。

对 HPC 方向 Harness 的直接推论是:目标系统画像(架构、互联、精度能力、能效)必须成为 L1 上下文的固定组成,智能体的并行与精度策略建议必须以该画像为前提。

3.2 案例二:阿贡智能体材料筛选——「LLM 从不接触调度器」

3.2.1 背景

材料筛选是 HPC 上的典型批量任务:对海量候选结构逐一运行物理模拟并排序。据行业媒体报道(supercomputing.news,B 级;原始 arXiv 预印本 2026-04-09 提交,未直接抓取原文),阿贡国家实验室在 Aurora 领导级系统上完成了一项智能体驱动的金属有机框架(MOF)筛选工作,目标是筛选 CoRE MOF 2025 数据库中的 5,591 个 MOF 结构,用于大气水收集应用。

3.2.2 方案

该工作的架构设计对本方向最具参考价值:

  • 分层智能体:planner agent(分解目标并动态派生 executor 池)+ executor agents(执行单次模拟)+ data-analyst agent(汇总排序)。
  • 两个 MCP Server:Chemistry MCP(暴露模拟启动工具)与 DataTool MCP(排序)。
  • 关键设计:MCP 工具不直接跑模拟,而是 emit Parsl applications,由 Parsl 负责在 Aurora 上的放置、并发与容错——「The LLM never touches a scheduler.(LLM 从不接触调度器)」。
  • 本地推理:使用开源权重 gpt-oss-120b,经 ALCF 本地推理端点服务,规避 API 成本与数据治理问题。
  • 单次 GCMC(巨正则蒙特卡洛)作业运行在 Intel Data Center GPU Max 1550 的单个 tile 上,使用 GPU 蒙特卡洛代码 gRASPA。

该案例明确指出:这是 MCP 走出 IDE、成为 LLM 与科学计算基础设施之间工具绑定层的真实数据点。

3.2.3 效果

据上述报道(B 级,数字建议核对 arXiv 原文后引用):

  • 产出规模:完成 11,182 次 GCMC 模拟;最大生产运行同时使用 256 个 Aurora 节点
  • 扩展性:弱扩展(固定每节点 9 个 MOF,1→256 节点)保持平坦;强扩展在 8→32 节点近线性,256 节点时效率降至 64.9%
  • 编排开销可控:智能体编排开销每次 60~90 秒,对比单次 GCMC 作业的 1,600~4,400 秒,占比小。
  • 可靠性 84%:25 次扩展实验中 21 次成功;4 次失败全部源于 LLM 输出畸形的工具调用参数,而非编排层
  • 科学产出:筛选出的前 20% MOF 在 298 K、相对湿度 60%→10% 区间内水工作容量达 7.06 mol/kg

三条可直接迁移的工程结论:

  1. 参数格式错误是智能体失败的主要来源,且可通过工具参数的模式校验在调用前拦截——这应成为 L2 工具契约的强制项。
  2. 编排开销与单作业时长之比(60~90 秒 vs 1,600~4,400 秒)说明智能体层在长周期科学作业上是可行的,前提是编排频率与作业粒度匹配。
  3. 已知局限须如实记录:v1 预印本未同行评审;256 节点在 10,624 节点的 Aurora 上远未铺满;没有与手写 Parsl 工作流做 head-to-head 对比。该案例证明的是架构可行性,不是全面优越性。

3.3 案例三:LLM 作业调度的可能与不可能——ORNL 的实证与边界

3.3.1 背景

「能不能让 LLM 直接做作业调度」是 HPC 智能化最自然的设想,也是最容易踩坑的方向。ORNL 等机构的研究团队(DOE grant DE-SC0024387)对此给出了目前最完整的实证:论文以 LLM 推理用于多目标 HPC 作业调度为主题,发表于 arXiv(2506.02025)并被 ACM 数字图书馆收录(A 级来源)。

3.3.2 方案

该研究的系统设计强调推理与约束强制的分离

  • ReAct 风格(Reason + Act)调度智能体:含 scratchpad memory 跟踪调度历史,通过自然语言反馈精化决策。
  • 约束强制模块:独立于 LLM 的确定性模块保证调度决策的可行性与安全。论文结论明确表述:「推理与约束强制的分离确保了系统可靠性(The separation of reasoning from constraint enforcement ensures system reliability)」。
  • 实验设置:7 个真实 HPC 工作负载场景(异构混合、突发模式、对抗性案例等),作业规模 10~100;对比基线为 FCFS、SJF 与 Google OR-Tools;使用 OpenAI O4-Mini 与 Anthropic Claude 3.7 两个模型。
  • 真实 trace 验证:使用阿贡 Polaris 系统(560 计算节点,每节点 512 GB 内存)2024-11 提交的 100 个作业的公开作业日志。

3.3.3 效果

该研究给出的结论是一组成对的正反结果,必须同时引用:

  • 正面:LLM 调度器在等待时间与周转时间上大幅改善(可比拟理想化 SJF),同时资源利用率与吞吐不劣于基线;负向指标无显著离群值。
  • 反面(关键局限)计算开销大——用当前云端 API 服务调度 100 个作业需 1~2 小时,限制实时部署。

沿同一方向的延续工作是 ORNL 在 ISC 2026(2026-06-23,德国汉堡)发表的「Toward Agentic HPC」:提出含持久模型服务、可扩展智能体编排与面向 HPC 应用及调度器通用接口的框架,显式处理批处理调度、失败与异构加速器;在材料设计与气象建模两个应用上,跨多个前沿 LLM,相比演化算法 time-to-solution 最高提升 1.7 倍,同时降低计算成本(来源:ISC 官方议程,A/B 级)。

本案例对 Harness 设计的三条结论:

  1. LLM 调度的瓶颈不是「智能」而是推理延迟——因此 Harness 的正确姿势是把 LLM 的推理放在低频决策点(作业图设计、策略选择),把高频决策留给确定性机制。
  2. 约束强制必须是独立的确定性模块,不得依赖模型自我约束——这与 L2/L6 分层的治理设计一致。
  3. 真实 trace 是必要的验证手段:合成场景难以暴露调度器的真实行为,内部评估应建立在历史作业日志之上。

4. 实践标准

4.1 AGENTS.md 规范

标准来源声明:以下为本文提出的高性能计算方向 AGENTS.md 标准建议稿。截至目前,不存在由官方机构、行业协会或标准组织发布的 HPC 方向 AGENTS.md 规范原文,AGENTS.md 属社区约定而非标准。本建议稿继承数据科学组级 AGENTS.md 全部条款,并针对 HPC 方向收紧与扩展。

# AGENTS.md —— 高性能计算(HPC)

> 继承数据科学组级 AGENTS.md 全部条款。本节为高性能计算方向的收紧与扩展。
> 本文件为标准建议稿,业界尚无官方标准版本。

## 角色与边界

- 本 Agent 是**科学目标的作业翻译者与提交守门人**:可以读环境、写作业脚本、做资源估算、发起受限提交、分析作业效率。
- 不可以直接执行的操作:直接操作调度器守护进程、修改分区与 QoS 配置、绕过配额与审批、取消他人作业、修改共享文件系统的他人数据。
- **智能体不直接生成调度决策**:调度放置、并发与容错交由成熟编排系统(Slurm / Parsl)承担;本 Agent 的产出是作业描述与作业图,不是调度指令序列。
- 资源使用的最终审批权归集群管理员与项目负责人,不归本 Agent。

## 环境假设

- 调度器:Slurm(须确认版本线与可用命令;PBS / LSF 等其他调度器须显式声明,命令不得混用)。
- 模块环境:Environment Modules 或 Lmod(须先 `module avail` 确认可用清单,再生成加载指令)。
- 编译器与库:GCC / Intel / Cray 工具链、MPI 实现(OpenMPI / MPICH / Cray MPICH)、数学库版本——**每次会话开始时确认并固定版本**,写进环境声明。
- 分区与 QoS:须确认账户、可用 partition、QoS 限制、每作业核心 / 节点 / 时长上限。
- 异构资源:GPU / GRES 拓扑可用时才生成 GPU 作业;未知时禁止假设设备型号。
- **以上任一项未知时,先查询或询问,不要猜**。环境未知时生成的作业脚本默认会排队数小时后失败。

## 上下文加载顺序(Context Budget)

1. 任务与验收口径(必须):科学目标、目标精度、完成判据
2. 集群环境声明:调度器版本、分区 / QoS、配额余额、可用时长窗口(必须)
3. 模块环境可用清单与版本固定表(必须)
4. 项目既有作业脚本范例:资源参数、模块加载、提交方式的既有约定
5. 历史作业效率记录(seff / sacct):同类作业的真实资源用量与利用率
6. 应用特性:可扩展性(强 / 弱扩展数据)、检查点能力、单作业时长
7. 目标系统架构画像:CPU / GPU 型号、互联、精度能力、能效特征
8. 数据位置与 I/O 约束:输入数据所在文件系统、共享 / 本地存储策略

- 禁止把整个集群文档一次性注入;环境信息按上述优先级裁剪。

## 工具契约

| 工具 | 用途 | 模式 | 约束 |
|---|---|---|---|
| 模块与环境查询 | module avail / list、版本确认 | 只读 | 结果写入环境声明,不得凭记忆生成 module 名 |
| 队列与记账查询 | squeue / sacct / seff | 只读 | 用于提交前预估与提交后监控 |
| 编译与短跑沙箱 | 编译、单元级短跑验证 | 受限执行 | 限登录节点短时或专用调试分区;禁止在登录节点长跑 |
| 作业提交器 | 受限 sbatch 提交 | 受限写 | 仅限已获授权的账户 / 分区 / 配额内;提交前必须通过检查清单 |
| 工作流引擎接口 | emit 作业描述到 Parsl 等引擎 | 受限写 | 优先经工作流引擎承载,禁止绕过引擎直接操控调度细节 |
| 文件系统 | 读写项目目录、检查点 | 受限写 | 不得写他人目录与系统目录 |

- 工具参数必须做模式校验;**参数格式错误在调用前拦截,不得靠重试碰运气**(依据:智能体实验中 4 次失败全部源于畸形的工具调用参数)。
- 每次提交记录:作业 ID、分区、节点数、核心数、预计时长、实际时长与利用率。

## 任务执行流程(SOP)

1. **澄清**:复述科学目标,确认完成判据(精度、收敛标准、样本量)、目标系统与完成窗口。
2. **环境盘点**:确认调度器、模块环境、编译器与库版本、分区 / QoS、配额;生成环境声明。
3. **资源估算**:依据历史 seff 数据与应用扩展性估算节点数、核心数、内存与时长;无历史数据时先做小规模标定作业。
4. **策略设计**:确定并行策略(MPI 进程 / OpenMP 线程 / GPU 任务划分)、作业数组与依赖图、检查点与重试策略。
5. **计划卡点**:资源估算与成本(core-hour)超过阈值时,经人确认后进入提交。
6. **短跑验证**:在调试分区以小规模短跑验证脚本正确性(模块加载、路径、I/O、输出格式)。
7. **提交**:受限 sbatch 或经工作流引擎提交;记录作业 ID 与参数。
8. **监控**:跟踪排队与运行状态;异常(OOM、节点故障、超时)按失败策略处理。
9. **验证**:完成后执行验收判据检查(收敛性、守恒律、与基准对照),生成效率报告(利用率、扩展性)。
10. **归档**:环境声明、脚本、日志、结果与效率报告归档;更新历史作业效率记录。

## 验证与证据要求

- 每条数值结论必须来自**实际执行结果**,禁止由模型凭记忆或估算生成。
- **物理级验收判据优先**:收敛残差、守恒律偏差(能量 / 质量 / 动量)、与已知解析解或基准结果的对照。
- 扩展性结论必须来自实际测量:强扩展效率、弱扩展平坦性须给出节点区间与数值。
- 资源利用率必须复盘:申请量与实际用量之比,持续超配或低配都须在归档中标记。
- 主动报告反例:验证失败、利用率异常、结果与预期不符,必须如实报告。
- 结论分「已验证 / 部分验证 / 未验证」三档列出。

## 失败与升级策略

- 同类失败重试不超过 2 次;第 3 次改变策略或升级。
- **作业排队超预期**:检查分区选择与资源申请是否过大;考虑 job array 拆分或错峰。
- **作业启动即失败**:优先排查模块加载、路径、I/O 与架构匹配;不得盲目重提。
- **OOM / 内存超限**:调大内存申请或检查数据分块;禁止通过反复重试碰运气。
- **配额不足**:停止提交,报告所需 core-hour 与现有余额,升级给项目负责人。
- **结果不收敛**:报告残差与判据差距,禁止降低收敛标准换取「完成」。
- **工具参数格式错误**:停止重试,修正调用构造;多次出现则上报工具契约缺陷。
- 升级时携带:任务、作业 ID、脚本、环境声明、失败输出片段、已尝试方案、建议下一步。

## 安全与合规红线

- 不得绕过配额、审批与 QoS 限制。
- 不得提交无检查点、无时长上限的失控作业;长作业必须有检查点策略。
- 不得占用超出任务需要的资源;资源申请须与估算依据挂钩。
- 不得删除或覆盖他人与公共目录的数据。
- 不得在生成物(日志、脚本注释、报告)中泄漏凭据与敏感配置。
- 涉及出口管制、数据跨境的计算任务,须确认已完成相应审批。
- 不得伪造作业结果、效率数据或收敛结论。

## 禁止事项

- 禁止在环境未知(调度器、模块、编译器版本任一未知)时生成可提交的作业脚本。
- 禁止直接调用或模拟调度器的内部决策;调度由调度器与工作流引擎承担。
- 禁止在登录节点执行长时计算。
- 禁止在没有历史数据或标定的情况下拍脑袋申请大规模资源。
- 禁止用「大概」「通常」替代具体的节点数、core-hour 与时长数字。
- 禁止把未执行的推测当作验证结果报告。
- 禁止跨方向复制通用模板;HPC 的资源约束与验证判据与数据分析、深度研究有实质差异。

## 输出格式

- 结论先行 → 证据(作业 ID + 环境声明 + 执行记录 + 验收判据结果)→ 不确定性 → 建议。
- 资源参数统一带单位;范围用「~」连接;百分比数值与 % 之间无空格。
- 作业脚本与配置使用带语言标记的代码块。
- 效率报告用表格列出:申请量、实际用量、利用率、扩展性结论。
- 环境声明固定包含:调度器版本、模块清单、编译器与库版本、分区 / QoS、配额余额。

## 评估与自检

- [ ] 环境声明完整,编译器与库版本已固定并记录
- [ ] 资源估算有依据(历史 seff 数据或标定作业)
- [ ] 作业脚本经过短跑验证,模块加载与路径全部正确
- [ ] 检查点与重试策略已设置;无失控作业风险
- [ ] 提交在配额与审批范围内,core-hour 成本已确认
- [ ] 工具参数经模式校验,无格式错误重试
- [ ] 完成后验收判据(收敛性 / 守恒律 / 基准对照)已执行
- [ ] 利用率与扩展性已复盘并归档
- [ ] 未直接操控调度器;作业图由 Slurm / 工作流引擎承载
- [ ] 失败与异常均已记录,反例未被隐瞒

4.2 SKILL.md 规范

标准来源声明:以下为本文提出的高性能计算方向 SKILL.md 标准建议稿,同样不存在官方标准原文。其验证判据部分以 HPC 通行工程实践为依据,流程部分为工程建议。

---
name: hpc-job-pipeline
description: 高性能计算作业从环境确认到提交、监控与验证的标准执行流程。适用于把科学计算任务翻译为作业脚本与作业图、批量参数扫描、编译环境配置与作业效率复盘等任务。触发场景:任何需要在 HPC 集群上提交、修改或诊断计算作业的智能体任务。
version: 1.0
created: 2026-09-12
---

# HPC 作业流水线标准流程

## 适用场景

- 将科学计算 / 工程仿真任务翻译为可提交的作业脚本与作业图。
- 批量参数扫描(job array)与多阶段流水线(job dependency)构建。
- 编译环境配置:模块加载、编译器与库版本固定、构建验证。
- 作业失败诊断与效率复盘(seff / sacct 分析)。
- 不适用场景:集群管理操作(分区配置、用户管理)、实时调度决策。

## 前置条件

- 调度器类型与版本已确认;作业命令(sbatch / squeue / scancel)可用。
- 账户具备目标分区的提交权限;配额余额可查。
- 模块环境可查询;编译器与 MPI / 库版本可固定。
- 应用可执行文件或源码可用;单作业的基线资源需求已知或有历史数据。
- 输入数据位置与文件系统策略已确认。

## 输入

| 输入项 | 必需 | 说明 |
|---|---|---|
| 科学目标与验收判据 | 是 | 精度、收敛标准、样本量、完成窗口 |
| 应用与脚本约定 | 是 | 项目既有作业脚本范例与提交约定 |
| 目标分区与 QoS | 是 | 分区名、限制与优先级 |
| 资源预算 | 是 | 可用 core-hour 上限与时长窗口 |
| 环境声明模板 | 否 | 版本固定表、模块清单格式 |
| 历史作业效率记录 | 否 | 同类作业的 seff / sacct 数据 |

## 输出

| 输出项 | 必需 | 说明 |
|---|---|---|
| 作业脚本 / 作业图 | 是 | 含资源参数、模块加载、依赖与检查点策略 |
| 环境声明 | 是 | 调度器、模块、编译器与库版本、分区、配额 |
| 资源估算 | 是 | 节点 / 核心 / 内存 / 时长及估算依据 |
| 提交与监控记录 | 是 | 作业 ID、状态变化、异常事件 |
| 验证结果 | 是 | 验收判据(收敛 / 守恒 / 基准对照)执行结果 |
| 效率报告 | 是 | 申请量、实际用量、利用率、扩展性结论 |

## 执行步骤

1. **确认环境**
   查询调度器版本、分区与 QoS、配额、模块可用清单;固定编译器与库版本并写入环境声明;任一未知则先查询或询问,禁止猜测。

2. **澄清验收判据**
   明确科学目标对应的完成判据:收敛残差阈值、守恒律容差、样本量与对照基准。

3. **资源估算**
   查询历史同类作业的 seff / sacct 记录;无历史数据时先提交小规模标定作业;给出节点数、核心数、内存、时长及依据。

4. **设计并行与作业结构**
   确定 MPI / OpenMP / GPU 任务划分;批量任务设计 job array;多阶段任务用 job dependency 构建作业图;长作业设计检查点与重试策略。

5. **计划卡点**
   资源估算与 core-hour 成本超过阈值时,提交人工确认;未确认不进入提交。

6. **短跑验证**
   在调试分区以小规模短跑验证:模块加载、路径与 I/O、输出格式、判据输出可解析;失败则修正后重验。

7. **提交与监控**
   受限提交并记录作业 ID;跟踪排队与运行状态;异常按失败策略处理,禁止盲目重提。

8. **完成验证**
   执行验收判据:收敛性检查、守恒律偏差计算、与基准或解析解对照;不达标不得标记为完成。

9. **效率复盘**
   对比申请量与实际用量,计算利用率与扩展性;持续超配或低配在报告中标记。

10. **归档**
    环境声明、脚本、日志、验证结果与效率报告归档;更新历史作业效率记录,供后续估算复用。

## 质量标准(DoD)

环境与脚本:

- [ ] 环境声明完整:调度器版本、模块清单、编译器与库版本、分区 / QoS
- [ ] 作业脚本经短跑验证,模块加载与路径全部正确
- [ ] 并行参数(进程数 / 线程数 / GPU 分配)与目标系统架构匹配
- [ ] 检查点与重试策略已设置,无失控作业风险

资源与成本:

- [ ] 资源估算有历史数据或标定作业依据
- [ ] core-hour 成本已预估并在预算内
- [ ] 利用率复盘完成,超配 / 低配已标记

验证与证据:

- [ ] 验收判据(收敛 / 守恒 / 基准对照)全部执行并记录数值
- [ ] 每条数值结论来自实际执行结果
- [ ] 扩展性结论有实测数据支撑(如适用)
- [ ] 结论分已验证 / 部分验证 / 未验证三档

治理:

- [ ] 提交在授权账户、分区与配额范围内
- [ ] 超阈值成本经人工确认
- [ ] 作业图由调度器 / 工作流引擎承载,未直接操控调度决策
- [ ] 全部失败与异常已记录,反例未隐瞒

## 常见失败与处理

| 失败现象 | 根因 | 处理方式 |
|---|---|---|
| 作业排队数小时后启动即失败 | 模块缺失 / 版本不匹配 / 路径错误 | 回到短跑验证;修正环境声明后重提;禁止盲目重试 |
| OOM 被杀 | 内存申请过小或数据分块不当 | 调大内存申请或改分块策略;复盘利用率 |
| 强扩展效率骤降 | 通信开销超过计算收益 | 减小进程数或改混合并行;报告扩展性拐点 |
| 长作业超时被终止 | 无检查点或时长估算过低 | 增加检查点与续算设计;按分段作业图重提 |
| 工具调用参数格式错误 | 模型输出畸形参数 | 停止重试;启用参数模式校验;多次出现上报契约缺陷 |
| 配额不足提交失败 | 未先查余额 | 停止提交;报告所需 core-hour 并升级 |
| 结果不收敛但作业「正常结束」 | 判据未执行或阈值错误 | 执行判据检查;不达标不得标记完成 |
| 智能体被要求实时调度 | 角色越界 | 拒绝并说明:调度由调度器承担;推理延迟使实时 LLM 调度不可行 |

## 示例

**任务**:在 Slurm 集群上对某求解器做 16 组参数扫描。

1. 确认环境:Slurm 23.x 线;模块 `solver/2.1`、`gcc/13.2`、`openmpi/4.1` 可用;分区 `gpu` 与 `debug` 可用;账户剩余配额确认。
2. 验收判据:每组参数能量守恒偏差小于 1e-6,结果与已有基准算例偏差小于 1%。
3. 资源估算:查 sacct,同类单作业 4 节点 / 8 小时,利用率 82%;16 组估算约 512 core-hour。
4. 结构设计:`sbatch --array=0-15` 提交 16 组;每组独立输出目录与检查点;失败组经 `--dependency=afternotok` 触发重跑。
5. 计划卡点:512 core-hour 在授权预算内,无需额外审批。
6. 短跑验证:在 `debug` 分区以 1 节点 / 30 分钟验证模块加载、输入路径与输出格式。
7. 提交与监控:正式提交至 `gpu` 分区,记录各作业 ID;1 组因输入参数笔误失败。
8. 完成验证:15 组守恒偏差与基准偏差达标;失败组修正后重跑达标。
9. 效率复盘:申请 4 节点 / 8 小时,实际平均 6.5 小时,利用率 81%,标记为正常区间。
10. 归档:环境声明、脚本模板、效率记录与验证结果归档,更新历史估算依据。

4.3 落地检查清单

4.3.1 上下文层(L1)

  • [ ] 集群环境声明模板可用:调度器版本、分区 / QoS、配额、模块清单
  • [ ] 编译器与库版本固定表已建立,且随会话刷新
  • [ ] 项目作业脚本范例可被检索
  • [ ] 历史作业效率记录(seff / sacct)可作为资源估算依据被检索
  • [ ] 目标系统架构画像(CPU / GPU、互联、精度能力)已纳入上下文

4.3.2 工具与执行层(L2)

  • [ ] 作业提交器为受限形态:授权账户、分区、配额三重限定
  • [ ] 工具参数有模式校验,畸形参数在调用前拦截
  • [ ] 队列与记账查询(squeue / sacct / seff)为只读
  • [ ] 编译与短跑验证在调试分区或登录节点短时限内执行
  • [ ] 每次提交记录作业 ID、参数、时长与利用率

4.3.3 编排与控制层(L3)

  • [ ] 批量任务使用 job array,多阶段任务使用 job dependency 构建作业图
  • [ ] 未重造调度循环;放置、并发与容错由 Slurm / 工作流引擎承担
  • [ ] 长作业有检查点与续算设计
  • [ ] 智能体不被允许做实时调度决策;推理仅在低频决策点介入

4.3.4 记忆与状态层(L4)

  • [ ] 作业历史与记账数据可追溯
  • [ ] 环境声明与脚本随结果归档
  • [ ] 检查点文件可定位、可续算
  • [ ] 失败记录(原因、处理、结局)可被后续会话检索

4.3.5 评估与观测层(L5)

  • [ ] 每个任务的验收判据(收敛 / 守恒 / 基准对照)在提交前显式声明
  • [ ] 分层评估:廉价代理指标先行,昂贵全量验证按需触发
  • [ ] 数值结论全部来自执行结果,无模型生成数值
  • [ ] 扩展性与利用率有实测复盘
  • [ ] 反例与不达标结果如实报告

4.3.6 治理与安全层(L6)

  • [ ] core-hour 配额与预算护栏已设置,超限须审批
  • [ ] GRES 设备隔离生效,作业不得访问未经申请的设备
  • [ ] 无失控作业:全部作业有时长上限与检查点
  • [ ] 他人数据与系统目录不可写
  • [ ] 凭据与敏感配置不出现在脚本、日志与报告中

5. 总结

高性能计算方向对 AI Harness 的核心诉求可以概括为一句话:让智能体把科学目标翻译成成熟体系能消化的作业图,而不是让智能体取代成熟体系。

这个方向的三条证据链支撑同一结论:

  1. 架构证据:阿贡的智能体材料筛选证明,智能体层与调度器层的分离(MCP 工具 emit Parsl applications)在大规模真实运行中可行且可靠——84% 的可靠性中,失败全部来自工具参数格式而非编排层,这恰是 Harness 工具契约可以拦截的部分。
  2. 边界证据:ORNL 的 LLM 调度研究证明,LLM 在调度质量上可媲美理想化基线,但推理延迟(100 个作业 1~2 小时)决定了它不能进入实时路径——「推理与约束强制分离」因此不是可选优化,而是架构必需。
  3. 规模证据:TOP500 第 67 届榜单(2026-06-23)显示 E 级系统在三大洲同时出现且技术路线多元,系统画像(架构、精度、能效)差异巨大——智能体的并行与精度建议必须绑定具体系统画像,通用经验在此失效。

HPC 方向还拥有一个值得强调的有利条件:物理级 ground truth。收敛性、守恒律、基准对照,都是不依赖人类主观判断的验收标准。缺点是评估成本高(单次模拟 1,600~4,400 秒),所以分层评估——廉价代理先行、昂贵验证按需——是这个方向 Harness 设计的必修课。

一句话概括本方向的主张:约束前置、调度复用、验证物理、成本可算。

信息缺口声明

  1. 不存在高性能计算方向 AGENTS.md / SKILL.md 的官方或行业公认标准原文。4.1 与 4.2 节均为本文提出的标准建议稿。
  2. 阿贡智能体 MOF 筛选案例的全部数字(5,591 个 MOF、11,182 次 GCMC 模拟、256 节点、60~90 秒编排开销、84% 可靠性、64.9% 强扩展效率、7.06 mol/kg 水工作容量)来自行业媒体对 arXiv 预印本(2026-04-09 提交)的转述,预印本未同行评审且原文未直接抓取,引用时建议核对 arXiv 原文。
  3. LLM 调度研究的数字(100 个作业 1~2 小时、Polaris 560 节点、7 个场景、10~100 作业规模)来自 arXiv 论文与 ACM DL 页面的转述,建议核对原文;「ORNL agentic HPC 最高 1.7 倍 time-to-solution 提升与成本降低」来自 ISC 2026 官方议程条目,全文细节以 IEEE Xplore 收录版本为准。
  4. TOP500 第 67 届榜单数据以 TOP500 官网 2026-06-23 发布为准;LineShine 核心数存在 TOP500 表格口径(13,789,440)与中文报道口径(「超过 245 万个 CPU 核心」)两种统计口径,本文以 TOP500 为准并列说明,未做换算。
  5. Slurm 版本线未在官方渠道核实,4.1 / 4.2 节示例中的版本表述为示意,引用时应以 SchedMD 官方文档为准。
  6. HPC 智能体方向的行业渗透率、平均 ROI、集群规模分布——本次检索未获得可靠公开数据,本文未给出任何此类数字。
  7. 4.2 节示例中的模块名、分区名、配额数值均为示意性构造,不代表任何真实集群。

6. 参考资料

  1. LineShine Debuts No. 1 on TOP500, Enters New Global Exascale Era — TOP500,2026-06-23。https://www.top500.org/news/lineshine-debuts-no-1-top500-enters-new-global-exascale-era?pubDate=20260628
  2. TOP500 第 67 届榜单(2026-06)— TOP500。https://top500.org/lists/top500/2026/06
  3. 超算前沿进展(LineShine 中文佐证报道)— 中国科学院网信工作网,2026-07。https://ecas.cas.cn/xxkw/kbcd/201115_149942/ml/xxhjsyjcss/202607/t20260707_5114814.html
  4. Agentic MOF Screening on Aurora(「LLM 从不接触调度器」案例)— supercomputing.news,2026。https://www.supercomputing.news/hpc/agentic-mof-screening-aurora
  5. Evaluating the Efficacy of LLM-based Reasoning for Multi-objective HPC Job Scheduling — arXiv 2506.02025。https://arxiv.org/html/2506.02025v2
  6. 同上论文 ACM DL 收录页 — ACM Digital Library。https://dl.acm.org/doi/full/10.1145/3731599.3767584
  7. 同上论文 ORNL 成果页 — Oak Ridge National Laboratory。https://impact.ornl.gov/en/publications/evaluating-the-efficacy-of-llm-based-reasoning-for-multiobjective/
  8. Toward Agentic HPC(ISC 2026 议程条目)— ISC High Performance 2026。https://isc.app.swapcard.com/event/isc-high-performance-2026/planning/UGxhbm5pbmdfNDQ0MDE5OA==
  9. Slurm Workload Manager 官方文档(Quick Start)— SchedMD。https://slurm.schedmd.com/quickstart.html
  10. Cluster Slurm 架构与实践 — AI Infrastructure。https://ai-infrastructure.net/cluster-slurm
  11. What is Slurm? — CoreWeave。http://www.coreweave.com/topics/what-is-slurm

HPC · High-Performance Computing

1. Introduction

1.1 Background

High-performance computing (HPC) is the direction in the data science group with the heaviest engineering discipline and the least tolerance for error. Jobs run on shared leadership-class clusters, where resources are billed and quota-limited by core-hour; a single incorrectly submitted job can occupy hundreds of nodes for hours, and a failure caused by a mismatched compilation environment wastes not minutes but an entire queuing cycle.

The Exascale era has arrived. According to official TOP500 data, as of the 67th list released on 2026-06-23, five systems worldwide have sustained measured HPL performance above 1 EFlop/s, and for the first time Exascale systems appeared simultaneously across three continents — Asia, North America, and Europe (see Section 3.1). The larger and more heterogeneous the system, the more complex job scheduling, parallel strategy, and environment management become — which is precisely where agents can be most helpful, and also most likely to cause trouble.

A consensus design insight in the industry comes from the practice of Argonne National Laboratory: "The LLM never touches a scheduler" (LLM 从不接触调度器). The agent's responsibility is to translate scientific goals into a job graph and environment description, while placement, concurrency, and fault tolerance are left to mature orchestration systems (Slurm, Parsl). This is not conservatism, but the best evidence of the separation of responsibilities between the L2 tool layer and the L3 orchestration layer.

1.2 Definition

The AI Harness for the high-performance computing direction is an engineering carrier layer that, around job-script authoring, compilation environment management, parallel strategy design, job submission and monitoring, and result verification, provides agents with environment-context assembly, restricted job-submission tools, scheduler reuse, run-status memory, and physical-level verification.

It does not replace schedulers such as Slurm/PBS/LSF, nor the MPI/OpenMP parallel model, nor domain solvers. Its responsibility is the layer that "enables the agent to correctly understand and use this mature system."

Three points on its boundaries need to be clarified:

  • HPC Harness is not a "robot that runs jobs automatically." Its deliverables are auditable job scripts, environment declarations, and job graphs, and submission actions are constrained by quotas and approvals.
  • HPC Harness does not reinvent the orchestration layer. Slurm itself is a mature orchestration system (job array, job dependency, backfill); the value of Harness lies in translating natural-language goals into forms these engines can digest.
  • HPC Harness does not make real-time scheduling decisions. Studies show that scheduling 100 jobs via a cloud API service takes 1–2 hours (see Section 3.3); real-time scheduling is infeasible given inference latency; the viable path is the separation of reasoning from constraint enforcement.

1.3 Position in the AI Harness System

图 1-1|HPC 六层能力模型:核心在 L2 工具层与 L3 编排层

HPC 六层能力模型(核心在 L2 与 L3) 侧重基于公开案例事实 · LLM 从不接触调度器 L1 上下文工程层 ★★★ 作业脚本约定 · 模块清单 · 版本固定表 L2 工具与执行层(核心) ★★★★ 受限 sbatch 提交器 · MCP 输出 Parsl L3 编排与控制层(核心) ★★★★★ 复用 Slurm 原生编排 · 分层智能体 L4 记忆与状态层 ★★★ 作业历史记账 · 检查点快照 L5 评估与观测层 ★★★★ 物理级 ground truth · 分层评估 L6 治理与安全层 ★★★★★ 配额 · GRES 隔离 · 失控作业防护 核心在 L2 与 L3:LLM 从不接触调度器,智能体产出作业图,放置 / 并发 / 容错由 Slurm / Parsl 承担。

数据来源:基于本文分析绘制的示意图。

High-performance computing emphasizes the following across the six-layer capability model (this emphasis analysis is based on public case facts, not a standard):

LayerEmphasisSpecifics for the HPC Direction
L1 Context Engineering★★★Job-script conventions, available environment-module (module) inventory, partition and QoS limits, historical job-efficiency records (seff), pinned table of compiler and library versions
L2 Tools and Execution★★★★Restricted sbatch submitter, squeue/sacct read-only queries, compile-and-short-run test sandbox, MCP tool emit workflow application (Parsl)
L3 Orchestration and Control★★★★★Reuse of Slurm-native orchestration (job array, dependency DAG, backfill, topology-aware); planner / executor / analyst layered agents
L4 Memory and State★★★Job history and accounting (slurmdbd), checkpoint files, environment snapshots, failure records
L5 Evaluation and Observability★★★★Physical-level ground truth (conservation laws, convergence, experimental control); but evaluation cost is extremely high (a single simulation can reach 1,600–4,400 s), so evaluation must be layered
L6 Governance and Security★★★★★core-hour quotas, QoS fairness, GRES device isolation, job budget approval, protection against runaway jobs

The core is in L2 and L3.

L2 is core because HPC's tool contract is the most special: an agent should not directly call sbatch, but should produce a job description that a workflow engine can carry. Argonne's evidence (Section 3.2) shows that the correct form of an MCP tool is to emit Parsl applications, with Parsl responsible for placement, concurrency, and fault tolerance on the cluster — the separation of the tool layer from the orchestration layer here is not a design preference, but an architectural fact validated by large-scale operation.

L3 is core because the scheduler itself is HPC's orchestration layer. Harness should reuse rather than reinvent: translate natural-language goals into a job graph that Slurm can digest (job array + dependency), rather than inventing another scheduling loop on top of Slurm.

Bottleneck layer: the intersection of L2 and L5. An agent can write syntactically correct job scripts, but cannot write them correctly without environment context — a missing module, a compiler version mismatch, or a wrong GPU architecture will make a job fail instantly after hours of queuing. At the same time, physical-level verification is extremely expensive, so a full regression cannot be run on every change, and a layered evaluation must be designed.

1.4 Value and Bottlenecks

Value is reflected in three places:

  • Reducing job authoring and debugging cost: leave the "write job script + trial-and-error compile environment" loop to the agent as pre-processing, so people can focus on parallel strategy and the scientific problem itself.
  • Turning scheduling knowledge into executable constraints: partition selection, resource estimation, dependency relations, and checkpoint strategy — things that used to live in the memory of senior users — become checkpoints the agent must verify before every submission.
  • Exploring new optimization space: ORNL research shows that agent orchestration can improve time-to-solution by up to 1.7× over evolutionary algorithms, while lowering computational cost (see Section 3.3).

Bottlenecks also number three:

  • Inference latency: LLM scheduling has high computational overhead; scheduling 100 jobs via a cloud API takes 1–2 hours, limiting real-time deployment — exactly the problem Harness addresses with "the separation of reasoning from constraint enforcement."
  • Environment drift: the combination space of the module environment and compiler/library versions is huge, and model training data cannot cover the real state of a specific cluster; environment declarations and short-run validation must serve as the safety net.
  • Evaluation cost: a single simulation takes 1,600–4,400 s (per the publicly reported Argonne case), making high-frequency regression impossible; a layered evaluation must be used, with cheap proxy metrics first and expensive validation triggered on demand.

2. Glossary

TermEnglish / AbbreviationDefinition
High-performance computingHPC, High Performance ComputingThe field of using parallel computing clusters to solve large-scale scientific and engineering computing problems
HPLHigh Performance LinpackThe ranking benchmark of the TOP500 list; measures a system's sustained double-precision linear-algebra performance
HPCGHigh Performance Conjugate GradientsA supplementary benchmark based on the conjugate-gradient method; closer to the sparse-computation and memory-access patterns of real applications
HPL-MxPMixed-Precision HPLThe mixed-precision version of the Linpack benchmark; reflects a system's capability on low-precision acceleration
EFlop/sExaFLOPS per second10^18 floating-point operations per second; the unit of measurement for Exascale performance
SlurmSimple Linux Utility for Resource ManagementAn open-source job scheduling and resource management system; one of the de-facto standards on HPC clusters
PartitionPartitionA logical grouping of nodes in Slurm, corresponding to different queues, limits, and QoS
Generic resourcesGRES, Generic RESourcesA Slurm mechanism for tracking special resources such as GPUs; topology is defined via gres.conf
Gang schedulingGang SchedulingA scheduling mechanism in which all ranks of a multi-node job are either placed at the same time or not at all
Backfill schedulingBackfill SchedulingWhile reserving resources for large jobs, permits short jobs to fill idle windows, improving cluster utilization
Job arrayJob ArrayA mechanism for submitting many similar jobs at once via --array; commonly used for parameter sweeps
Job dependencyJob DependencyDeclaring ordering relations among jobs via --dependency (afterok / afterany, etc.), building a job DAG
Multifactor priorityMultifactor PriorityA priority algorithm weighted by fair-share (with decayed half-life), job age, and partition and QoS factors
Message Passing InterfaceMPI, Message Passing InterfaceThe standard interface for distributed-memory parallel programming; the cornerstone of cross-node communication
OpenMPOpen Multi-ProcessingA shared-memory multithreaded parallel-programming standard, used for intra-node parallelism
PMIxProcess Management Interface for ExascaleA process-management interface standard; Slurm launches MPI jobs via --mpi=pmix and injects process-topology environment variables
cgroupControl GroupA Linux kernel resource-isolation mechanism; cgroup v2 provides unified hierarchical controls such as memory.max and cpuset.cpus
Environment modulesEnvironment ModulesThe mechanism on HPC clusters for dynamically managing compiler, MPI implementation, and library versions (module load/unload)
Topology-aware schedulingTopology-aware SchedulingModeling based on the switch hierarchy (topology.conf) so tightly coupled jobs land on physically adjacent nodes
ParslParallel Scripting LibraryA parallel workflow library for Python that handles job placement, concurrency, and fault tolerance; in the Argonne case it carries the workflows produced by agents
core-hour核时The billing unit of one processor core running for one hour; the basic measure for HPC quotas and accounting
Strong / weak scalingStrong / Weak ScalingScalability measures: keeping problem size fixed while adding nodes (strong) vs. keeping per-node load fixed while adding nodes (weak)
Producer-consumer checkseffA Slurm efficiency-report tool for completed jobs, used to review the resource utilization of historical jobs

3. Case Studies

3.1 Case 1: The Exascale Era — TOP500's 67th List and LineShine Takes the Top Spot

3.1.1 Background

The TOP500 list ranks the world's supercomputers by the HPL benchmark and is the most authoritative public source of facts for the HPC direction. On the 65th (2025-06-10) and 66th (2025-11-17, SC25) lists, El Capitan held the No. 1 spot, three systems from U.S. DOE laboratories successively reached Exascale, and JUPITER became Europe's first Exascale system on the 66th list.

The 67th list, released on 2026-06-23, brought structural changes. The following is the top ten (data source: TOP500 official site, grade A):

RankSystemInstitution / CountryHPL measured (EFlop/s)Peak (PFlop/s)CoresPower (kW)
1LineShine (灵晟)National Supercomputing Center in Shenzhen / China2.1982,735.8213,789,44042,220
2El CapitanLLNL / USA1.8092,821.1011,340,00029,685
3FrontierORNL / USA1.3532,055.729,066,17624,607
4AuroraALCF / USA1.0121,980.019,264,12838,698
5JUPITER BoosterEuroHPC / FZJ / Germany1.0001,226.284,801,34415,794
6HPC7Eni S.p.A. / Italy0.5715861.133,461,4728,735
7EagleMicrosoft Azure / USA0.5612846.842,073,600
8HPC6Eni S.p.A. / Italy0.4779606.973,143,5208,461
9Supercomputer FugakuRIKEN / Japan0.44201537.217,630,84829,899
10AlpsCSCS / Switzerland0.4349574.842,121,6007,124

Basis-of-calculation note (must be stated explicitly): TOP500's official table records LineShine's core count as 13,789,440; meanwhile the Chinese report from the CAS e-Infrastructure website states "more than 2.45 million CPU cores deployed across the machine." These are two different bases of calculation (the TOP500 basis typically counts the processing units used by HPL, while the Chinese report's basis may count physical CPU packages). This document takes TOP500's official figures as authoritative, and presents both bases side by side without conversion.

3.1.2 Approach

The key facts about LineShine (灵晟, Chinese name per the CAS official site) are as follows:

  • The first supercomputer in the world to break through 2 EFlop/s of sustained measured HPL performance, and also the fifth Exascale system worldwide to be built and put into service.
  • Pure CPU architecture: the global first system to exceed 2 exaflops of sustained double-precision performance on HPL using only CPUs; its platform is "LingKun", its processors are the self-developed LX2 (304 cores, 1.55 GHz), its interconnect is the self-developed LingQi, and its operating system is Kylin (麒麟).
  • Efficiency about 80% of peak (2.198 / 2.736); energy efficiency 52.07 GFlops/Watt (comparison: El Capitan's energy efficiency is 60.94 GFlops/Watt).
  • HPCG No. 1: 22.00 PFlop/s — showing it also leads on the sparse-computation benchmark that is closer to real applications.
  • HPL-MxP No. 4: 7.92 EFlop/s, only about 3.6× acceleration relative to HPL — a direct reflection of the pure CPU design (no dedicated low-precision accelerator).
  • This is the first time a Chinese system has topped the TOP500 list since Sunway TaihuLight in 2017.

The implication for Harness design lies in the contrast of the ranking itself: among systems at the same Exascale level, LineShine chose a pure CPU route without a low-precision accelerator, and its HPL-MxP/HPL ratio is significantly lower than the common level of GPU systems. Architecture choice determines the performance profile — when generating job strategies for different systems, an agent must use the target system's real architectural profile as context, rather than applying generic heuristics.

3.1.3 Results

The 67th list confirmed three structural facts:

  1. Exascale has become the norm: five systems exceed 1 EFlop/s on HPL, and for the first time Exascale systems appeared simultaneously across Asia, North America, and Europe.
  2. Technical routes have diversified: pure CPU (LineShine), GPU acceleration (El Capitan / Frontier / Aurora), and Booster-tiering (JUPITER) coexist; there is no single optimal architecture.
  3. Energy consumption has become a first-class constraint: power at the scale of 42,220 kW (LineShine) makes energy efficiency (GFlops/Watt) a metric on par with peak performance, raising the value of energy-efficiency lists such as Green500.

The direct corollary for HPC-direction Harness is: the target-system profile (architecture, interconnect, precision capability, energy efficiency) must become a fixed component of L1 context, and the agent's parallel and precision strategy suggestions must be premised on that profile.

3.2 Case 2: Argonne Agentic Material Screening — "The LLM Never Touches a Scheduler"

3.2.1 Background

Material screening is a typical batch task on HPC: running physics simulations on a huge set of candidate structures one by one and ranking them. According to industry media reports (supercomputing.news, grade B; the original arXiv preprint was submitted on 2026-04-09 and was not directly fetched), Argonne National Laboratory completed an agent-driven screening of metal-organic frameworks (MOFs) on the Aurora leadership-class system, targeting 5,591 MOF structures from the CoRE MOF 2025 database, for atmospheric water harvesting applications.

3.2.2 Approach

This work's architecture design is the most valuable reference for this direction:

  • Layered agents: a planner agent (decomposes goals and dynamically derives an executor pool) + executor agents (run each single simulation) + a data-analyst agent (aggregates and ranks).
  • Two MCP Servers: the Chemistry MCP (exposes simulation-launch tools) and the DataTool MCP (ranking).
  • Key design: the MCP tools do not directly run simulations; instead they emit Parsl applications, with Parsl responsible for placement, concurrency, and fault tolerance on Aurora — "The LLM never touches a scheduler."
  • Local inference: uses the open-weight gpt-oss-120b served through an ALCF local-inference endpoint, avoiding API cost and data-governance issues.
  • Each GCMC (grand canonical Monte Carlo) job runs on a single tile of an Intel Data Center GPU Max 1550, using the GPU Monte Carlo code gRASPA.

This case explicitly demonstrates that this is a real data point of MCP stepping out of the IDE and becoming the tool-binding layer between LLMs and scientific-computing infrastructure.

3.2.3 Results

Per the above report (grade B; the figures should ideally be cross-checked against the arXiv original before citing):

  • Output scale: completed 11,182 GCMC simulations; the largest production run used 256 Aurora nodes simultaneously.
  • Scalability: weak scaling (fixed 9 MOFs per node, 1→256 nodes) stayed flat; strong scaling was near-linear from 8→32 nodes, with efficiency dropping to 64.9% at 256 nodes.
  • Controllable orchestration overhead: agent orchestration overhead was 60–90 s per run, small relative to a single GCMC job's 1,600–4,400 s.
  • 84% reliability: 21 of 25 scaling experiments succeeded; all 4 failures stemmed from tool-call arguments with malformed LLM output, not the orchestration layer.
  • Scientific output: the top 20% of screened MOFs achieved a water working capacity of 7.06 mol/kg over the range of 298 K and 60%→10% relative humidity.

Three directly transferable engineering conclusions:

  1. Parameter-format errors are the main source of agent failures, and they can be intercepted before invocation via schema validation of tool parameters — this should be a mandatory item of the L2 tool contract.
  2. The ratio of orchestration overhead to single-job duration (60–90 s vs. 1,600–4,400 s) shows that the agent layer is feasible for long-duration scientific jobs, provided orchestration frequency matches job granularity.
  3. Known limitations must be recorded honestly: the v1 preprint is not peer-reviewed; 256 nodes are far from filling Aurora's 10,624 nodes; and there is no head-to-head comparison with hand-written Parsl workflows. This case proves architectural feasibility, not overall superiority.

3.3 Case 3: The Possible and Impossible of LLM Job Scheduling — ORNL's Evidence and Its Limits

3.3.1 Background

"Can an LLM directly do job scheduling?" is the most natural idea for HPC intelligence, and also the direction easiest to get wrong. A research team at ORNL and other institutions (DOE grant DE-SC0024387) has provided the most complete empirical study to date: the paper on using LLM reasoning for multi-objective HPC job scheduling was published on arXiv (2506.02025) and indexed by the ACM Digital Library (grade A source).

3.3.2 Approach

The study's system design emphasizes the separation of reasoning from constraint enforcement:

  • A ReAct-style (Reason + Act) scheduling agent: includes scratchpad memory to track the scheduling history, and refines decisions through natural-language feedback.
  • Constraint-enforcement module: a deterministic module independent of the LLM guarantees the feasibility and safety of scheduling decisions. The paper states its conclusion explicitly: "The separation of reasoning from constraint enforcement ensures system reliability."
  • Experimental setup: 7 real HPC workload scenarios (heterogeneous mixes, burst patterns, adversarial cases, etc.) with job sizes of 10–100; baseline comparisons are FCFS, SJF, and Google OR-Tools; two models are used: OpenAI O4-Mini and Anthropic Claude 3.7.
  • Real-trace validation: uses the public job log of 100 jobs submitted in 2024-11 on Argonne's Polaris system (560 compute nodes, 512 GB memory per node).

3.3.3 Results

The study's conclusion is a set of paired positive and negative results that must be cited together:

  • Positive: the LLM scheduler markedly improves waiting time and turnaround time (comparable to an idealized SJF), while resource utilization and throughput are no worse than baseline; no significant outliers in the negative metrics.
  • Negative (key limitation): high computational overhead — scheduling 100 jobs with a current cloud API service takes 1–2 hours, limiting real-time deployment.

Continuing work in the same direction is ORNL's "Toward Agentic HPC" presented at ISC 2026 (2026-06-23, Hamburg, Germany): it proposes a framework with persistent model serving, scalable agent orchestration, and general-purpose interfaces for HPC applications and schedulers, explicitly handling batch scheduling, failures, and heterogeneous accelerators; on two applications — materials design and weather modeling — across multiple frontier LLMs, it improves time-to-solution by up to 1.7× over evolutionary algorithms while lowering computational cost (source: official ISC agenda, grade A/B).

The three conclusions of this case for Harness design:

  1. The bottleneck of LLM scheduling is not "intelligence" but inference latency — so the correct posture for Harness is to place LLM reasoning at low-frequency decision points (job-graph design, strategy selection) and leave high-frequency decisions to deterministic mechanisms.
  2. Constraint enforcement must be an independent deterministic module and must not rely on the model's self-constraint — consistent with the L2/L6 layered governance design.
  3. Real traces are a necessary validation means: synthetic scenarios struggle to expose a scheduler's real behavior, so internal evaluation should be built on historical job logs.

4. Practice Standards

4.1 AGENTS.md Specification

Standard source statement: the following is this document's proposed draft standard for an HPC-direction AGENTS.md. As of now, no official AGENTS.md specification text for the HPC direction has been released by an official body, industry association, or standards organization; AGENTS.md is a community convention rather than a standard. This draft inherits all clauses of the data-science-group-level AGENTS.md and tightens and extends them for the HPC direction.

# AGENTS.md —— 高性能计算(HPC)

> 继承数据科学组级 AGENTS.md 全部条款。本节为高性能计算方向的收紧与扩展。
> 本文件为标准建议稿,业界尚无官方标准版本。

## 角色与边界

- 本 Agent 是**科学目标的作业翻译者与提交守门人**:可以读环境、写作业脚本、做资源估算、发起受限提交、分析作业效率。
- 不可以直接执行的操作:直接操作调度器守护进程、修改分区与 QoS 配置、绕过配额与审批、取消他人作业、修改共享文件系统的他人数据。
- **智能体不直接生成调度决策**:调度放置、并发与容错交由成熟编排系统(Slurm / Parsl)承担;本 Agent 的产出是作业描述与作业图,不是调度指令序列。
- 资源使用的最终审批权归集群管理员与项目负责人,不归本 Agent。

## 环境假设

- 调度器:Slurm(须确认版本线与可用命令;PBS / LSF 等其他调度器须显式声明,命令不得混用)。
- 模块环境:Environment Modules 或 Lmod(须先 `module avail` 确认可用清单,再生成加载指令)。
- 编译器与库:GCC / Intel / Cray 工具链、MPI 实现(OpenMPI / MPICH / Cray MPICH)、数学库版本——**每次会话开始时确认并固定版本**,写进环境声明。
- 分区与 QoS:须确认账户、可用 partition、QoS 限制、每作业核心 / 节点 / 时长上限。
- 异构资源:GPU / GRES 拓扑可用时才生成 GPU 作业;未知时禁止假设设备型号。
- **以上任一项未知时,先查询或询问,不要猜**。环境未知时生成的作业脚本默认会排队数小时后失败。

## 上下文加载顺序(Context Budget)

1. 任务与验收口径(必须):科学目标、目标精度、完成判据
2. 集群环境声明:调度器版本、分区 / QoS、配额余额、可用时长窗口(必须)
3. 模块环境可用清单与版本固定表(必须)
4. 项目既有作业脚本范例:资源参数、模块加载、提交方式的既有约定
5. 历史作业效率记录(seff / sacct):同类作业的真实资源用量与利用率
6. 应用特性:可扩展性(强 / 弱扩展数据)、检查点能力、单作业时长
7. 目标系统架构画像:CPU / GPU 型号、互联、精度能力、能效特征
8. 数据位置与 I/O 约束:输入数据所在文件系统、共享 / 本地存储策略

- 禁止把整个集群文档一次性注入;环境信息按上述优先级裁剪。

## 工具契约

| 工具 | 用途 | 模式 | 约束 |
|---|---|---|---|
| 模块与环境查询 | module avail / list、版本确认 | 只读 | 结果写入环境声明,不得凭记忆生成 module 名 |
| 队列与记账查询 | squeue / sacct / seff | 只读 | 用于提交前预估与提交后监控 |
| 编译与短跑沙箱 | 编译、单元级短跑验证 | 受限执行 | 限登录节点短时或专用调试分区;禁止在登录节点长跑 |
| 作业提交器 | 受限 sbatch 提交 | 受限写 | 仅限已获授权的账户 / 分区 / 配额内;提交前必须通过检查清单 |
| 工作流引擎接口 | emit 作业描述到 Parsl 等引擎 | 受限写 | 优先经工作流引擎承载,禁止绕过引擎直接操控调度细节 |
| 文件系统 | 读写项目目录、检查点 | 受限写 | 不得写他人目录与系统目录 |

- 工具参数必须做模式校验;**参数格式错误在调用前拦截,不得靠重试碰运气**(依据:智能体实验中 4 次失败全部源于畸形的工具调用参数)。
- 每次提交记录:作业 ID、分区、节点数、核心数、预计时长、实际时长与利用率。

## 任务执行流程(SOP)

1. **澄清**:复述科学目标,确认完成判据(精度、收敛标准、样本量)、目标系统与完成窗口。
2. **环境盘点**:确认调度器、模块环境、编译器与库版本、分区 / QoS、配额;生成环境声明。
3. **资源估算**:依据历史 seff 数据与应用扩展性估算节点数、核心数、内存与时长;无历史数据时先做小规模标定作业。
4. **策略设计**:确定并行策略(MPI 进程 / OpenMP 线程 / GPU 任务划分)、作业数组与依赖图、检查点与重试策略。
5. **计划卡点**:资源估算与成本(core-hour)超过阈值时,经人确认后进入提交。
6. **短跑验证**:在调试分区以小规模短跑验证脚本正确性(模块加载、路径、I/O、输出格式)。
7. **提交**:受限 sbatch 或经工作流引擎提交;记录作业 ID 与参数。
8. **监控**:跟踪排队与运行状态;异常(OOM、节点故障、超时)按失败策略处理。
9. **验证**:完成后执行验收判据检查(收敛性、守恒律、与基准对照),生成效率报告(利用率、扩展性)。
10. **归档**:环境声明、脚本、日志、结果与效率报告归档;更新历史作业效率记录。

## 验证与证据要求

- 每条数值结论必须来自**实际执行结果**,禁止由模型凭记忆或估算生成。
- **物理级验收判据优先**:收敛残差、守恒律偏差(能量 / 质量 / 动量)、与已知解析解或基准结果的对照。
- 扩展性结论必须来自实际测量:强扩展效率、弱扩展平坦性须给出节点区间与数值。
- 资源利用率必须复盘:申请量与实际用量之比,持续超配或低配都须在归档中标记。
- 主动报告反例:验证失败、利用率异常、结果与预期不符,必须如实报告。
- 结论分「已验证 / 部分验证 / 未验证」三档列出。

## 失败与升级策略

- 同类失败重试不超过 2 次;第 3 次改变策略或升级。
- **作业排队超预期**:检查分区选择与资源申请是否过大;考虑 job array 拆分或错峰。
- **作业启动即失败**:优先排查模块加载、路径、I/O 与架构匹配;不得盲目重提。
- **OOM / 内存超限**:调大内存申请或检查数据分块;禁止通过反复重试碰运气。
- **配额不足**:停止提交,报告所需 core-hour 与现有余额,升级给项目负责人。
- **结果不收敛**:报告残差与判据差距,禁止降低收敛标准换取「完成」。
- **工具参数格式错误**:停止重试,修正调用构造;多次出现则上报工具契约缺陷。
- 升级时携带:任务、作业 ID、脚本、环境声明、失败输出片段、已尝试方案、建议下一步。

## 安全与合规红线

- 不得绕过配额、审批与 QoS 限制。
- 不得提交无检查点、无时长上限的失控作业;长作业必须有检查点策略。
- 不得占用超出任务需要的资源;资源申请须与估算依据挂钩。
- 不得删除或覆盖他人与公共目录的数据。
- 不得在生成物(日志、脚本注释、报告)中泄漏凭据与敏感配置。
- 涉及出口管制、数据跨境的计算任务,须确认已完成相应审批。
- 不得伪造作业结果、效率数据或收敛结论。

## 禁止事项

- 禁止在环境未知(调度器、模块、编译器版本任一未知)时生成可提交的作业脚本。
- 禁止直接调用或模拟调度器的内部决策;调度由调度器与工作流引擎承担。
- 禁止在登录节点执行长时计算。
- 禁止在没有历史数据或标定的情况下拍脑袋申请大规模资源。
- 禁止用「大概」「通常」替代具体的节点数、core-hour 与时长数字。
- 禁止把未执行的推测当作验证结果报告。
- 禁止跨方向复制通用模板;HPC 的资源约束与验证判据与数据分析、深度研究有实质差异。

## 输出格式

- 结论先行 → 证据(作业 ID + 环境声明 + 执行记录 + 验收判据结果)→ 不确定性 → 建议。
- 资源参数统一带单位;范围用「~」连接;百分比数值与 % 之间无空格。
- 作业脚本与配置使用带语言标记的代码块。
- 效率报告用表格列出:申请量、实际用量、利用率、扩展性结论。
- 环境声明固定包含:调度器版本、模块清单、编译器与库版本、分区 / QoS、配额余额。

## 评估与自检

- [ ] 环境声明完整,编译器与库版本已固定并记录
- [ ] 资源估算有依据(历史 seff 数据或标定作业)
- [ ] 作业脚本经过短跑验证,模块加载与路径全部正确
- [ ] 检查点与重试策略已设置;无失控作业风险
- [ ] 提交在配额与审批范围内,core-hour 成本已确认
- [ ] 工具参数经模式校验,无格式错误重试
- [ ] 完成后验收判据(收敛性 / 守恒律 / 基准对照)已执行
- [ ] 利用率与扩展性已复盘并归档
- [ ] 未直接操控调度器;作业图由 Slurm / 工作流引擎承载
- [ ] 失败与异常均已记录,反例未被隐瞒

4.2 SKILL.md Specification

Standard source statement: the following is this document's proposed draft standard for an HPC-direction SKILL.md; again, no official standard text exists. Its verification-criteria section is based on common HPC engineering practice, and its process section is an engineering recommendation.

---
name: hpc-job-pipeline
description: 高性能计算作业从环境确认到提交、监控与验证的标准执行流程。适用于把科学计算任务翻译为作业脚本与作业图、批量参数扫描、编译环境配置与作业效率复盘等任务。触发场景:任何需要在 HPC 集群上提交、修改或诊断计算作业的智能体任务。
version: 1.0
created: 2026-09-12
---

# HPC 作业流水线标准流程

## 适用场景

- 将科学计算 / 工程仿真任务翻译为可提交的作业脚本与作业图。
- 批量参数扫描(job array)与多阶段流水线(job dependency)构建。
- 编译环境配置:模块加载、编译器与库版本固定、构建验证。
- 作业失败诊断与效率复盘(seff / sacct 分析)。
- 不适用场景:集群管理操作(分区配置、用户管理)、实时调度决策。

## 前置条件

- 调度器类型与版本已确认;作业命令(sbatch / squeue / scancel)可用。
- 账户具备目标分区的提交权限;配额余额可查。
- 模块环境可查询;编译器与 MPI / 库版本可固定。
- 应用可执行文件或源码可用;单作业的基线资源需求已知或有历史数据。
- 输入数据位置与文件系统策略已确认。

## 输入

| 输入项 | 必需 | 说明 |
|---|---|---|
| 科学目标与验收判据 | 是 | 精度、收敛标准、样本量、完成窗口 |
| 应用与脚本约定 | 是 | 项目既有作业脚本范例与提交约定 |
| 目标分区与 QoS | 是 | 分区名、限制与优先级 |
| 资源预算 | 是 | 可用 core-hour 上限与时长窗口 |
| 环境声明模板 | 否 | 版本固定表、模块清单格式 |
| 历史作业效率记录 | 否 | 同类作业的 seff / sacct 数据 |

## 输出

| 输出项 | 必需 | 说明 |
|---|---|---|
| 作业脚本 / 作业图 | 是 | 含资源参数、模块加载、依赖与检查点策略 |
| 环境声明 | 是 | 调度器、模块、编译器与库版本、分区、配额 |
| 资源估算 | 是 | 节点 / 核心 / 内存 / 时长及估算依据 |
| 提交与监控记录 | 是 | 作业 ID、状态变化、异常事件 |
| 验证结果 | 是 | 验收判据(收敛 / 守恒 / 基准对照)执行结果 |
| 效率报告 | 是 | 申请量、实际用量、利用率、扩展性结论 |

## 执行步骤

1. **确认环境**
   查询调度器版本、分区与 QoS、配额、模块可用清单;固定编译器与库版本并写入环境声明;任一未知则先查询或询问,禁止猜测。

2. **澄清验收判据**
   明确科学目标对应的完成判据:收敛残差阈值、守恒律容差、样本量与对照基准。

3. **资源估算**
   查询历史同类作业的 seff / sacct 记录;无历史数据时先提交小规模标定作业;给出节点数、核心数、内存、时长及依据。

4. **设计并行与作业结构**
   确定 MPI / OpenMP / GPU 任务划分;批量任务设计 job array;多阶段任务用 job dependency 构建作业图;长作业设计检查点与重试策略。

5. **计划卡点**
   资源估算与 core-hour 成本超过阈值时,提交人工确认;未确认不进入提交。

6. **短跑验证**
   在调试分区以小规模短跑验证:模块加载、路径与 I/O、输出格式、判据输出可解析;失败则修正后重验。

7. **提交与监控**
   受限提交并记录作业 ID;跟踪排队与运行状态;异常按失败策略处理,禁止盲目重提。

8. **完成验证**
   执行验收判据:收敛性检查、守恒律偏差计算、与基准或解析解对照;不达标不得标记为完成。

9. **效率复盘**
   对比申请量与实际用量,计算利用率与扩展性;持续超配或低配在报告中标记。

10. **归档**
    环境声明、脚本、日志、验证结果与效率报告归档;更新历史作业效率记录,供后续估算复用。

## 质量标准(DoD)

环境与脚本:

- [ ] 环境声明完整:调度器版本、模块清单、编译器与库版本、分区 / QoS
- [ ] 作业脚本经短跑验证,模块加载与路径全部正确
- [ ] 并行参数(进程数 / 线程数 / GPU 分配)与目标系统架构匹配
- [ ] 检查点与重试策略已设置,无失控作业风险

资源与成本:

- [ ] 资源估算有历史数据或标定作业依据
- [ ] core-hour 成本已预估并在预算内
- [ ] 利用率复盘完成,超配 / 低配已标记

验证与证据:

- [ ] 验收判据(收敛 / 守恒 / 基准对照)全部执行并记录数值
- [ ] 每条数值结论来自实际执行结果
- [ ] 扩展性结论有实测数据支撑(如适用)
- [ ] 结论分已验证 / 部分验证 / 未验证三档

治理:

- [ ] 提交在授权账户、分区与配额范围内
- [ ] 超阈值成本经人工确认
- [ ] 作业图由调度器 / 工作流引擎承载,未直接操控调度决策
- [ ] 全部失败与异常已记录,反例未隐瞒

## 常见失败与处理

| 失败现象 | 根因 | 处理方式 |
|---|---|---|
| 作业排队数小时后启动即失败 | 模块缺失 / 版本不匹配 / 路径错误 | 回到短跑验证;修正环境声明后重提;禁止盲目重试 |
| OOM 被杀 | 内存申请过小或数据分块不当 | 调大内存申请或改分块策略;复盘利用率 |
| 强扩展效率骤降 | 通信开销超过计算收益 | 减小进程数或改混合并行;报告扩展性拐点 |
| 长作业超时被终止 | 无检查点或时长估算过低 | 增加检查点与续算设计;按分段作业图重提 |
| 工具调用参数格式错误 | 模型输出畸形参数 | 停止重试;启用参数模式校验;多次出现上报契约缺陷 |
| 配额不足提交失败 | 未先查余额 | 停止提交;报告所需 core-hour 并升级 |
| 结果不收敛但作业「正常结束」 | 判据未执行或阈值错误 | 执行判据检查;不达标不得标记完成 |
| 智能体被要求实时调度 | 角色越界 | 拒绝并说明:调度由调度器承担;推理延迟使实时 LLM 调度不可行 |

## 示例

**任务**:在 Slurm 集群上对某求解器做 16 组参数扫描。

1. 确认环境:Slurm 23.x 线;模块 `solver/2.1`、`gcc/13.2`、`openmpi/4.1` 可用;分区 `gpu` 与 `debug` 可用;账户剩余配额确认。
2. 验收判据:每组参数能量守恒偏差小于 1e-6,结果与已有基准算例偏差小于 1%。
3. 资源估算:查 sacct,同类单作业 4 节点 / 8 小时,利用率 82%;16 组估算约 512 core-hour。
4. 结构设计:`sbatch --array=0-15` 提交 16 组;每组独立输出目录与检查点;失败组经 `--dependency=afternotok` 触发重跑。
5. 计划卡点:512 core-hour 在授权预算内,无需额外审批。
6. 短跑验证:在 `debug` 分区以 1 节点 / 30 分钟验证模块加载、输入路径与输出格式。
7. 提交与监控:正式提交至 `gpu` 分区,记录各作业 ID;1 组因输入参数笔误失败。
8. 完成验证:15 组守恒偏差与基准偏差达标;失败组修正后重跑达标。
9. 效率复盘:申请 4 节点 / 8 小时,实际平均 6.5 小时,利用率 81%,标记为正常区间。
10. 归档:环境声明、脚本模板、效率记录与验证结果归档,更新历史估算依据。

4.3 Implementation Checklist

4.3.1 Context Layer (L1)

  • [ ] The cluster environment declaration template is available: scheduler version, partition / QoS, quota, module inventory
  • [ ] A pinned table of compiler and library versions is established and refreshed with each session
  • [ ] Project job-script examples are retrievable
  • [ ] Historical job-efficiency records (seff / sacct) are retrievable as a basis for resource estimation
  • [ ] The target-system architectural profile (CPU / GPU, interconnect, precision capability) is included in context

4.3.2 Tool and Execution Layer (L2)

  • [ ] The job submitter is restricted: triple-constrained by authorized account, partition, and quota
  • [ ] Tool parameters have schema validation, intercepting malformed parameters before invocation
  • [ ] Queue and accounting queries (squeue / sacct / seff) are read-only
  • [ ] Compilation and short-run validation are executed within short time limits on a debug partition or login node
  • [ ] Every submission records job ID, parameters, duration, and utilization

4.3.3 Orchestration and Control Layer (L3)

  • [ ] Batch tasks use job arrays, and multi-stage tasks use job dependencies to build a job graph
  • [ ] No scheduling loop is reinvented; placement, concurrency, and fault tolerance are handled by Slurm / the workflow engine
  • [ ] Long jobs have checkpoint and resume design
  • [ ] Agents are not permitted to make real-time scheduling decisions; reasoning only intervenes at low-frequency decision points

4.3.4 Memory and State Layer (L4)

  • [ ] Job history and accounting data are traceable
  • [ ] Environment declarations and scripts are archived with results
  • [ ] Checkpoint files are locatable and resumable
  • [ ] Failure records (cause, handling, outcome) are retrievable by later sessions

4.3.5 Evaluation and Observability Layer (L5)

  • [ ] Each task's acceptance criteria (convergence / conservation / baseline comparison) are explicitly declared before submission
  • [ ] Layered evaluation: cheap proxy metrics first, expensive full validation triggered on demand
  • [ ] All numerical conclusions come from execution results; no model-generated numbers
  • [ ] Scalability and utilization are reviewed from actual measurements
  • [ ] Counter-examples and unqualified results are reported honestly

4.3.6 Governance and Security Layer (L6)

  • [ ] core-hour quota and budget guardrails are set; overruns require approval
  • [ ] GRES device isolation is in effect; jobs cannot access devices they did not request
  • [ ] No runaway jobs: all jobs have a duration cap and checkpoints
  • [ ] Others' data and system directories are not writable
  • [ ] Credentials and sensitive configuration do not appear in scripts, logs, or reports

5. Summary

The core demand of the high-performance-computing direction for AI Harness can be summarized in one sentence: let the agent translate scientific goals into a job graph that mature systems can digest, rather than letting the agent replace mature systems.

Three evidence chains in this direction support the same conclusion:

  1. Architecture evidence: Argonne's agentic material screening proves that the separation of the agent layer from the scheduler layer (MCP tools emit Parsl applications) is feasible and reliable in large-scale real runs — in the 84% reliability, all failures came from tool-parameter formats rather than the orchestration layer, which is exactly the part the Harness tool contract can intercept.
  2. Boundary evidence: ORNL's LLM-scheduling study proves that an LLM can match an idealized baseline in scheduling quality, but inference latency (100 jobs in 1–2 hours) determines that it cannot enter the real-time path — "the separation of reasoning from constraint enforcement" is therefore not an optional optimization, but an architectural necessity.
  3. Scale evidence: the TOP500 67th list (2026-06-23) shows Exascale systems appearing across three continents simultaneously with diversified technical routes, and system profiles (architecture, precision, energy efficiency) differing enormously — an agent's parallel and precision suggestions must be bound to a specific system profile, where generic heuristics fail.

HPC also has one advantageous condition worth emphasizing: physical-level ground truth. Convergence, conservation laws, and benchmark comparisons are all acceptance criteria that do not depend on human subjective judgment. The downside is high evaluation cost (a single simulation takes 1,600–4,400 s), so layered evaluation — cheap proxy metrics first, expensive validation on demand — is a required course in Harness design for this direction.

One sentence summarizing this direction's thesis: constraints up front, reuse the scheduler, verify physics, keep costs computable.

Information Gap Statement

  1. No official or industry-recognized standard text exists for an HPC-direction AGENTS.md / SKILL.md. Sections 4.1 and 4.2 are both draft standards proposed by this document.
  2. All the figures of the Argonne agentic MOF-screening case (5,591 MOFs, 11,182 GCMC simulations, 256 nodes, 60–90 s orchestration overhead, 84% reliability, 64.9% strong-scaling efficiency, 7.06 mol/kg water working capacity) come from industry media's paraphrase of an arXiv preprint (submitted 2026-04-09); the preprint is not peer-reviewed and the original was not directly fetched, so it is advised to cross-check the arXiv original before citing.
  3. The figures of the LLM-scheduling study (100 jobs in 1–2 hours, Polaris 560 nodes, 7 scenarios, 10–100 job sizes) come from a paraphrase of the arXiv paper and the ACM DL page, and it is advised to cross-check the original; "ORNL agentic HPC up to 1.7× time-to-solution improvement and cost reduction" comes from the official ISC 2026 agenda entry, and full-text details should follow the IEEE Xplore-indexed version.
  4. TOP500 67th-list data follows the TOP500 official site's 2026-06-23 release; LineShine's core count has two bases of calculation — the TOP500 table basis (13,789,440) and the Chinese-report basis ("over 2.45 million CPU cores"). This document takes TOP500 as authoritative and presents both side by side without conversion.
  5. The Slurm version line has not been verified through official channels; the version statements in the Section 4.1 / 4.2 examples are illustrative, and citations should follow the official SchedMD documentation.
  6. Industry penetration rate, average ROI, and cluster-size distribution for the HPC-agent direction — this search did not obtain reliable public data, and this document provides no such figures.
  7. The module names, partition names, and quota values in the Section 4.2 example are all illustrative constructions and do not represent any real cluster.

6. References

  1. LineShine Debuts No. 1 on TOP500, Enters New Global Exascale Era — TOP500, 2026-06-23. https://www.top500.org/news/lineshine-debuts-no-1-top500-enters-new-global-exascale-era?pubDate=20260628
  2. TOP500 67th List (2026-06) — TOP500. https://top500.org/lists/top500/2026/06
  3. Frontier Progress in Supercomputing (LineShine Chinese corroborating report) — CAS e-Infrastructure Working Network, 2026-07. https://ecas.cas.cn/xxkw/kbcd/201115_149942/ml/xxhjsyjcss/202607/t20260707_5114814.html
  4. Agentic MOF Screening on Aurora ("The LLM Never Touches a Scheduler" case) — supercomputing.news, 2026. https://www.supercomputing.news/hpc/agentic-mof-screening-aurora
  5. Evaluating the Efficacy of LLM-based Reasoning for Multi-objective HPC Job Scheduling — arXiv 2506.02025. https://arxiv.org/html/2506.02025v2
  6. ACM DL index page for the same paper — ACM Digital Library. https://dl.acm.org/doi/full/10.1145/3731599.3767584
  7. ORNL results page for the same paper — Oak Ridge National Laboratory. https://impact.ornl.gov/en/publications/evaluating-the-efficacy-of-llm-based-reasoning-for-multiobjective/
  8. Toward Agentic HPC (ISC 2026 agenda entry) — ISC High Performance 2026. https://isc.app.swapcard.com/event/isc-high-performance-2026/planning/UGxhbm5pbmdfNDQ0MDE5OA==
  9. Slurm Workload Manager official documentation (Quick Start) — SchedMD. https://slurm.schedmd.com/quickstart.html
  10. Cluster Slurm Architecture and Practice — AI Infrastructure. https://ai-infrastructure.net/cluster-slurm
  11. What is Slurm? — CoreWeave. http://www.coreweave.com/topics/what-is-slurm