ci(remote): end-to-end remote CI orchestration script
Adds scripts/run_remote_ci.sh: a single command that drives the remote SPECFEM3D regression gate. Pipeline = rsync sync + remote build + remote ctest + remote examples/cpml xmesh → xgenerate_databases → xspecfem3D end-to-end. 7 stages, each with its own exit code (10/11/20/30/40/50/51) so CI can pinpoint the failing stage.
API: bash scripts/run_remote_ci.sh REMOTE=user@host bash scripts/run_remote_ci.sh SKIP_SMOKE=1 bash scripts/run_remote_ci.sh SKIP_BUILD=1 SKIP_TEST=1 bash scripts/run_remote_ci.sh SPECFEM3D_BIN=/path/to/xgen bash scripts/run_remote_ci.sh
Measured on ubuntu@43.159.43.117 (2-core, OpenMPI 4.1.6, SPECFEM3D 4.1.1): full pipeline ~100-140 s, SKIP_SMOKE ~80 s, smoke-only ~24 s.
Key design decisions:
- 7-stage exit codes map to SPECFEM3D contract risks (precheck/ sync/build/test/xgen/xsolver/semd) so future CPML parameter format changes, database byte-layout changes, or poroelastic 17-double record changes all surface with a precise code.
- Tilde path pre-expansion: ssh cannot expand ~ in quoted env vars, so the script sshes once for remote HOME and rewrites ~/xmesh_dev etc. to absolute paths before passing them on.
- Per-stage stdout/stderr routed to .ci_logs//*.log for failure debugging (added to .gitignore).
- SKIP_* flags are opt-in escapes for fast iteration; default is full pipeline.
Verified:
- Full pipeline on default remote: 7/7 PASS, 25/25 ctest, 6 .semd.
- SKIP_SMOKE: 4/4 PASS.
- SKIP_BUILD + SKIP_TEST: 3/3 PASS, smoke reused cached build.
- Unreachable remote: exit 10 (precheck FAIL), downstream stages SKIP.
Documentation updated (README, CLAUDE, PLAN, .gitignore) with the new script’s API, exit-code table, and measured timings.
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
xmesh
面向地震动力学模拟的并行三维网格生成程序
概述
xmesh 生成用于 SPECFEM3D 地震波传播求解器的六面体谱元网格。它在 SPECFEM3D 的
xmeshfem3D网格生成器基础上进行了扩展,支持通过 MPI 实现并行,并通过 Kokkos 实现 GPU 加速。主要特性:
proc******_Database)依赖
可选依赖:
构建
选择 Kokkos 后端
曙光 DCU 构建(Hygon DCU,gfx936)
项目已提供专用脚本,使用 DTK 25.04 + HPCX MPI:
当前在 2 DCU 共享场景下,
check_mesh_quality+jacobian较 CPU 提升约 2×,完整 19/19 ctest 通过;hpctest06已验证支持单节点 8 DCU、多节点累计 64 DCU,64 DCU 弱扩展总 wall 时间约 4.95 s。用法
分区拓扑约束
nex_xi必须是nproc_xi的整数倍nex_eta必须是nproc_eta的整数倍ner_total必须是nproc_z的整数倍测试
SPECFEM3D 端到端 smoke
验证 xmesh 输出能被 SPECFEM3D 的
xgenerate_databases完整读通,并可进一步跑通solver(xspecfem3D)生成地震图。需要本机或远程有 SPECFEM3D 可执行。两个示例均已通过 SPECFEM3D 4.1.1 完整流水线验证 (本机构建路径:
/home/public/Programs/gitlink/quaker/specfem3d_cartesian/bin/{xgenerate_databases,xspecfem3D})。 退出码 0 表示端到端跑通,并生成OUTPUT_FILES/*.semd地震图文件。远程端到端 CI 编排
scripts/run_remote_ci.sh在远程主机上同步、build、跑 ctest,并跑examples/cpml/完整 SPECFEM3D 流水线,7 阶段汇总 PASS/FAIL。适合作为 SPECFEM3D 兼容性回归屏障。7 个阶段: precheck (ssh + 工具) → sync (rsync) → build (cmake) → test (ctest) → xgenerate_databases → xspecfem3D → semd (验证 .semd 文件)
退出码: 0=PASS / 10=precheck / 11=sync / 20=build / 30=test / 40=xgen / 50=xsolver / 51=semd
默认配置: 远程 2 核机器完整跑通 ≈ 100 秒;远程 SPECFEM3D bin 默认路径
~/specfem3d_bin/{xgenerate_databases,xspecfem3D},可被SPECFEM3D_BIN/XSPECFEM3D_BIN环境变量覆盖。运行时日志写入本地
.ci_logs/<timestamp>/(已加入.gitignore),失败时 直接tail对应文件可定位 SPECFEM3D 报错行。当前测试覆盖(ctest 25/25)
partition_3d_1x1x1partition_3d_2x1x1partition_3d_2x2x1partition_3d_2x2x2meshgen_jacobian_1procmeshgen_jacobian_4proctopographycurved_layersmountain_basin_1procmountain_basin_4procmountain_basin_8prochilbertweightjacobiandatabase_formatparameters_domaindomain字段解析(声学/弹性/孔隙弹性)partition_acousticporoelastic_layer_1procporoelastic_layer_4procweak_scaling_smoke_8proccpmlcpml_integration_1proccpml_integration_4proccpml_curved_1proccpml_curved_4proc输入格式
网格参数通过 YAML 文件指定(参见
examples/layered_halfspace/)。架构
分区算法(SFC-3D)