[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-minimax-hpc-slurm":3,"mdc-vksage-key":37,"related-org-minimax-hpc-slurm":1982,"related-repo-minimax-hpc-slurm":2185},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":35,"mdContent":36},"hpc-slurm","submit and monitor Slurm HPC jobs","当用户需要向 Slurm 集群提交计算作业，说\"提交集群任务\"\"写个 sbatch 脚本\"\"作业还在排队吗\"\"批量跑一组参数\"\"作业超时被杀了\"\"GPU 作业怎么交\"时使用。本技能规定 Slurm 集群的统一操作规程：sbatch 脚本模板（分区\u002F时长\u002F内存\u002FGPU 指令 + set -euo pipefail + 环境导出 + 结束自动 rsync 产物）、squeue\u002Fsacct 状态查询口径、数组任务批量提交、超时与重排队策略、产物抓回与 record_run 登记。同义触发场景：Slurm、HPC、集群、超算、排队、批处理、job array、机时。连接与主机认知纪律沿用 remote-compute（别名、画像合同），本技能只规定作业生命周期。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"minimax","MiniMax","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fminimax.jpg","MiniMax-AI",[13,17,20,23],{"name":14,"slug":15,"type":16},"Automation","automation","tag",{"name":18,"slug":19,"type":16},"CLI","cli",{"name":21,"slug":22,"type":16},"Deployment","deployment",{"name":24,"slug":25,"type":16},"Engineering","engineering",5,"https:\u002F\u002Fgithub.com\u002FMiniMax-AI\u002FMiniMax-Code-Plugins","2026-08-21T03:59:36.231569",null,2,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":34},[],"Community registry and contribution toolkit for MiniMax Code plugins.","https:\u002F\u002Fgithub.com\u002FMiniMax-AI\u002FMiniMax-Code-Plugins\u002Ftree\u002FHEAD\u002Fplugins\u002FHylouis233\u002Fopenscience\u002Fskills\u002Fhpc-slurm","---\nname: hpc-slurm\ndescription: >-\n  当用户需要向 Slurm 集群提交计算作业，说\"提交集群任务\"\"写个 sbatch 脚本\"\"作业还在排队吗\"\"批量跑一组参数\"\"作业超时被杀了\"\"GPU 作业怎么交\"时使用。本技能规定 Slurm 集群的统一操作规程：sbatch 脚本模板（分区\u002F时长\u002F内存\u002FGPU 指令 + set -euo pipefail + 环境导出 + 结束自动 rsync 产物）、squeue\u002Fsacct 状态查询口径、数组任务批量提交、超时与重排队策略、产物抓回与 record_run 登记。同义触发场景：Slurm、HPC、集群、超算、排队、批处理、job array、机时。连接与主机认知纪律沿用 remote-compute（别名、画像合同），本技能只规定作业生命周期。\nargument-hint: '[作业描述或作业号]'\nmetadata:\n  domains: [compute]\n  last_reviewed: '2026-08-19'\n---\n\n# hpc-slurm：Slurm 集群作业规程\n\n## 目的\n\nSlurm 集群的算力是排队共享的：脚本写错浪费机时，资源虚报挤占同门队列，作业跑完不抓回等于没跑。本技能规定作业生命周期的五个环节：\n\n1. 提交前：脚本模板化，资源申请有依据；\n2. 队列中：状态查询口径统一，不盲目刷屏；\n3. 批量时：数组任务替代循环提交；\n4. 异常时：超时与失败有明确的重排队策略；\n5. 完成后：产物自动 rsync 抓回 + record_run 登记。\n\n**前置约束**：连接一律走 remote-compute 的别名与 ControlMaster 纪律；目标主机的分区、GPU、配额信息以 `.openscience\u002Fhosts\u002F\u003Calias>.yaml` 画像为准——画像没有的信息（如分区名）先探测（`sinfo`）再写进脚本，不臆造。\n\n## 前置检查\n\n1. 画像 `scheduler: slurm` 已确认；画像缺失或过期时先按 remote-compute 第 2 节探测。\n2. 查可用分区与节点：`ssh \u003Calias> 'sinfo -o \"%P %a %l %D %N\"'`，把目标分区、单作业时长上限写进画像 notes。\n3. 提交计算作业消耗机时与队列资源，属 guardrail 第 8 条危险操作：**首次提交前向用户说明作业规模（核数、时长、分区、预计机时）并获得确认**；数组任务说明总任务数。\n4. 数据与代码已同步到远程（rsync 上传），脚本内路径全部是远程路径。\n\n## 1 · sbatch 脚本模板\n\n作业脚本放本地 `scripts\u002Fslurm\u002F\u003Cjob-name>.sbatch`（纳入工作区管理），模板：\n\n```bash\n#!\u002Fbin\u002Fbash\n#SBATCH --job-name=cycle-fit        # 短而可读，squeue 里认得出\n#SBATCH --partition=gpu             # 以画像\u002Fsinfo 为准，不臆造分区名\n#SBATCH --time=08:00:00             # 预留 20-50% 余量，不写分区上限\n#SBATCH --mem=32G\n#SBATCH --cpus-per-task=8\n#SBATCH --gres=gpu:1                # 无 GPU 作业删掉此行；型号需求以画像 gpu_summary 为准\n#SBATCH --output=%x-%j.out          # \u003Cjob-name>-\u003Cjobid>.out，便于归档\n#SBATCH --error=%x-%j.err\n\nset -euo pipefail                   # 任何命令失败立即终止作业，不带着错误继续跑\n\n# ---- 环境导出（三选一，与画像 notes 中该集群的习惯一致）----\n# module load cuda\u002F12.2 anaconda\u002F2024.02 && source activate myenv\n# source \"$HOME\u002F.venv\u002Fbin\u002Factivate\"\nexport PYTHONUNBUFFERED=1           # 日志实时可见，便于中途检查\n\n# ---- 任务本体 ----\nJOB_DIR=\"$HOME\u002Fruns\u002F${SLURM_JOB_NAME}-${SLURM_JOB_ID}\"\nmkdir -p \"$JOB_DIR\"\ncd \"$JOB_DIR\"\npython3 \"$HOME\u002Fcode\u002Fanalyze_cycle.py\" --seed 42 --out \"$JOB_DIR\"\n\n# ---- 结束自动 rsync 产物回本地工作区 ----\n# 仅在登录节点可反向访问本地时可用；多数集群不通，改用完成后手动抓回（第 5 节）\nrsync -avz \"$JOB_DIR\u002F\" \"\u003Clocal-alias>:\u003C工作区路径>\u002Fresults\u002F${SLURM_JOB_NAME}-${SLURM_JOB_ID}\u002F\" \\\n  || echo \"WARN: auto rsync failed, fetch manually\" >&2\n\necho \"JOB_DONE $(date -Is)\"\n```\n\n模板纪律：\n\n1. `set -euo pipefail` 不可省：没有它，中间步骤失败后作业继续跑，产出半截结果还显示\"完成\"。\n2. 资源申请按画像与实际需求填，不虚报（虚报挤占队列、拖长全组排队），也不少报（OOM\u002F超时被杀浪费机时）。\n3. 产物目录名带 `${SLURM_JOB_ID}`，同一脚本多次提交互不覆盖。\n4. 环境导出让作业自包含：不依赖登录节点的交互式 shell 状态。\n\n## 2 · 状态查询：squeue \u002F sacct\n\n统一口径，避免凭印象判断：\n\n```bash\nssh \u003Calias> 'squeue -u $USER'                      # 在队作业：R=运行 PD=排队\nssh \u003Calias> 'sacct -j \u003Cjobid> --format=JobID,JobName,State,Elapsed,MaxRSS,ExitCode'\n```\n\n解读要点：\n\n1. `PD`（排队）看 `squeue` 的 `NODELIST(REASON)`：`Resources`\u002F`Priority` 是正常排队；`ReqNodeNotAvail` 等多为资源请求超分区配置，应改脚本而不是干等。\n2. 作业结束后一律 `sacct` 确认 `State` 与 `ExitCode`：`COMPLETED` + `0:0` 才算成功；`TIMEOUT`\u002F`OUT_OF_MEMORY` 按第 4 节处理。\n3. 不轮询刷屏：查询间隔不低于分钟级；长作业用 run-monitor 思路\"提交后离开，定期回来查\"，不让人机空等。\n\n## 3 · 批量作业：数组任务\n\n同脚本多参数（多 seed、多数据分片）一律用 job array，禁止 for 循环逐条 sbatch：\n\n```bash\n#SBATCH --array=0-99%10            # 100 个任务，最多同时 10 个（%10 限制并发，别挤爆队列）\n\npython3 \"$HOME\u002Fcode\u002Fanalyze.py\" --seed \"$SLURM_ARRAY_TASK_ID\" \\\n    --out \"$HOME\u002Fruns\u002F${SLURM_JOB_NAME}-${SLURM_ARRAY_JOB_ID}\u002Ftask-${SLURM_ARRAY_TASK_ID}\"\n```\n\n纪律：\n\n1. 每个数组元素产物独立目录（带 task id），互不覆盖；\n2. 首次跑大批量前先用 `--array=0-2` 小规模试跑，确认单任务资源估算正确，再提交全量；\n3. 抓回时按 `${SLURM_ARRAY_JOB_ID}` 整目录 rsync，record_run 一条登记、note 写数组范围与失败元素。\n\n## 4 · 超时与重排队策略\n\n1. **TIMEOUT**：先查日志判断是\"差一步\"还是\"差很远\"。差一步：加大 `--time` 重交；差很远：检查是否有死循环或规模估计错误，修复后重交。同一作业连续两次 TIMEOUT 不得原样重交，必须先改东西。\n2. **OUT_OF_MEMORY**：按 `sacct` 的 `MaxRSS` 实测值上调 `--mem`（留 20% 余量）重交。\n3. **FAILED（非零退出）**：读 `.err` 定位，修复后重交；失败作业同样登记 provenance（paths 指向抓回的日志）。\n4. **可断点续算的任务**：脚本内支持 checkpoint（存在则续跑），超时重交即自动续算；长任务优先设计成可续算的。\n5. 重排队是新的资源消耗：批量重交前向用户说明失败原因与新增机时。\n\n## 5 · 产物抓回与 record_run\n\n自动 rsync（模板末尾）不通时，完成后手动抓回：\n\n```bash\nrsync -avz \u003Calias>:~\u002Fruns\u002F\u003Cjob-name>-\u003Cjobid>\u002F results\u002F\u003Cjob-name>-\u003Cjobid>\u002F\npython \u003C插件包路径>\u002Fskills\u002Fprovenance-record\u002Fscripts\u002Frecord_run.py \\\n  --path results\u002F\u003Cjob-name>-\u003Cjobid>\u002F \\\n  --tool \"slurm job \u003Cjobid> (\u003Cjob-name>.sbatch)\" \\\n  --note \"分区 \u003Cp>，8 核 32G 1×GPU，实际耗时 \u003CElapsed>，ExitCode 0:0，节点 \u003CNodeList>\"\n```\n\n不记录的运行等于不存在：note 里作业号、sacct 的 Elapsed\u002FExitCode\u002FNodeList 缺一不可；远程环境版本（`module list` 摘要）有条件就附在 note 或抓回的日志里。\n\n## 6 · 经 run_task 登记 Slurm 作业\n\nsbatch 提交成功、拿到 jobid 后，立即把\"盯这个作业\"登记成一个本地 Run——用 run-monitor 的 Run 抽象统一管理本地与远程长任务：Run 只记录\"任务叫什么、怎么查状态、查到了什么\"，不关心任务跑在本机还是集群：\n\n```bash\npython \u003C插件包路径>\u002Fskills\u002Frun-monitor\u002Fscripts\u002Frun_task.py \\\n  start --name \u003Cjob-name>-\u003Cjobid> \\\n  --tag slurm --tag \u003Ccluster> \\\n  --cmd \"ssh \u003Calias> 'sacct -j \u003Cjobid> --format=State -n | head -1'\"\n```\n\n模式说明：\n\n1. **登记即交还**：start 把这条状态查询命令放到后台执行并立即返回，会话不空等；run.json 的 cmd 字段留下\"当时用哪条命令查的\"，口径与第 2 节一致，tags 与 note 一并落盘。\n2. **轮询即重跑**：想看最新状态时同名再 start 一次（已 exited 的 run 允许被新 start 覆盖，日志随之重写），然后 `tail` 看这次查到的 State；查询间隔不低于分钟级的纪律不变，不写忙等循环。\n3. **tags 即检索口径**：`--tag slurm --tag \u003Ccluster>` 让 `run_task list` 把集群作业与本地任务一眼分开；多集群、多作业并发时按 tag 认作业，不靠记忆。补充背景（分区、资源、预计时长）用 `--note` 写一句。\n4. **终态与抓回纪律不变**：sacct 显示 COMPLETED\u002FFAILED\u002FTIMEOUT 后，产物抓回与 record_run 登记仍按第 5 节执行，一个字不改；Run 替代的是\"人机空等\"，不替代 provenance。\n\n## 输出模板\n\n```markdown\n## Slurm 作业已提交（\u003Cjob-name> @ \u003Calias>）\n\n- jobid：\u003Cid>，分区：\u003Cp>，资源：\u003C核\u002F内存\u002FGPU\u002F时长>\n- 预计排队：\u003Csqueue 观察>；查询：ssh \u003Calias> 'squeue -j \u003Cid>'\n- 完成后：自动 rsync 至 results\u002F\u003Cjob-name>-\u003Cid>\u002F 或按第 5 节手动抓回 + record_run\n```\n\n## 本技能不做什么\n\n- 不探测主机与管连接：别名、ControlMaster、画像合同、失败分支一律沿用 remote-compute，本文件不重复。\n- 不保证队列策略最优：分区选择、机时估计给建议，最终以用户所在集群的实际规定（画像 notes）为准。\n- 不自动 kill 作业：`scancel` 只建议不执行，除非用户当场明确确认（影响共享队列状态）。\n- 不管非 Slurm 调度器：PBS\u002FLSF 语法不同，本规程不套用；画像 scheduler 非 slurm 时按 remote-compute 的交互式方案。\n- 不替用户盯梢：提交后告知查询命令即交还控制权，长周期作业由用户按节奏回来查（或按第 6 节用 run_task 登记）。\n\n## 收尾与下一步\n\n- 作业成功后：确认 rsync 完成、record_run 已登记、产物按契约归位（latest 刷新）。\n- 批量作业：核对数组元素完整性（100 个任务 100 个产物目录），缺的按第 4 节补交。\n- 结论进论文前：sbatch 脚本 + sacct 摘要 + 产物一并进 evidence-capsule 冻结。\n- 作业失败：登记失败记录后诊断，诊断结论写进下一条 provenance note，形成可追溯的试错链。\n",{"data":38,"body":44},{"name":4,"description":6,"argument-hint":39,"metadata":40},"[作业描述或作业号]",{"domains":41,"last_reviewed":43},[42],"compute","2026-08-19",{"type":45,"children":46},"root",[47,56,62,68,98,126,131,177,183,196,761,766,803,809,814,906,911,1028,1034,1039,1173,1178,1212,1218,1302,1308,1313,1580,1593,1599,1604,1757,1762,1836,1841,1906,1911,1948,1953,1976],{"type":48,"tag":49,"props":50,"children":52},"element","h1",{"id":51},"hpc-slurmslurm-集群作业规程",[53],{"type":54,"value":55},"text","hpc-slurm：Slurm 集群作业规程",{"type":48,"tag":57,"props":58,"children":60},"h2",{"id":59},"目的",[61],{"type":54,"value":59},{"type":48,"tag":63,"props":64,"children":65},"p",{},[66],{"type":54,"value":67},"Slurm 集群的算力是排队共享的：脚本写错浪费机时，资源虚报挤占同门队列，作业跑完不抓回等于没跑。本技能规定作业生命周期的五个环节：",{"type":48,"tag":69,"props":70,"children":71},"ol",{},[72,78,83,88,93],{"type":48,"tag":73,"props":74,"children":75},"li",{},[76],{"type":54,"value":77},"提交前：脚本模板化，资源申请有依据；",{"type":48,"tag":73,"props":79,"children":80},{},[81],{"type":54,"value":82},"队列中：状态查询口径统一，不盲目刷屏；",{"type":48,"tag":73,"props":84,"children":85},{},[86],{"type":54,"value":87},"批量时：数组任务替代循环提交；",{"type":48,"tag":73,"props":89,"children":90},{},[91],{"type":54,"value":92},"异常时：超时与失败有明确的重排队策略；",{"type":48,"tag":73,"props":94,"children":95},{},[96],{"type":54,"value":97},"完成后：产物自动 rsync 抓回 + record_run 登记。",{"type":48,"tag":63,"props":99,"children":100},{},[101,107,109,116,118,124],{"type":48,"tag":102,"props":103,"children":104},"strong",{},[105],{"type":54,"value":106},"前置约束",{"type":54,"value":108},"：连接一律走 remote-compute 的别名与 ControlMaster 纪律；目标主机的分区、GPU、配额信息以 ",{"type":48,"tag":110,"props":111,"children":113},"code",{"className":112},[],[114],{"type":54,"value":115},".openscience\u002Fhosts\u002F\u003Calias>.yaml",{"type":54,"value":117}," 画像为准——画像没有的信息（如分区名）先探测（",{"type":48,"tag":110,"props":119,"children":121},{"className":120},[],[122],{"type":54,"value":123},"sinfo",{"type":54,"value":125},"）再写进脚本，不臆造。",{"type":48,"tag":57,"props":127,"children":129},{"id":128},"前置检查",[130],{"type":54,"value":128},{"type":48,"tag":69,"props":132,"children":133},{},[134,147,160,172],{"type":48,"tag":73,"props":135,"children":136},{},[137,139,145],{"type":54,"value":138},"画像 ",{"type":48,"tag":110,"props":140,"children":142},{"className":141},[],[143],{"type":54,"value":144},"scheduler: slurm",{"type":54,"value":146}," 已确认；画像缺失或过期时先按 remote-compute 第 2 节探测。",{"type":48,"tag":73,"props":148,"children":149},{},[150,152,158],{"type":54,"value":151},"查可用分区与节点：",{"type":48,"tag":110,"props":153,"children":155},{"className":154},[],[156],{"type":54,"value":157},"ssh \u003Calias> 'sinfo -o \"%P %a %l %D %N\"'",{"type":54,"value":159},"，把目标分区、单作业时长上限写进画像 notes。",{"type":48,"tag":73,"props":161,"children":162},{},[163,165,170],{"type":54,"value":164},"提交计算作业消耗机时与队列资源，属 guardrail 第 8 条危险操作：",{"type":48,"tag":102,"props":166,"children":167},{},[168],{"type":54,"value":169},"首次提交前向用户说明作业规模（核数、时长、分区、预计机时）并获得确认",{"type":54,"value":171},"；数组任务说明总任务数。",{"type":48,"tag":73,"props":173,"children":174},{},[175],{"type":54,"value":176},"数据与代码已同步到远程（rsync 上传），脚本内路径全部是远程路径。",{"type":48,"tag":57,"props":178,"children":180},{"id":179},"_1-sbatch-脚本模板",[181],{"type":54,"value":182},"1 · sbatch 脚本模板",{"type":48,"tag":63,"props":184,"children":185},{},[186,188,194],{"type":54,"value":187},"作业脚本放本地 ",{"type":48,"tag":110,"props":189,"children":191},{"className":190},[],[192],{"type":54,"value":193},"scripts\u002Fslurm\u002F\u003Cjob-name>.sbatch",{"type":54,"value":195},"（纳入工作区管理），模板：",{"type":48,"tag":197,"props":198,"children":203},"pre",{"className":199,"code":200,"language":201,"meta":202,"style":202},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","#!\u002Fbin\u002Fbash\n#SBATCH --job-name=cycle-fit        # 短而可读，squeue 里认得出\n#SBATCH --partition=gpu             # 以画像\u002Fsinfo 为准，不臆造分区名\n#SBATCH --time=08:00:00             # 预留 20-50% 余量，不写分区上限\n#SBATCH --mem=32G\n#SBATCH --cpus-per-task=8\n#SBATCH --gres=gpu:1                # 无 GPU 作业删掉此行；型号需求以画像 gpu_summary 为准\n#SBATCH --output=%x-%j.out          # \u003Cjob-name>-\u003Cjobid>.out，便于归档\n#SBATCH --error=%x-%j.err\n\nset -euo pipefail                   # 任何命令失败立即终止作业，不带着错误继续跑\n\n# ---- 环境导出（三选一，与画像 notes 中该集群的习惯一致）----\n# module load cuda\u002F12.2 anaconda\u002F2024.02 && source activate myenv\n# source \"$HOME\u002F.venv\u002Fbin\u002Factivate\"\nexport PYTHONUNBUFFERED=1           # 日志实时可见，便于中途检查\n\n# ---- 任务本体 ----\nJOB_DIR=\"$HOME\u002Fruns\u002F${SLURM_JOB_NAME}-${SLURM_JOB_ID}\"\nmkdir -p \"$JOB_DIR\"\ncd \"$JOB_DIR\"\npython3 \"$HOME\u002Fcode\u002Fanalyze_cycle.py\" --seed 42 --out \"$JOB_DIR\"\n\n# ---- 结束自动 rsync 产物回本地工作区 ----\n# 仅在登录节点可反向访问本地时可用；多数集群不通，改用完成后手动抓回（第 5 节）\nrsync -avz \"$JOB_DIR\u002F\" \"\u003Clocal-alias>:\u003C工作区路径>\u002Fresults\u002F${SLURM_JOB_NAME}-${SLURM_JOB_ID}\u002F\" \\\n  || echo \"WARN: auto rsync failed, fetch manually\" >&2\n\necho \"JOB_DONE $(date -Is)\"\n","bash","",[204],{"type":48,"tag":110,"props":205,"children":206},{"__ignoreMap":202},[207,219,227,236,245,253,262,271,280,289,299,325,333,342,351,360,393,401,410,472,502,523,576,584,593,602,683,715,723],{"type":48,"tag":208,"props":209,"children":212},"span",{"class":210,"line":211},"line",1,[213],{"type":48,"tag":208,"props":214,"children":216},{"style":215},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[217],{"type":54,"value":218},"#!\u002Fbin\u002Fbash\n",{"type":48,"tag":208,"props":220,"children":221},{"class":210,"line":30},[222],{"type":48,"tag":208,"props":223,"children":224},{"style":215},[225],{"type":54,"value":226},"#SBATCH --job-name=cycle-fit        # 短而可读，squeue 里认得出\n",{"type":48,"tag":208,"props":228,"children":230},{"class":210,"line":229},3,[231],{"type":48,"tag":208,"props":232,"children":233},{"style":215},[234],{"type":54,"value":235},"#SBATCH --partition=gpu             # 以画像\u002Fsinfo 为准，不臆造分区名\n",{"type":48,"tag":208,"props":237,"children":239},{"class":210,"line":238},4,[240],{"type":48,"tag":208,"props":241,"children":242},{"style":215},[243],{"type":54,"value":244},"#SBATCH --time=08:00:00             # 预留 20-50% 余量，不写分区上限\n",{"type":48,"tag":208,"props":246,"children":247},{"class":210,"line":26},[248],{"type":48,"tag":208,"props":249,"children":250},{"style":215},[251],{"type":54,"value":252},"#SBATCH --mem=32G\n",{"type":48,"tag":208,"props":254,"children":256},{"class":210,"line":255},6,[257],{"type":48,"tag":208,"props":258,"children":259},{"style":215},[260],{"type":54,"value":261},"#SBATCH --cpus-per-task=8\n",{"type":48,"tag":208,"props":263,"children":265},{"class":210,"line":264},7,[266],{"type":48,"tag":208,"props":267,"children":268},{"style":215},[269],{"type":54,"value":270},"#SBATCH --gres=gpu:1                # 无 GPU 作业删掉此行；型号需求以画像 gpu_summary 为准\n",{"type":48,"tag":208,"props":272,"children":274},{"class":210,"line":273},8,[275],{"type":48,"tag":208,"props":276,"children":277},{"style":215},[278],{"type":54,"value":279},"#SBATCH --output=%x-%j.out          # \u003Cjob-name>-\u003Cjobid>.out，便于归档\n",{"type":48,"tag":208,"props":281,"children":283},{"class":210,"line":282},9,[284],{"type":48,"tag":208,"props":285,"children":286},{"style":215},[287],{"type":54,"value":288},"#SBATCH --error=%x-%j.err\n",{"type":48,"tag":208,"props":290,"children":292},{"class":210,"line":291},10,[293],{"type":48,"tag":208,"props":294,"children":296},{"emptyLinePlaceholder":295},true,[297],{"type":54,"value":298},"\n",{"type":48,"tag":208,"props":300,"children":302},{"class":210,"line":301},11,[303,309,315,320],{"type":48,"tag":208,"props":304,"children":306},{"style":305},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[307],{"type":54,"value":308},"set",{"type":48,"tag":208,"props":310,"children":312},{"style":311},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[313],{"type":54,"value":314}," -euo",{"type":48,"tag":208,"props":316,"children":317},{"style":311},[318],{"type":54,"value":319}," pipefail",{"type":48,"tag":208,"props":321,"children":322},{"style":215},[323],{"type":54,"value":324},"                   # 任何命令失败立即终止作业，不带着错误继续跑\n",{"type":48,"tag":208,"props":326,"children":328},{"class":210,"line":327},12,[329],{"type":48,"tag":208,"props":330,"children":331},{"emptyLinePlaceholder":295},[332],{"type":54,"value":298},{"type":48,"tag":208,"props":334,"children":336},{"class":210,"line":335},13,[337],{"type":48,"tag":208,"props":338,"children":339},{"style":215},[340],{"type":54,"value":341},"# ---- 环境导出（三选一，与画像 notes 中该集群的习惯一致）----\n",{"type":48,"tag":208,"props":343,"children":345},{"class":210,"line":344},14,[346],{"type":48,"tag":208,"props":347,"children":348},{"style":215},[349],{"type":54,"value":350},"# module load cuda\u002F12.2 anaconda\u002F2024.02 && source activate myenv\n",{"type":48,"tag":208,"props":352,"children":354},{"class":210,"line":353},15,[355],{"type":48,"tag":208,"props":356,"children":357},{"style":215},[358],{"type":54,"value":359},"# source \"$HOME\u002F.venv\u002Fbin\u002Factivate\"\n",{"type":48,"tag":208,"props":361,"children":363},{"class":210,"line":362},16,[364,370,376,382,388],{"type":48,"tag":208,"props":365,"children":367},{"style":366},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[368],{"type":54,"value":369},"export",{"type":48,"tag":208,"props":371,"children":373},{"style":372},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[374],{"type":54,"value":375}," PYTHONUNBUFFERED",{"type":48,"tag":208,"props":377,"children":379},{"style":378},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[380],{"type":54,"value":381},"=",{"type":48,"tag":208,"props":383,"children":385},{"style":384},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[386],{"type":54,"value":387},"1",{"type":48,"tag":208,"props":389,"children":390},{"style":215},[391],{"type":54,"value":392},"           # 日志实时可见，便于中途检查\n",{"type":48,"tag":208,"props":394,"children":396},{"class":210,"line":395},17,[397],{"type":48,"tag":208,"props":398,"children":399},{"emptyLinePlaceholder":295},[400],{"type":54,"value":298},{"type":48,"tag":208,"props":402,"children":404},{"class":210,"line":403},18,[405],{"type":48,"tag":208,"props":406,"children":407},{"style":215},[408],{"type":54,"value":409},"# ---- 任务本体 ----\n",{"type":48,"tag":208,"props":411,"children":413},{"class":210,"line":412},19,[414,419,423,428,433,438,443,448,453,458,462,467],{"type":48,"tag":208,"props":415,"children":416},{"style":372},[417],{"type":54,"value":418},"JOB_DIR",{"type":48,"tag":208,"props":420,"children":421},{"style":378},[422],{"type":54,"value":381},{"type":48,"tag":208,"props":424,"children":425},{"style":378},[426],{"type":54,"value":427},"\"",{"type":48,"tag":208,"props":429,"children":430},{"style":372},[431],{"type":54,"value":432},"$HOME",{"type":48,"tag":208,"props":434,"children":435},{"style":311},[436],{"type":54,"value":437},"\u002Fruns\u002F",{"type":48,"tag":208,"props":439,"children":440},{"style":378},[441],{"type":54,"value":442},"${",{"type":48,"tag":208,"props":444,"children":445},{"style":372},[446],{"type":54,"value":447},"SLURM_JOB_NAME",{"type":48,"tag":208,"props":449,"children":450},{"style":378},[451],{"type":54,"value":452},"}",{"type":48,"tag":208,"props":454,"children":455},{"style":311},[456],{"type":54,"value":457},"-",{"type":48,"tag":208,"props":459,"children":460},{"style":378},[461],{"type":54,"value":442},{"type":48,"tag":208,"props":463,"children":464},{"style":372},[465],{"type":54,"value":466},"SLURM_JOB_ID",{"type":48,"tag":208,"props":468,"children":469},{"style":378},[470],{"type":54,"value":471},"}\"\n",{"type":48,"tag":208,"props":473,"children":475},{"class":210,"line":474},20,[476,482,487,492,497],{"type":48,"tag":208,"props":477,"children":479},{"style":478},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[480],{"type":54,"value":481},"mkdir",{"type":48,"tag":208,"props":483,"children":484},{"style":311},[485],{"type":54,"value":486}," -p",{"type":48,"tag":208,"props":488,"children":489},{"style":378},[490],{"type":54,"value":491}," \"",{"type":48,"tag":208,"props":493,"children":494},{"style":372},[495],{"type":54,"value":496},"$JOB_DIR",{"type":48,"tag":208,"props":498,"children":499},{"style":378},[500],{"type":54,"value":501},"\"\n",{"type":48,"tag":208,"props":503,"children":505},{"class":210,"line":504},21,[506,511,515,519],{"type":48,"tag":208,"props":507,"children":508},{"style":305},[509],{"type":54,"value":510},"cd",{"type":48,"tag":208,"props":512,"children":513},{"style":378},[514],{"type":54,"value":491},{"type":48,"tag":208,"props":516,"children":517},{"style":372},[518],{"type":54,"value":496},{"type":48,"tag":208,"props":520,"children":521},{"style":378},[522],{"type":54,"value":501},{"type":48,"tag":208,"props":524,"children":526},{"class":210,"line":525},22,[527,532,536,540,545,549,554,559,564,568,572],{"type":48,"tag":208,"props":528,"children":529},{"style":478},[530],{"type":54,"value":531},"python3",{"type":48,"tag":208,"props":533,"children":534},{"style":378},[535],{"type":54,"value":491},{"type":48,"tag":208,"props":537,"children":538},{"style":372},[539],{"type":54,"value":432},{"type":48,"tag":208,"props":541,"children":542},{"style":311},[543],{"type":54,"value":544},"\u002Fcode\u002Fanalyze_cycle.py",{"type":48,"tag":208,"props":546,"children":547},{"style":378},[548],{"type":54,"value":427},{"type":48,"tag":208,"props":550,"children":551},{"style":311},[552],{"type":54,"value":553}," --seed",{"type":48,"tag":208,"props":555,"children":556},{"style":384},[557],{"type":54,"value":558}," 42",{"type":48,"tag":208,"props":560,"children":561},{"style":311},[562],{"type":54,"value":563}," --out",{"type":48,"tag":208,"props":565,"children":566},{"style":378},[567],{"type":54,"value":491},{"type":48,"tag":208,"props":569,"children":570},{"style":372},[571],{"type":54,"value":496},{"type":48,"tag":208,"props":573,"children":574},{"style":378},[575],{"type":54,"value":501},{"type":48,"tag":208,"props":577,"children":579},{"class":210,"line":578},23,[580],{"type":48,"tag":208,"props":581,"children":582},{"emptyLinePlaceholder":295},[583],{"type":54,"value":298},{"type":48,"tag":208,"props":585,"children":587},{"class":210,"line":586},24,[588],{"type":48,"tag":208,"props":589,"children":590},{"style":215},[591],{"type":54,"value":592},"# ---- 结束自动 rsync 产物回本地工作区 ----\n",{"type":48,"tag":208,"props":594,"children":596},{"class":210,"line":595},25,[597],{"type":48,"tag":208,"props":598,"children":599},{"style":215},[600],{"type":54,"value":601},"# 仅在登录节点可反向访问本地时可用；多数集群不通，改用完成后手动抓回（第 5 节）\n",{"type":48,"tag":208,"props":603,"children":605},{"class":210,"line":604},26,[606,611,616,620,624,629,633,637,642,646,650,654,658,662,666,670,674,678],{"type":48,"tag":208,"props":607,"children":608},{"style":478},[609],{"type":54,"value":610},"rsync",{"type":48,"tag":208,"props":612,"children":613},{"style":311},[614],{"type":54,"value":615}," -avz",{"type":48,"tag":208,"props":617,"children":618},{"style":378},[619],{"type":54,"value":491},{"type":48,"tag":208,"props":621,"children":622},{"style":372},[623],{"type":54,"value":496},{"type":48,"tag":208,"props":625,"children":626},{"style":311},[627],{"type":54,"value":628},"\u002F",{"type":48,"tag":208,"props":630,"children":631},{"style":378},[632],{"type":54,"value":427},{"type":48,"tag":208,"props":634,"children":635},{"style":378},[636],{"type":54,"value":491},{"type":48,"tag":208,"props":638,"children":639},{"style":311},[640],{"type":54,"value":641},"\u003Clocal-alias>:\u003C工作区路径>\u002Fresults\u002F",{"type":48,"tag":208,"props":643,"children":644},{"style":378},[645],{"type":54,"value":442},{"type":48,"tag":208,"props":647,"children":648},{"style":372},[649],{"type":54,"value":447},{"type":48,"tag":208,"props":651,"children":652},{"style":378},[653],{"type":54,"value":452},{"type":48,"tag":208,"props":655,"children":656},{"style":311},[657],{"type":54,"value":457},{"type":48,"tag":208,"props":659,"children":660},{"style":378},[661],{"type":54,"value":442},{"type":48,"tag":208,"props":663,"children":664},{"style":372},[665],{"type":54,"value":466},{"type":48,"tag":208,"props":667,"children":668},{"style":378},[669],{"type":54,"value":452},{"type":48,"tag":208,"props":671,"children":672},{"style":311},[673],{"type":54,"value":628},{"type":48,"tag":208,"props":675,"children":676},{"style":378},[677],{"type":54,"value":427},{"type":48,"tag":208,"props":679,"children":680},{"style":372},[681],{"type":54,"value":682}," \\\n",{"type":48,"tag":208,"props":684,"children":686},{"class":210,"line":685},27,[687,692,697,701,706,710],{"type":48,"tag":208,"props":688,"children":689},{"style":378},[690],{"type":54,"value":691},"  ||",{"type":48,"tag":208,"props":693,"children":694},{"style":305},[695],{"type":54,"value":696}," echo",{"type":48,"tag":208,"props":698,"children":699},{"style":378},[700],{"type":54,"value":491},{"type":48,"tag":208,"props":702,"children":703},{"style":311},[704],{"type":54,"value":705},"WARN: auto rsync failed, fetch manually",{"type":48,"tag":208,"props":707,"children":708},{"style":378},[709],{"type":54,"value":427},{"type":48,"tag":208,"props":711,"children":712},{"style":378},[713],{"type":54,"value":714}," >&2\n",{"type":48,"tag":208,"props":716,"children":718},{"class":210,"line":717},28,[719],{"type":48,"tag":208,"props":720,"children":721},{"emptyLinePlaceholder":295},[722],{"type":54,"value":298},{"type":48,"tag":208,"props":724,"children":726},{"class":210,"line":725},29,[727,732,736,741,746,751,756],{"type":48,"tag":208,"props":728,"children":729},{"style":305},[730],{"type":54,"value":731},"echo",{"type":48,"tag":208,"props":733,"children":734},{"style":378},[735],{"type":54,"value":491},{"type":48,"tag":208,"props":737,"children":738},{"style":311},[739],{"type":54,"value":740},"JOB_DONE ",{"type":48,"tag":208,"props":742,"children":743},{"style":378},[744],{"type":54,"value":745},"$(",{"type":48,"tag":208,"props":747,"children":748},{"style":478},[749],{"type":54,"value":750},"date",{"type":48,"tag":208,"props":752,"children":753},{"style":311},[754],{"type":54,"value":755}," -Is",{"type":48,"tag":208,"props":757,"children":758},{"style":378},[759],{"type":54,"value":760},")\"\n",{"type":48,"tag":63,"props":762,"children":763},{},[764],{"type":54,"value":765},"模板纪律：",{"type":48,"tag":69,"props":767,"children":768},{},[769,780,785,798],{"type":48,"tag":73,"props":770,"children":771},{},[772,778],{"type":48,"tag":110,"props":773,"children":775},{"className":774},[],[776],{"type":54,"value":777},"set -euo pipefail",{"type":54,"value":779}," 不可省：没有它，中间步骤失败后作业继续跑，产出半截结果还显示\"完成\"。",{"type":48,"tag":73,"props":781,"children":782},{},[783],{"type":54,"value":784},"资源申请按画像与实际需求填，不虚报（虚报挤占队列、拖长全组排队），也不少报（OOM\u002F超时被杀浪费机时）。",{"type":48,"tag":73,"props":786,"children":787},{},[788,790,796],{"type":54,"value":789},"产物目录名带 ",{"type":48,"tag":110,"props":791,"children":793},{"className":792},[],[794],{"type":54,"value":795},"${SLURM_JOB_ID}",{"type":54,"value":797},"，同一脚本多次提交互不覆盖。",{"type":48,"tag":73,"props":799,"children":800},{},[801],{"type":54,"value":802},"环境导出让作业自包含：不依赖登录节点的交互式 shell 状态。",{"type":48,"tag":57,"props":804,"children":806},{"id":805},"_2-状态查询squeue-sacct",[807],{"type":54,"value":808},"2 · 状态查询：squeue \u002F sacct",{"type":48,"tag":63,"props":810,"children":811},{},[812],{"type":54,"value":813},"统一口径，避免凭印象判断：",{"type":48,"tag":197,"props":815,"children":817},{"className":199,"code":816,"language":201,"meta":202,"style":202},"ssh \u003Calias> 'squeue -u $USER'                      # 在队作业：R=运行 PD=排队\nssh \u003Calias> 'sacct -j \u003Cjobid> --format=JobID,JobName,State,Elapsed,MaxRSS,ExitCode'\n",[818],{"type":48,"tag":110,"props":819,"children":820},{"__ignoreMap":202},[821,869],{"type":48,"tag":208,"props":822,"children":823},{"class":210,"line":211},[824,829,834,839,844,849,854,859,864],{"type":48,"tag":208,"props":825,"children":826},{"style":478},[827],{"type":54,"value":828},"ssh",{"type":48,"tag":208,"props":830,"children":831},{"style":378},[832],{"type":54,"value":833}," \u003C",{"type":48,"tag":208,"props":835,"children":836},{"style":311},[837],{"type":54,"value":838},"alia",{"type":48,"tag":208,"props":840,"children":841},{"style":372},[842],{"type":54,"value":843},"s",{"type":48,"tag":208,"props":845,"children":846},{"style":378},[847],{"type":54,"value":848},">",{"type":48,"tag":208,"props":850,"children":851},{"style":378},[852],{"type":54,"value":853}," '",{"type":48,"tag":208,"props":855,"children":856},{"style":311},[857],{"type":54,"value":858},"squeue -u $USER",{"type":48,"tag":208,"props":860,"children":861},{"style":378},[862],{"type":54,"value":863},"'",{"type":48,"tag":208,"props":865,"children":866},{"style":215},[867],{"type":54,"value":868},"                      # 在队作业：R=运行 PD=排队\n",{"type":48,"tag":208,"props":870,"children":871},{"class":210,"line":30},[872,876,880,884,888,892,896,901],{"type":48,"tag":208,"props":873,"children":874},{"style":478},[875],{"type":54,"value":828},{"type":48,"tag":208,"props":877,"children":878},{"style":378},[879],{"type":54,"value":833},{"type":48,"tag":208,"props":881,"children":882},{"style":311},[883],{"type":54,"value":838},{"type":48,"tag":208,"props":885,"children":886},{"style":372},[887],{"type":54,"value":843},{"type":48,"tag":208,"props":889,"children":890},{"style":378},[891],{"type":54,"value":848},{"type":48,"tag":208,"props":893,"children":894},{"style":378},[895],{"type":54,"value":853},{"type":48,"tag":208,"props":897,"children":898},{"style":311},[899],{"type":54,"value":900},"sacct -j \u003Cjobid> --format=JobID,JobName,State,Elapsed,MaxRSS,ExitCode",{"type":48,"tag":208,"props":902,"children":903},{"style":378},[904],{"type":54,"value":905},"'\n",{"type":48,"tag":63,"props":907,"children":908},{},[909],{"type":54,"value":910},"解读要点：",{"type":48,"tag":69,"props":912,"children":913},{},[914,964,1023],{"type":48,"tag":73,"props":915,"children":916},{},[917,923,925,931,933,939,941,947,948,954,956,962],{"type":48,"tag":110,"props":918,"children":920},{"className":919},[],[921],{"type":54,"value":922},"PD",{"type":54,"value":924},"（排队）看 ",{"type":48,"tag":110,"props":926,"children":928},{"className":927},[],[929],{"type":54,"value":930},"squeue",{"type":54,"value":932}," 的 ",{"type":48,"tag":110,"props":934,"children":936},{"className":935},[],[937],{"type":54,"value":938},"NODELIST(REASON)",{"type":54,"value":940},"：",{"type":48,"tag":110,"props":942,"children":944},{"className":943},[],[945],{"type":54,"value":946},"Resources",{"type":54,"value":628},{"type":48,"tag":110,"props":949,"children":951},{"className":950},[],[952],{"type":54,"value":953},"Priority",{"type":54,"value":955}," 是正常排队；",{"type":48,"tag":110,"props":957,"children":959},{"className":958},[],[960],{"type":54,"value":961},"ReqNodeNotAvail",{"type":54,"value":963}," 等多为资源请求超分区配置，应改脚本而不是干等。",{"type":48,"tag":73,"props":965,"children":966},{},[967,969,975,977,983,985,991,992,998,1000,1006,1008,1014,1015,1021],{"type":54,"value":968},"作业结束后一律 ",{"type":48,"tag":110,"props":970,"children":972},{"className":971},[],[973],{"type":54,"value":974},"sacct",{"type":54,"value":976}," 确认 ",{"type":48,"tag":110,"props":978,"children":980},{"className":979},[],[981],{"type":54,"value":982},"State",{"type":54,"value":984}," 与 ",{"type":48,"tag":110,"props":986,"children":988},{"className":987},[],[989],{"type":54,"value":990},"ExitCode",{"type":54,"value":940},{"type":48,"tag":110,"props":993,"children":995},{"className":994},[],[996],{"type":54,"value":997},"COMPLETED",{"type":54,"value":999}," + ",{"type":48,"tag":110,"props":1001,"children":1003},{"className":1002},[],[1004],{"type":54,"value":1005},"0:0",{"type":54,"value":1007}," 才算成功；",{"type":48,"tag":110,"props":1009,"children":1011},{"className":1010},[],[1012],{"type":54,"value":1013},"TIMEOUT",{"type":54,"value":628},{"type":48,"tag":110,"props":1016,"children":1018},{"className":1017},[],[1019],{"type":54,"value":1020},"OUT_OF_MEMORY",{"type":54,"value":1022}," 按第 4 节处理。",{"type":48,"tag":73,"props":1024,"children":1025},{},[1026],{"type":54,"value":1027},"不轮询刷屏：查询间隔不低于分钟级；长作业用 run-monitor 思路\"提交后离开，定期回来查\"，不让人机空等。",{"type":48,"tag":57,"props":1029,"children":1031},{"id":1030},"_3-批量作业数组任务",[1032],{"type":54,"value":1033},"3 · 批量作业：数组任务",{"type":48,"tag":63,"props":1035,"children":1036},{},[1037],{"type":54,"value":1038},"同脚本多参数（多 seed、多数据分片）一律用 job array，禁止 for 循环逐条 sbatch：",{"type":48,"tag":197,"props":1040,"children":1042},{"className":199,"code":1041,"language":201,"meta":202,"style":202},"#SBATCH --array=0-99%10            # 100 个任务，最多同时 10 个（%10 限制并发，别挤爆队列）\n\npython3 \"$HOME\u002Fcode\u002Fanalyze.py\" --seed \"$SLURM_ARRAY_TASK_ID\" \\\n    --out \"$HOME\u002Fruns\u002F${SLURM_JOB_NAME}-${SLURM_ARRAY_JOB_ID}\u002Ftask-${SLURM_ARRAY_TASK_ID}\"\n",[1043],{"type":48,"tag":110,"props":1044,"children":1045},{"__ignoreMap":202},[1046,1054,1061,1106],{"type":48,"tag":208,"props":1047,"children":1048},{"class":210,"line":211},[1049],{"type":48,"tag":208,"props":1050,"children":1051},{"style":215},[1052],{"type":54,"value":1053},"#SBATCH --array=0-99%10            # 100 个任务，最多同时 10 个（%10 限制并发，别挤爆队列）\n",{"type":48,"tag":208,"props":1055,"children":1056},{"class":210,"line":30},[1057],{"type":48,"tag":208,"props":1058,"children":1059},{"emptyLinePlaceholder":295},[1060],{"type":54,"value":298},{"type":48,"tag":208,"props":1062,"children":1063},{"class":210,"line":229},[1064,1068,1072,1076,1081,1085,1089,1093,1098,1102],{"type":48,"tag":208,"props":1065,"children":1066},{"style":478},[1067],{"type":54,"value":531},{"type":48,"tag":208,"props":1069,"children":1070},{"style":378},[1071],{"type":54,"value":491},{"type":48,"tag":208,"props":1073,"children":1074},{"style":372},[1075],{"type":54,"value":432},{"type":48,"tag":208,"props":1077,"children":1078},{"style":311},[1079],{"type":54,"value":1080},"\u002Fcode\u002Fanalyze.py",{"type":48,"tag":208,"props":1082,"children":1083},{"style":378},[1084],{"type":54,"value":427},{"type":48,"tag":208,"props":1086,"children":1087},{"style":311},[1088],{"type":54,"value":553},{"type":48,"tag":208,"props":1090,"children":1091},{"style":378},[1092],{"type":54,"value":491},{"type":48,"tag":208,"props":1094,"children":1095},{"style":372},[1096],{"type":54,"value":1097},"$SLURM_ARRAY_TASK_ID",{"type":48,"tag":208,"props":1099,"children":1100},{"style":378},[1101],{"type":54,"value":427},{"type":48,"tag":208,"props":1103,"children":1104},{"style":372},[1105],{"type":54,"value":682},{"type":48,"tag":208,"props":1107,"children":1108},{"class":210,"line":238},[1109,1114,1118,1122,1126,1130,1134,1138,1142,1146,1151,1155,1160,1164,1169],{"type":48,"tag":208,"props":1110,"children":1111},{"style":311},[1112],{"type":54,"value":1113},"    --out",{"type":48,"tag":208,"props":1115,"children":1116},{"style":378},[1117],{"type":54,"value":491},{"type":48,"tag":208,"props":1119,"children":1120},{"style":372},[1121],{"type":54,"value":432},{"type":48,"tag":208,"props":1123,"children":1124},{"style":311},[1125],{"type":54,"value":437},{"type":48,"tag":208,"props":1127,"children":1128},{"style":378},[1129],{"type":54,"value":442},{"type":48,"tag":208,"props":1131,"children":1132},{"style":372},[1133],{"type":54,"value":447},{"type":48,"tag":208,"props":1135,"children":1136},{"style":378},[1137],{"type":54,"value":452},{"type":48,"tag":208,"props":1139,"children":1140},{"style":311},[1141],{"type":54,"value":457},{"type":48,"tag":208,"props":1143,"children":1144},{"style":378},[1145],{"type":54,"value":442},{"type":48,"tag":208,"props":1147,"children":1148},{"style":372},[1149],{"type":54,"value":1150},"SLURM_ARRAY_JOB_ID",{"type":48,"tag":208,"props":1152,"children":1153},{"style":378},[1154],{"type":54,"value":452},{"type":48,"tag":208,"props":1156,"children":1157},{"style":311},[1158],{"type":54,"value":1159},"\u002Ftask-",{"type":48,"tag":208,"props":1161,"children":1162},{"style":378},[1163],{"type":54,"value":442},{"type":48,"tag":208,"props":1165,"children":1166},{"style":372},[1167],{"type":54,"value":1168},"SLURM_ARRAY_TASK_ID",{"type":48,"tag":208,"props":1170,"children":1171},{"style":378},[1172],{"type":54,"value":471},{"type":48,"tag":63,"props":1174,"children":1175},{},[1176],{"type":54,"value":1177},"纪律：",{"type":48,"tag":69,"props":1179,"children":1180},{},[1181,1186,1199],{"type":48,"tag":73,"props":1182,"children":1183},{},[1184],{"type":54,"value":1185},"每个数组元素产物独立目录（带 task id），互不覆盖；",{"type":48,"tag":73,"props":1187,"children":1188},{},[1189,1191,1197],{"type":54,"value":1190},"首次跑大批量前先用 ",{"type":48,"tag":110,"props":1192,"children":1194},{"className":1193},[],[1195],{"type":54,"value":1196},"--array=0-2",{"type":54,"value":1198}," 小规模试跑，确认单任务资源估算正确，再提交全量；",{"type":48,"tag":73,"props":1200,"children":1201},{},[1202,1204,1210],{"type":54,"value":1203},"抓回时按 ",{"type":48,"tag":110,"props":1205,"children":1207},{"className":1206},[],[1208],{"type":54,"value":1209},"${SLURM_ARRAY_JOB_ID}",{"type":54,"value":1211}," 整目录 rsync，record_run 一条登记、note 写数组范围与失败元素。",{"type":48,"tag":57,"props":1213,"children":1215},{"id":1214},"_4-超时与重排队策略",[1216],{"type":54,"value":1217},"4 · 超时与重排队策略",{"type":48,"tag":69,"props":1219,"children":1220},{},[1221,1238,1269,1287,1297],{"type":48,"tag":73,"props":1222,"children":1223},{},[1224,1228,1230,1236],{"type":48,"tag":102,"props":1225,"children":1226},{},[1227],{"type":54,"value":1013},{"type":54,"value":1229},"：先查日志判断是\"差一步\"还是\"差很远\"。差一步：加大 ",{"type":48,"tag":110,"props":1231,"children":1233},{"className":1232},[],[1234],{"type":54,"value":1235},"--time",{"type":54,"value":1237}," 重交；差很远：检查是否有死循环或规模估计错误，修复后重交。同一作业连续两次 TIMEOUT 不得原样重交，必须先改东西。",{"type":48,"tag":73,"props":1239,"children":1240},{},[1241,1245,1247,1252,1253,1259,1261,1267],{"type":48,"tag":102,"props":1242,"children":1243},{},[1244],{"type":54,"value":1020},{"type":54,"value":1246},"：按 ",{"type":48,"tag":110,"props":1248,"children":1250},{"className":1249},[],[1251],{"type":54,"value":974},{"type":54,"value":932},{"type":48,"tag":110,"props":1254,"children":1256},{"className":1255},[],[1257],{"type":54,"value":1258},"MaxRSS",{"type":54,"value":1260}," 实测值上调 ",{"type":48,"tag":110,"props":1262,"children":1264},{"className":1263},[],[1265],{"type":54,"value":1266},"--mem",{"type":54,"value":1268},"（留 20% 余量）重交。",{"type":48,"tag":73,"props":1270,"children":1271},{},[1272,1277,1279,1285],{"type":48,"tag":102,"props":1273,"children":1274},{},[1275],{"type":54,"value":1276},"FAILED（非零退出）",{"type":54,"value":1278},"：读 ",{"type":48,"tag":110,"props":1280,"children":1282},{"className":1281},[],[1283],{"type":54,"value":1284},".err",{"type":54,"value":1286}," 定位，修复后重交；失败作业同样登记 provenance（paths 指向抓回的日志）。",{"type":48,"tag":73,"props":1288,"children":1289},{},[1290,1295],{"type":48,"tag":102,"props":1291,"children":1292},{},[1293],{"type":54,"value":1294},"可断点续算的任务",{"type":54,"value":1296},"：脚本内支持 checkpoint（存在则续跑），超时重交即自动续算；长任务优先设计成可续算的。",{"type":48,"tag":73,"props":1298,"children":1299},{},[1300],{"type":54,"value":1301},"重排队是新的资源消耗：批量重交前向用户说明失败原因与新增机时。",{"type":48,"tag":57,"props":1303,"children":1305},{"id":1304},"_5-产物抓回与-record_run",[1306],{"type":54,"value":1307},"5 · 产物抓回与 record_run",{"type":48,"tag":63,"props":1309,"children":1310},{},[1311],{"type":54,"value":1312},"自动 rsync（模板末尾）不通时，完成后手动抓回：",{"type":48,"tag":197,"props":1314,"children":1316},{"className":199,"code":1315,"language":201,"meta":202,"style":202},"rsync -avz \u003Calias>:~\u002Fruns\u002F\u003Cjob-name>-\u003Cjobid>\u002F results\u002F\u003Cjob-name>-\u003Cjobid>\u002F\npython \u003C插件包路径>\u002Fskills\u002Fprovenance-record\u002Fscripts\u002Frecord_run.py \\\n  --path results\u002F\u003Cjob-name>-\u003Cjobid>\u002F \\\n  --tool \"slurm job \u003Cjobid> (\u003Cjob-name>.sbatch)\" \\\n  --note \"分区 \u003Cp>，8 核 32G 1×GPU，实际耗时 \u003CElapsed>，ExitCode 0:0，节点 \u003CNodeList>\"\n",[1317],{"type":48,"tag":110,"props":1318,"children":1319},{"__ignoreMap":202},[1320,1443,1478,1534,1559],{"type":48,"tag":208,"props":1321,"children":1322},{"class":210,"line":211},[1323,1327,1331,1335,1339,1343,1347,1352,1357,1362,1367,1371,1375,1379,1384,1389,1393,1397,1402,1406,1410,1414,1418,1422,1426,1430,1434,1438],{"type":48,"tag":208,"props":1324,"children":1325},{"style":478},[1326],{"type":54,"value":610},{"type":48,"tag":208,"props":1328,"children":1329},{"style":311},[1330],{"type":54,"value":615},{"type":48,"tag":208,"props":1332,"children":1333},{"style":378},[1334],{"type":54,"value":833},{"type":48,"tag":208,"props":1336,"children":1337},{"style":311},[1338],{"type":54,"value":838},{"type":48,"tag":208,"props":1340,"children":1341},{"style":372},[1342],{"type":54,"value":843},{"type":48,"tag":208,"props":1344,"children":1345},{"style":378},[1346],{"type":54,"value":848},{"type":48,"tag":208,"props":1348,"children":1349},{"style":311},[1350],{"type":54,"value":1351},":~\u002Fruns\u002F",{"type":48,"tag":208,"props":1353,"children":1354},{"style":378},[1355],{"type":54,"value":1356},"\u003C",{"type":48,"tag":208,"props":1358,"children":1359},{"style":311},[1360],{"type":54,"value":1361},"job-nam",{"type":48,"tag":208,"props":1363,"children":1364},{"style":372},[1365],{"type":54,"value":1366},"e",{"type":48,"tag":208,"props":1368,"children":1369},{"style":378},[1370],{"type":54,"value":848},{"type":48,"tag":208,"props":1372,"children":1373},{"style":311},[1374],{"type":54,"value":457},{"type":48,"tag":208,"props":1376,"children":1377},{"style":378},[1378],{"type":54,"value":1356},{"type":48,"tag":208,"props":1380,"children":1381},{"style":311},[1382],{"type":54,"value":1383},"jobi",{"type":48,"tag":208,"props":1385,"children":1386},{"style":372},[1387],{"type":54,"value":1388},"d",{"type":48,"tag":208,"props":1390,"children":1391},{"style":378},[1392],{"type":54,"value":848},{"type":48,"tag":208,"props":1394,"children":1395},{"style":311},[1396],{"type":54,"value":628},{"type":48,"tag":208,"props":1398,"children":1399},{"style":311},[1400],{"type":54,"value":1401}," results\u002F",{"type":48,"tag":208,"props":1403,"children":1404},{"style":378},[1405],{"type":54,"value":1356},{"type":48,"tag":208,"props":1407,"children":1408},{"style":311},[1409],{"type":54,"value":1361},{"type":48,"tag":208,"props":1411,"children":1412},{"style":372},[1413],{"type":54,"value":1366},{"type":48,"tag":208,"props":1415,"children":1416},{"style":378},[1417],{"type":54,"value":848},{"type":48,"tag":208,"props":1419,"children":1420},{"style":311},[1421],{"type":54,"value":457},{"type":48,"tag":208,"props":1423,"children":1424},{"style":378},[1425],{"type":54,"value":1356},{"type":48,"tag":208,"props":1427,"children":1428},{"style":311},[1429],{"type":54,"value":1383},{"type":48,"tag":208,"props":1431,"children":1432},{"style":372},[1433],{"type":54,"value":1388},{"type":48,"tag":208,"props":1435,"children":1436},{"style":378},[1437],{"type":54,"value":848},{"type":48,"tag":208,"props":1439,"children":1440},{"style":311},[1441],{"type":54,"value":1442},"\u002F\n",{"type":48,"tag":208,"props":1444,"children":1445},{"class":210,"line":30},[1446,1451,1455,1460,1465,1469,1474],{"type":48,"tag":208,"props":1447,"children":1448},{"style":478},[1449],{"type":54,"value":1450},"python",{"type":48,"tag":208,"props":1452,"children":1453},{"style":378},[1454],{"type":54,"value":833},{"type":48,"tag":208,"props":1456,"children":1457},{"style":311},[1458],{"type":54,"value":1459},"插件包路",{"type":48,"tag":208,"props":1461,"children":1462},{"style":372},[1463],{"type":54,"value":1464},"径",{"type":48,"tag":208,"props":1466,"children":1467},{"style":378},[1468],{"type":54,"value":848},{"type":48,"tag":208,"props":1470,"children":1471},{"style":311},[1472],{"type":54,"value":1473},"\u002Fskills\u002Fprovenance-record\u002Fscripts\u002Frecord_run.py",{"type":48,"tag":208,"props":1475,"children":1476},{"style":372},[1477],{"type":54,"value":682},{"type":48,"tag":208,"props":1479,"children":1480},{"class":210,"line":229},[1481,1486,1490,1494,1498,1502,1506,1510,1514,1518,1522,1526,1530],{"type":48,"tag":208,"props":1482,"children":1483},{"style":311},[1484],{"type":54,"value":1485},"  --path",{"type":48,"tag":208,"props":1487,"children":1488},{"style":311},[1489],{"type":54,"value":1401},{"type":48,"tag":208,"props":1491,"children":1492},{"style":378},[1493],{"type":54,"value":1356},{"type":48,"tag":208,"props":1495,"children":1496},{"style":311},[1497],{"type":54,"value":1361},{"type":48,"tag":208,"props":1499,"children":1500},{"style":372},[1501],{"type":54,"value":1366},{"type":48,"tag":208,"props":1503,"children":1504},{"style":378},[1505],{"type":54,"value":848},{"type":48,"tag":208,"props":1507,"children":1508},{"style":311},[1509],{"type":54,"value":457},{"type":48,"tag":208,"props":1511,"children":1512},{"style":378},[1513],{"type":54,"value":1356},{"type":48,"tag":208,"props":1515,"children":1516},{"style":311},[1517],{"type":54,"value":1383},{"type":48,"tag":208,"props":1519,"children":1520},{"style":372},[1521],{"type":54,"value":1388},{"type":48,"tag":208,"props":1523,"children":1524},{"style":378},[1525],{"type":54,"value":848},{"type":48,"tag":208,"props":1527,"children":1528},{"style":311},[1529],{"type":54,"value":628},{"type":48,"tag":208,"props":1531,"children":1532},{"style":372},[1533],{"type":54,"value":682},{"type":48,"tag":208,"props":1535,"children":1536},{"class":210,"line":238},[1537,1542,1546,1551,1555],{"type":48,"tag":208,"props":1538,"children":1539},{"style":311},[1540],{"type":54,"value":1541},"  --tool",{"type":48,"tag":208,"props":1543,"children":1544},{"style":378},[1545],{"type":54,"value":491},{"type":48,"tag":208,"props":1547,"children":1548},{"style":311},[1549],{"type":54,"value":1550},"slurm job \u003Cjobid> (\u003Cjob-name>.sbatch)",{"type":48,"tag":208,"props":1552,"children":1553},{"style":378},[1554],{"type":54,"value":427},{"type":48,"tag":208,"props":1556,"children":1557},{"style":372},[1558],{"type":54,"value":682},{"type":48,"tag":208,"props":1560,"children":1561},{"class":210,"line":26},[1562,1567,1571,1576],{"type":48,"tag":208,"props":1563,"children":1564},{"style":311},[1565],{"type":54,"value":1566},"  --note",{"type":48,"tag":208,"props":1568,"children":1569},{"style":378},[1570],{"type":54,"value":491},{"type":48,"tag":208,"props":1572,"children":1573},{"style":311},[1574],{"type":54,"value":1575},"分区 \u003Cp>，8 核 32G 1×GPU，实际耗时 \u003CElapsed>，ExitCode 0:0，节点 \u003CNodeList>",{"type":48,"tag":208,"props":1577,"children":1578},{"style":378},[1579],{"type":54,"value":501},{"type":48,"tag":63,"props":1581,"children":1582},{},[1583,1585,1591],{"type":54,"value":1584},"不记录的运行等于不存在：note 里作业号、sacct 的 Elapsed\u002FExitCode\u002FNodeList 缺一不可；远程环境版本（",{"type":48,"tag":110,"props":1586,"children":1588},{"className":1587},[],[1589],{"type":54,"value":1590},"module list",{"type":54,"value":1592}," 摘要）有条件就附在 note 或抓回的日志里。",{"type":48,"tag":57,"props":1594,"children":1596},{"id":1595},"_6-经-run_task-登记-slurm-作业",[1597],{"type":54,"value":1598},"6 · 经 run_task 登记 Slurm 作业",{"type":48,"tag":63,"props":1600,"children":1601},{},[1602],{"type":54,"value":1603},"sbatch 提交成功、拿到 jobid 后，立即把\"盯这个作业\"登记成一个本地 Run——用 run-monitor 的 Run 抽象统一管理本地与远程长任务：Run 只记录\"任务叫什么、怎么查状态、查到了什么\"，不关心任务跑在本机还是集群：",{"type":48,"tag":197,"props":1605,"children":1607},{"className":199,"code":1606,"language":201,"meta":202,"style":202},"python \u003C插件包路径>\u002Fskills\u002Frun-monitor\u002Fscripts\u002Frun_task.py \\\n  start --name \u003Cjob-name>-\u003Cjobid> \\\n  --tag slurm --tag \u003Ccluster> \\\n  --cmd \"ssh \u003Calias> 'sacct -j \u003Cjobid> --format=State -n | head -1'\"\n",[1608],{"type":48,"tag":110,"props":1609,"children":1610},{"__ignoreMap":202},[1611,1643,1696,1736],{"type":48,"tag":208,"props":1612,"children":1613},{"class":210,"line":211},[1614,1618,1622,1626,1630,1634,1639],{"type":48,"tag":208,"props":1615,"children":1616},{"style":478},[1617],{"type":54,"value":1450},{"type":48,"tag":208,"props":1619,"children":1620},{"style":378},[1621],{"type":54,"value":833},{"type":48,"tag":208,"props":1623,"children":1624},{"style":311},[1625],{"type":54,"value":1459},{"type":48,"tag":208,"props":1627,"children":1628},{"style":372},[1629],{"type":54,"value":1464},{"type":48,"tag":208,"props":1631,"children":1632},{"style":378},[1633],{"type":54,"value":848},{"type":48,"tag":208,"props":1635,"children":1636},{"style":311},[1637],{"type":54,"value":1638},"\u002Fskills\u002Frun-monitor\u002Fscripts\u002Frun_task.py",{"type":48,"tag":208,"props":1640,"children":1641},{"style":372},[1642],{"type":54,"value":682},{"type":48,"tag":208,"props":1644,"children":1645},{"class":210,"line":30},[1646,1651,1656,1660,1664,1668,1672,1676,1680,1684,1688,1692],{"type":48,"tag":208,"props":1647,"children":1648},{"style":311},[1649],{"type":54,"value":1650},"  start",{"type":48,"tag":208,"props":1652,"children":1653},{"style":311},[1654],{"type":54,"value":1655}," --name",{"type":48,"tag":208,"props":1657,"children":1658},{"style":378},[1659],{"type":54,"value":833},{"type":48,"tag":208,"props":1661,"children":1662},{"style":311},[1663],{"type":54,"value":1361},{"type":48,"tag":208,"props":1665,"children":1666},{"style":372},[1667],{"type":54,"value":1366},{"type":48,"tag":208,"props":1669,"children":1670},{"style":378},[1671],{"type":54,"value":848},{"type":48,"tag":208,"props":1673,"children":1674},{"style":311},[1675],{"type":54,"value":457},{"type":48,"tag":208,"props":1677,"children":1678},{"style":378},[1679],{"type":54,"value":1356},{"type":48,"tag":208,"props":1681,"children":1682},{"style":311},[1683],{"type":54,"value":1383},{"type":48,"tag":208,"props":1685,"children":1686},{"style":372},[1687],{"type":54,"value":1388},{"type":48,"tag":208,"props":1689,"children":1690},{"style":378},[1691],{"type":54,"value":848},{"type":48,"tag":208,"props":1693,"children":1694},{"style":372},[1695],{"type":54,"value":682},{"type":48,"tag":208,"props":1697,"children":1698},{"class":210,"line":229},[1699,1704,1709,1714,1718,1723,1728,1732],{"type":48,"tag":208,"props":1700,"children":1701},{"style":311},[1702],{"type":54,"value":1703},"  --tag",{"type":48,"tag":208,"props":1705,"children":1706},{"style":311},[1707],{"type":54,"value":1708}," slurm",{"type":48,"tag":208,"props":1710,"children":1711},{"style":311},[1712],{"type":54,"value":1713}," --tag",{"type":48,"tag":208,"props":1715,"children":1716},{"style":378},[1717],{"type":54,"value":833},{"type":48,"tag":208,"props":1719,"children":1720},{"style":311},[1721],{"type":54,"value":1722},"cluste",{"type":48,"tag":208,"props":1724,"children":1725},{"style":372},[1726],{"type":54,"value":1727},"r",{"type":48,"tag":208,"props":1729,"children":1730},{"style":378},[1731],{"type":54,"value":848},{"type":48,"tag":208,"props":1733,"children":1734},{"style":372},[1735],{"type":54,"value":682},{"type":48,"tag":208,"props":1737,"children":1738},{"class":210,"line":238},[1739,1744,1748,1753],{"type":48,"tag":208,"props":1740,"children":1741},{"style":311},[1742],{"type":54,"value":1743},"  --cmd",{"type":48,"tag":208,"props":1745,"children":1746},{"style":378},[1747],{"type":54,"value":491},{"type":48,"tag":208,"props":1749,"children":1750},{"style":311},[1751],{"type":54,"value":1752},"ssh \u003Calias> 'sacct -j \u003Cjobid> --format=State -n | head -1'",{"type":48,"tag":208,"props":1754,"children":1755},{"style":378},[1756],{"type":54,"value":501},{"type":48,"tag":63,"props":1758,"children":1759},{},[1760],{"type":54,"value":1761},"模式说明：",{"type":48,"tag":69,"props":1763,"children":1764},{},[1765,1775,1793,1826],{"type":48,"tag":73,"props":1766,"children":1767},{},[1768,1773],{"type":48,"tag":102,"props":1769,"children":1770},{},[1771],{"type":54,"value":1772},"登记即交还",{"type":54,"value":1774},"：start 把这条状态查询命令放到后台执行并立即返回，会话不空等；run.json 的 cmd 字段留下\"当时用哪条命令查的\"，口径与第 2 节一致，tags 与 note 一并落盘。",{"type":48,"tag":73,"props":1776,"children":1777},{},[1778,1783,1785,1791],{"type":48,"tag":102,"props":1779,"children":1780},{},[1781],{"type":54,"value":1782},"轮询即重跑",{"type":54,"value":1784},"：想看最新状态时同名再 start 一次（已 exited 的 run 允许被新 start 覆盖，日志随之重写），然后 ",{"type":48,"tag":110,"props":1786,"children":1788},{"className":1787},[],[1789],{"type":54,"value":1790},"tail",{"type":54,"value":1792}," 看这次查到的 State；查询间隔不低于分钟级的纪律不变，不写忙等循环。",{"type":48,"tag":73,"props":1794,"children":1795},{},[1796,1801,1802,1808,1810,1816,1818,1824],{"type":48,"tag":102,"props":1797,"children":1798},{},[1799],{"type":54,"value":1800},"tags 即检索口径",{"type":54,"value":940},{"type":48,"tag":110,"props":1803,"children":1805},{"className":1804},[],[1806],{"type":54,"value":1807},"--tag slurm --tag \u003Ccluster>",{"type":54,"value":1809}," 让 ",{"type":48,"tag":110,"props":1811,"children":1813},{"className":1812},[],[1814],{"type":54,"value":1815},"run_task list",{"type":54,"value":1817}," 把集群作业与本地任务一眼分开；多集群、多作业并发时按 tag 认作业，不靠记忆。补充背景（分区、资源、预计时长）用 ",{"type":48,"tag":110,"props":1819,"children":1821},{"className":1820},[],[1822],{"type":54,"value":1823},"--note",{"type":54,"value":1825}," 写一句。",{"type":48,"tag":73,"props":1827,"children":1828},{},[1829,1834],{"type":48,"tag":102,"props":1830,"children":1831},{},[1832],{"type":54,"value":1833},"终态与抓回纪律不变",{"type":54,"value":1835},"：sacct 显示 COMPLETED\u002FFAILED\u002FTIMEOUT 后，产物抓回与 record_run 登记仍按第 5 节执行，一个字不改；Run 替代的是\"人机空等\"，不替代 provenance。",{"type":48,"tag":57,"props":1837,"children":1839},{"id":1838},"输出模板",[1840],{"type":54,"value":1838},{"type":48,"tag":197,"props":1842,"children":1846},{"className":1843,"code":1844,"language":1845,"meta":202,"style":202},"language-markdown shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","## Slurm 作业已提交（\u003Cjob-name> @ \u003Calias>）\n\n- jobid：\u003Cid>，分区：\u003Cp>，资源：\u003C核\u002F内存\u002FGPU\u002F时长>\n- 预计排队：\u003Csqueue 观察>；查询：ssh \u003Calias> 'squeue -j \u003Cid>'\n- 完成后：自动 rsync 至 results\u002F\u003Cjob-name>-\u003Cid>\u002F 或按第 5 节手动抓回 + record_run\n","markdown",[1847],{"type":48,"tag":110,"props":1848,"children":1849},{"__ignoreMap":202},[1850,1863,1870,1882,1894],{"type":48,"tag":208,"props":1851,"children":1852},{"class":210,"line":211},[1853,1858],{"type":48,"tag":208,"props":1854,"children":1855},{"style":378},[1856],{"type":54,"value":1857},"## ",{"type":48,"tag":208,"props":1859,"children":1860},{"style":478},[1861],{"type":54,"value":1862},"Slurm 作业已提交（\u003Cjob-name> @ \u003Calias>）\n",{"type":48,"tag":208,"props":1864,"children":1865},{"class":210,"line":30},[1866],{"type":48,"tag":208,"props":1867,"children":1868},{"emptyLinePlaceholder":295},[1869],{"type":54,"value":298},{"type":48,"tag":208,"props":1871,"children":1872},{"class":210,"line":229},[1873,1877],{"type":48,"tag":208,"props":1874,"children":1875},{"style":378},[1876],{"type":54,"value":457},{"type":48,"tag":208,"props":1878,"children":1879},{"style":372},[1880],{"type":54,"value":1881}," jobid：\u003Cid>，分区：\u003Cp>，资源：\u003C核\u002F内存\u002FGPU\u002F时长>\n",{"type":48,"tag":208,"props":1883,"children":1884},{"class":210,"line":238},[1885,1889],{"type":48,"tag":208,"props":1886,"children":1887},{"style":378},[1888],{"type":54,"value":457},{"type":48,"tag":208,"props":1890,"children":1891},{"style":372},[1892],{"type":54,"value":1893}," 预计排队：\u003Csqueue 观察>；查询：ssh \u003Calias> 'squeue -j \u003Cid>'\n",{"type":48,"tag":208,"props":1895,"children":1896},{"class":210,"line":26},[1897,1901],{"type":48,"tag":208,"props":1898,"children":1899},{"style":378},[1900],{"type":54,"value":457},{"type":48,"tag":208,"props":1902,"children":1903},{"style":372},[1904],{"type":54,"value":1905}," 完成后：自动 rsync 至 results\u002F\u003Cjob-name>-\u003Cid>\u002F 或按第 5 节手动抓回 + record_run\n",{"type":48,"tag":57,"props":1907,"children":1909},{"id":1908},"本技能不做什么",[1910],{"type":54,"value":1908},{"type":48,"tag":1912,"props":1913,"children":1914},"ul",{},[1915,1920,1925,1938,1943],{"type":48,"tag":73,"props":1916,"children":1917},{},[1918],{"type":54,"value":1919},"不探测主机与管连接：别名、ControlMaster、画像合同、失败分支一律沿用 remote-compute，本文件不重复。",{"type":48,"tag":73,"props":1921,"children":1922},{},[1923],{"type":54,"value":1924},"不保证队列策略最优：分区选择、机时估计给建议，最终以用户所在集群的实际规定（画像 notes）为准。",{"type":48,"tag":73,"props":1926,"children":1927},{},[1928,1930,1936],{"type":54,"value":1929},"不自动 kill 作业：",{"type":48,"tag":110,"props":1931,"children":1933},{"className":1932},[],[1934],{"type":54,"value":1935},"scancel",{"type":54,"value":1937}," 只建议不执行，除非用户当场明确确认（影响共享队列状态）。",{"type":48,"tag":73,"props":1939,"children":1940},{},[1941],{"type":54,"value":1942},"不管非 Slurm 调度器：PBS\u002FLSF 语法不同，本规程不套用；画像 scheduler 非 slurm 时按 remote-compute 的交互式方案。",{"type":48,"tag":73,"props":1944,"children":1945},{},[1946],{"type":54,"value":1947},"不替用户盯梢：提交后告知查询命令即交还控制权，长周期作业由用户按节奏回来查（或按第 6 节用 run_task 登记）。",{"type":48,"tag":57,"props":1949,"children":1951},{"id":1950},"收尾与下一步",[1952],{"type":54,"value":1950},{"type":48,"tag":1912,"props":1954,"children":1955},{},[1956,1961,1966,1971],{"type":48,"tag":73,"props":1957,"children":1958},{},[1959],{"type":54,"value":1960},"作业成功后：确认 rsync 完成、record_run 已登记、产物按契约归位（latest 刷新）。",{"type":48,"tag":73,"props":1962,"children":1963},{},[1964],{"type":54,"value":1965},"批量作业：核对数组元素完整性（100 个任务 100 个产物目录），缺的按第 4 节补交。",{"type":48,"tag":73,"props":1967,"children":1968},{},[1969],{"type":54,"value":1970},"结论进论文前：sbatch 脚本 + sacct 摘要 + 产物一并进 evidence-capsule 冻结。",{"type":48,"tag":73,"props":1972,"children":1973},{},[1974],{"type":54,"value":1975},"作业失败：登记失败记录后诊断，诊断结论写进下一条 provenance note，形成可追溯的试错链。",{"type":48,"tag":1977,"props":1978,"children":1979},"style",{},[1980],{"type":54,"value":1981},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1983,"total":2184},[1984,2008,2024,2043,2058,2078,2096,2114,2129,2145,2164,2174],{"slug":1985,"name":1985,"fn":1986,"description":1987,"org":1988,"tags":1989,"stars":2005,"repoUrl":2006,"updatedAt":2007},"android-native-dev","develop Android native applications","Android native application development and UI design guide. Covers Material Design 3, Kotlin\u002FCompose development, project configuration, accessibility, and build troubleshooting. Read this before Android native application development.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1990,1993,1996,1999,2002],{"name":1991,"slug":1992,"type":16},"Accessibility","accessibility",{"name":1994,"slug":1995,"type":16},"Android","android",{"name":1997,"slug":1998,"type":16},"Kotlin","kotlin",{"name":2000,"slug":2001,"type":16},"Mobile","mobile",{"name":2003,"slug":2004,"type":16},"UI Components","ui-components",13030,"https:\u002F\u002Fgithub.com\u002FMiniMax-AI\u002Fskills","2026-07-13T06:16:54.247834",{"slug":2009,"name":2009,"fn":2010,"description":2011,"org":2012,"tags":2013,"stars":2005,"repoUrl":2006,"updatedAt":2023},"buddy-sings","generate singing performances for AI companions","Use when user wants their Claude Code pet (\u002Fbuddy) to sing a song. Triggers on any request that combines the concept of their Claude Code buddy, pet, or companion with singing or music. Supports multilingual triggers — match equivalent phrases in any language.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2014,2017,2020],{"name":2015,"slug":2016,"type":16},"Agents","agents",{"name":2018,"slug":2019,"type":16},"Audio","audio",{"name":2021,"slug":2022,"type":16},"Creative","creative","2026-07-13T06:16:35.130644",{"slug":2025,"name":2025,"fn":2026,"description":2027,"org":2028,"tags":2029,"stars":2005,"repoUrl":2006,"updatedAt":2042},"color-font-skill","select color palettes and font pairings","Choose presentation-ready color palettes and font pairings for PPT\u002Fdesign tasks. Use when users ask for visual theme choices, brand-safe palettes, or font recommendations. Triggers include: 配色, 色板, 字体, color palette, font, PPT配色, 字体搭配.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2030,2033,2036,2039],{"name":2031,"slug":2032,"type":16},"Design","design",{"name":2034,"slug":2035,"type":16},"Presentations","presentations",{"name":2037,"slug":2038,"type":16},"Themes","themes",{"name":2040,"slug":2041,"type":16},"Typography","typography","2026-07-13T06:17:02.785587",{"slug":2044,"name":2044,"fn":2045,"description":2046,"org":2047,"tags":2048,"stars":2005,"repoUrl":2006,"updatedAt":2057},"design-style-skill","select visual design systems for presentations","Select a consistent visual design system for PPT slides using radius\u002Fspacing style recipes. Use when users ask for overall style direction or component styling consistency. Includes Sharp\u002FSoft\u002FRounded\u002FPill recipes, component mappings, typography\u002Fspacing rules, and mixing guidance. Triggers: 风格, style, radius, spacing, 圆角, 间距, PPT风格, 视觉风格, design style, component style.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2049,2050,2053,2056],{"name":2031,"slug":2032,"type":16},{"name":2051,"slug":2052,"type":16},"Design System","design-system",{"name":2054,"slug":2055,"type":16},"PowerPoint","powerpoint",{"name":2034,"slug":2035,"type":16},"2026-07-13T06:17:10.398389",{"slug":2059,"name":2059,"fn":2060,"description":2061,"org":2062,"tags":2063,"stars":2005,"repoUrl":2006,"updatedAt":2077},"flutter-dev","build cross-platform apps with Flutter","Flutter cross-platform development guide covering widget patterns, Riverpod\u002FBloc state management, GoRouter navigation, performance optimization, and platform-specific implementations. Includes const optimization, responsive layouts, testing strategies, and DevTools profiling.\nUse when: building Flutter apps, implementing state management (Riverpod\u002FBloc), setting up GoRouter navigation, creating custom widgets, optimizing performance, writing widget tests, cross-platform development.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2064,2067,2070,2071,2074],{"name":2065,"slug":2066,"type":16},"Dart","dart",{"name":2068,"slug":2069,"type":16},"Flutter","flutter",{"name":2000,"slug":2001,"type":16},{"name":2072,"slug":2073,"type":16},"Performance","performance",{"name":2075,"slug":2076,"type":16},"State Management","state-management","2026-07-13T06:16:36.626679",{"slug":2079,"name":2079,"fn":2080,"description":2081,"org":2082,"tags":2083,"stars":2005,"repoUrl":2006,"updatedAt":2095},"frontend-dev","build visually striking frontend web pages","Full-stack frontend development combining premium UI design, cinematic animations,\nAI-generated media assets, persuasive copywriting, and visual art. Builds complete,\nvisually striking web pages with real media, advanced motion, and compelling copy.\nUse when: building landing pages, marketing sites, product pages, dashboards,\ngenerating media assets (image\u002Fvideo\u002Faudio\u002Fmusic), writing conversion copy,\ncreating generative art, or implementing cinematic scroll animations.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2084,2087,2088,2089,2092],{"name":2085,"slug":2086,"type":16},"Animation","animation",{"name":2021,"slug":2022,"type":16},{"name":2031,"slug":2032,"type":16},{"name":2090,"slug":2091,"type":16},"Frontend","frontend",{"name":2093,"slug":2094,"type":16},"Web Development","web-development","2026-07-13T06:16:39.108827",{"slug":2097,"name":2097,"fn":2098,"description":2099,"org":2100,"tags":2101,"stars":2005,"repoUrl":2006,"updatedAt":2113},"fullstack-dev","build full-stack web applications","Full-stack backend architecture and frontend-backend integration guide.\nTRIGGER when: building a full-stack app, creating REST API with frontend, scaffolding backend service,\nbuilding todo app, building CRUD app, building real-time app, building chat app,\nExpress + React, Next.js API, Node.js backend, Python backend, Go backend,\ndesigning service layers, implementing error handling, managing config\u002Fauth,\nsetting up API clients, implementing auth flows, handling file uploads,\nadding real-time features (SSE\u002FWebSocket), hardening for production.\nDO NOT TRIGGER when: pure frontend UI work, pure CSS\u002Fstyling, database schema only.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2102,2105,2106,2109,2112],{"name":2103,"slug":2104,"type":16},"Backend","backend",{"name":2090,"slug":2091,"type":16},{"name":2107,"slug":2108,"type":16},"Full-stack","full-stack",{"name":2110,"slug":2111,"type":16},"REST API","rest-api",{"name":2093,"slug":2094,"type":16},"2026-07-13T06:16:43.219005",{"slug":2115,"name":2115,"fn":2116,"description":2117,"org":2118,"tags":2119,"stars":2005,"repoUrl":2006,"updatedAt":2128},"gif-sticker-maker","create animated GIF stickers from photos","Convert photos (people, pets, objects, logos) into 4 animated GIF stickers with captions.\nUse when: user wants to create cartoon stickers, GIF expressions, emoji packs, animated avatars,\nor convert photos to Funko Pop \u002F Pop Mart blind box style animations.\nTriggers: sticker, GIF, cartoon, emoji, expression pack, avatar animation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2120,2121,2122,2125],{"name":2085,"slug":2086,"type":16},{"name":2021,"slug":2022,"type":16},{"name":2123,"slug":2124,"type":16},"Images","images",{"name":2126,"slug":2127,"type":16},"Media","media","2026-07-13T06:16:51.74461",{"slug":2130,"name":2130,"fn":2131,"description":2132,"org":2133,"tags":2134,"stars":2005,"repoUrl":2006,"updatedAt":2144},"ios-application-dev","develop iOS applications with SwiftUI and UIKit","iOS application development guide covering UIKit, SnapKit, and SwiftUI. Includes touch targets, safe areas, navigation patterns, Dynamic Type, Dark Mode, accessibility, collection views, common UI components, and SwiftUI design guidelines. For detailed references on specific topics, see the reference files.\nUse when: developing iOS apps, implementing UI, reviewing iOS code, working with UIKit\u002FSnapKit\u002FSwiftUI layouts, building iPhone interfaces, Swift mobile development, Apple HIG compliance, iOS accessibility implementation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2135,2136,2139,2140,2143],{"name":1991,"slug":1992,"type":16},{"name":2137,"slug":2138,"type":16},"iOS","ios",{"name":2000,"slug":2001,"type":16},{"name":2141,"slug":2142,"type":16},"SwiftUI","swiftui",{"name":2003,"slug":2004,"type":16},"2026-07-13T06:16:55.686092",{"slug":2146,"name":2146,"fn":2147,"description":2148,"org":2149,"tags":2150,"stars":2005,"repoUrl":2006,"updatedAt":2163},"minimax-docx","create and edit DOCX documents","Professional DOCX document creation, editing, and formatting using OpenXML SDK (.NET). Three pipelines: (A) create new documents from scratch, (B) fill\u002Fedit content in existing documents, (C) apply template formatting with XSD validation gate-check. MUST use this skill whenever the user wants to produce, modify, or format a Word document — including when they say \"write a report\", \"draft a proposal\", \"make a contract\", \"fill in this form\", \"reformat to match this template\", or any task whose final output is a .docx file. Even if the user doesn't mention \"docx\" explicitly, if the task implies a printable\u002Fformal document, use this skill.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2151,2154,2157,2160],{"name":2152,"slug":2153,"type":16},"Documents","documents",{"name":2155,"slug":2156,"type":16},"DOCX","docx",{"name":2158,"slug":2159,"type":16},"Office","office",{"name":2161,"slug":2162,"type":16},"Templates","templates","2026-07-13T06:16:40.461868",{"slug":2165,"name":2165,"fn":2166,"description":2167,"org":2168,"tags":2169,"stars":2005,"repoUrl":2006,"updatedAt":2173},"minimax-music-gen","generate music and audio tracks","Use when user wants to generate music, songs, or audio tracks. Triggers on any request involving music creation, song writing, lyrics generation, audio production, or covers. Also triggers when user provides lyrics and wants them turned into a song, or describes a mood\u002Fscene and wants background music. Supports multilingual triggers — match equivalent phrases in any language. Do NOT use for music playback of existing files, music theory questions, or music recommendation without generation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2170,2171,2172],{"name":2018,"slug":2019,"type":16},{"name":2021,"slug":2022,"type":16},{"name":2126,"slug":2127,"type":16},"2026-07-13T06:16:50.381758",{"slug":2175,"name":2175,"fn":2176,"description":2177,"org":2178,"tags":2179,"stars":2005,"repoUrl":2006,"updatedAt":2183},"minimax-music-playlist","generate personalized music playlists","Generate personalized music playlists by analyzing the user's music taste and generation feedback history. Triggers on any request involving playlist generation, music taste profiling, or personalized music recommendations. Supports multilingual triggers — match equivalent phrases in any language.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2180,2181,2182],{"name":2018,"slug":2019,"type":16},{"name":2021,"slug":2022,"type":16},{"name":2126,"slug":2127,"type":16},"2026-07-13T06:16:57.002997",84,{"items":2186,"total":2287},[2187,2203,2222,2234,2246,2261,2275],{"slug":2188,"name":2188,"fn":2189,"description":2190,"org":2191,"tags":2192,"stars":26,"repoUrl":27,"updatedAt":2202},"article2tasks","convert articles into Dida365 tasks","将技术周报（批量）或单篇文章整理为滴答清单待办事项，自动分类到已有清单并打标签，全程通过 MCP 写入，跨平台无需任何本地脚本。当用户提供周报内容、文章链接，或提及「周报」「文章汇总」「添加到滴答」时，使用此技能。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2193,2196,2199],{"name":2194,"slug":2195,"type":16},"Content Creation","content-creation",{"name":2197,"slug":2198,"type":16},"MCP","mcp",{"name":2200,"slug":2201,"type":16},"Task Management","task-management","2026-08-18T03:49:38.751656",{"slug":2204,"name":2204,"fn":2205,"description":2206,"org":2207,"tags":2208,"stars":26,"repoUrl":27,"updatedAt":2221},"citation-verify","verify academic citation accuracy","当用户需要核验参考文献真实性、检查 BibTeX 条目是否有误、审查论文引用是否可靠、 排查 bibliography 中的错误条目、验证 DOI 与题录是否对得上、发现参考文献张冠李戴、 做投稿前引用体检或审稿引用抽查时使用。同义场景：参考文献核验、引用核查、 文献真伪鉴别、bib 文件检查、参考文献纠错、引用元数据比对、 \"帮我看看这些参考文献有没有问题\"\"这个 DOI 对得上吗\"\"有没有编造的引用\"。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2209,2212,2215,2218],{"name":2210,"slug":2211,"type":16},"Code Analysis","code-analysis",{"name":2213,"slug":2214,"type":16},"Documentation","documentation",{"name":2216,"slug":2217,"type":16},"QA","qa",{"name":2219,"slug":2220,"type":16},"Research","research","2026-08-21T03:59:17.615117",{"slug":2223,"name":2223,"fn":2224,"description":2225,"org":2226,"tags":2227,"stars":26,"repoUrl":27,"updatedAt":2233},"claim-check","verify research claims against evidence","当需要检查论文草稿中的事实性论断是否有证据支撑、做引用-论断对齐审计、 找出没有出处的陈述、核对文内引用是否真能支撑所在句子时加载使用； 通常由 evidence-loop 或审稿类流程调用，不直接面向用户。同义场景： 论断支撑检查、claim 支撑审计、无支撑断言排查、证据覆盖检查、 引用与论断对齐、\"这段话有没有文献撑\"\"哪些说法没有引用\"。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2228,2231,2232],{"name":2229,"slug":2230,"type":16},"Audit","audit",{"name":2210,"slug":2211,"type":16},{"name":2219,"slug":2220,"type":16},"2026-08-21T03:59:02.154691",{"slug":2235,"name":2235,"fn":2236,"description":2237,"org":2238,"tags":2239,"stars":26,"repoUrl":27,"updatedAt":2245},"cn-literature","search and organize Chinese academic literature","当用户需要检索或整理中文文献（CNKI 知网、万方、维普、超星）、把中文数据库 导出的题录文件解析成统一 PaperDocument、或把中文文献与英文检索结果合并去重 时使用。同义场景：中文文献检索、知网导出题录解析、万方检索、Refworks\u002FEndNote 格式转换、\"帮我把这份 CNKI 导出的 txt 整理成文献表\"\"中文核心期刊上关于 X 有哪些研究\"。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2240,2243,2244],{"name":2241,"slug":2242,"type":16},"Data Cleaning","data-cleaning",{"name":2152,"slug":2153,"type":16},{"name":2219,"slug":2220,"type":16},"2026-08-21T03:59:12.24404",{"slug":2247,"name":2247,"fn":2248,"description":2249,"org":2250,"tags":2251,"stars":26,"repoUrl":27,"updatedAt":2260},"cold-start-interview","initialize research profiles via interviews","当用户首次使用科研工作台、研究画像仍为空白，或用户主动说\"先做个访谈\"\"重新设置我的研究信息\"\"初始化画像\"\"cold start\"\"重新 interview\"时使用。本技能通过结构化访谈收集用户的研究领域、常用数据源、算力环境、写作语言与目标期刊、引用格式、团队协作规范、伦理合规要求，并把回答以散文形式写回插件根目录 CLAUDE.md 的研究画像部分。支持 quick（2 分钟 5 问）、full（完整 15 问）、--redo（推翻重谈）、--check（只检查画像完整度不提问）四种模式，支持中断后续谈。同义触发场景：新用户引导、首次配置、研究背景调查、填研究档案、更新个人研究信息、check 画像。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2252,2253,2256,2259],{"name":2213,"slug":2214,"type":16},{"name":2254,"slug":2255,"type":16},"Onboarding","onboarding",{"name":2257,"slug":2258,"type":16},"Productivity","productivity",{"name":2219,"slug":2220,"type":16},"2026-08-21T03:59:58.579998",{"slug":2262,"name":2262,"fn":2263,"description":2264,"org":2265,"tags":2266,"stars":26,"repoUrl":27,"updatedAt":2274},"customize","customize research guardrails and settings","当用户想修改研究画像或共享守则（guardrails）时使用：换了研究领域、换了目标期刊、换了引用格式、换了算力环境、合规要求变化、想调整某条 guardrail 的严格程度。同义触发场景：改一下画像、更新我的研究信息、修改 CLAUDE.md、调整设置、换引用格式、customize、个性化配置、改规则、重新配置工作台。本技能是画像与守则的唯一维护入口：读取 CLAUDE.md、与用户逐项确认修改点、写回文件、并明确告知哪些 skill 的行为会因此变化。",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2267,2270,2273],{"name":2268,"slug":2269,"type":16},"Best Practices","best-practices",{"name":2271,"slug":2272,"type":16},"Configuration","configuration",{"name":2219,"slug":2220,"type":16},"2026-08-21T03:59:35.867596",{"slug":2276,"name":2276,"fn":2277,"description":2278,"org":2279,"tags":2280,"stars":26,"repoUrl":27,"updatedAt":2286},"dida365","manage Dida365 tasks and habits","Manage 滴答清单 (Dida365 China) tasks, lists, habits, focus records and countdowns through the official Dida365 MCP server at mcp.dida365.com. Use when the user asks to check, plan, create, update, complete or review tasks and habits on dida365.com, or asks about focus history and countdowns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2281,2282,2285],{"name":2197,"slug":2198,"type":16},{"name":2283,"slug":2284,"type":16},"Scheduling","scheduling",{"name":2200,"slug":2201,"type":16},"2026-08-18T03:49:37.126385",36]