一键导入
snapy-multi-block-output
Debug multi-MeshBlock-per-process bugs in snapy, especially geometry partitioning, process-group lifecycle, and output combining.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Debug multi-MeshBlock-per-process bugs in snapy, especially geometry partitioning, process-group lifecycle, and output combining.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Read neighboring repositories before making a scoped change in the primary repo.
Use DISORT-specific repo routing and guardrails for numerical or solver work.
Route example, notebook, and high-level tutorial work through the paddle repo.
Decide which repo owns a concept and which sibling repos should only be consulted.
Route thermodynamics and EOS work through the kintera source-of-truth repo.
Write beginner-facing documentation with explicit steps and low assumed knowledge.
| name | snapy-multi-block-output |
| description | Debug multi-MeshBlock-per-process bugs in snapy, especially geometry partitioning, process-group lifecycle, and output combining. |
Use this skill when repos/snapy is running more than one MeshBlock on the
same process and behavior differs from the one-block-per-process case.
1 proc x 1 block, 1 proc x N blocks, and N proc x 1 block.1x1 matches Nx1 but not 1xN, inspect same-process assumptions
before changing backend communication.shutdown() calls from multiple local blocks.Mesh rewrites the
local block's global rank, so multiple local blocks write the same spatial
slab.MeshBlock::initialize() exchange logic is reused block-by-block
under Mesh, causing deadlocks because local-copy orchestration is bypassed.MeshBlock to Mesh, update both the
constructor path and the runtime loop; partial migrations tend to fail on
stale bindings rather than on physics.MeshOptions and Mesh, then treat mesh.blocks as the
local per-process blocks for block-specific setup like initialization or
forcing.block.options.device_str() instead of block.device(),
layout.options.rank() instead of layout.rank(), and
intg = mesh.module("block0.intg") instead of block.intg.paddle Python driver pattern for time stepping:
keep an explicit cycle, call mesh.set_cycle(cycle), use
mesh.forward(vars, dt, stage), and stop with intg.stop(cycle, time).mesh.forward(...) if the forcing or
source term is still applied block-by-block.process_world_size * blocks_per_process must match the layout's expected
global block count. For cubed-sphere that means world_size * blocks_per_process == 6.torchrun --nproc_per_node=2 test
for the real 2 GPUs x 3 blocks/process cubed-sphere path.MeshBlocks per process, point-to-point tags are not
a reliable discriminator the way they are with Gloo.send/recv launch
is insufficient even if local copies and topology are correct.Layout::launch_exchange()
path, order remote ops by actual exchange-loop order rather than buffer id,
and for NCCL launch remote work process-wide across all local blocks so
recv/send posting order is identical on both processes.Mesh orchestration and output code over adding
case-specific workarounds in examples.gloo and nccl when the change touches communication or
output ownership.