Install
$ agentstack add skill-scimate-ai-hpc-skills-hpc-petsc ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
HPC PETSc
Treat PETSc as a layered solver toolkit. Start from the highest-level object that matches the mathematical problem and only drop lower when there is a clear reason.
Start
- Read
references/solver-stack-and-object-model.mdbefore creating or repairing a PETSc-based solve path. - Read
references/ksp-and-pc-matrix.mdwhen selecting Krylov methods, direct solves, or preconditioner families. - Read
references/snes-and-ts-patterns.mdwhen the application is nonlinear or time-dependent. - Read
references/options-and-ksp-snes-playbook.mdwhen translating runtime options into code or debugging prefix handling. - Read
references/runtime-option-matrix.mdwhen selecting monitors, residual diagnostics, or common options-database switches. - Read
references/dm-and-discretization-playbook.mdwhenDM, nullspaces, multigrid layout, or field decomposition matter. - Read
references/external-backend-matrix.mdwhen deciding whether to route through HYPRE, direct solvers, or matrix-free paths. - Read
references/build-and-integration.mdwhen configuring PETSc, enabling external packages, or integrating PETSc into another codebase. - Read
references/parallel-and-runtime-debugging.mdwhen a distributed run shows assembly, ownership, convergence, or monitoring problems. - Read
references/error-recovery.mdwhen configure, setup, or solve phases fail.
Work sequence
- Classify the problem first:
- linear system ->
KSP - nonlinear residual ->
SNES - time-dependent problem ->
TS
- Choose the data model before tuning the solver:
Vecfor distributed unknownsMator matrix-free operator for the linearizationDMwhen mesh, hierarchy, or field layout must drive assembly and coarsening
- Get a robust baseline solve working before tuning for scale.
- Move configuration into the options database whenever practical so runs stay inspectable and reproducible.
- Read convergence reason and monitor output before changing algorithms.
Guardrails
- Do not hand-roll nonlinear or time-stepping logic that
SNESorTSalready manages unless the application truly needs it. - Do not tune preconditioners before checking operator correctness, boundary conditions, and assembly completion.
- Do not mix compiler, MPI, and external solver stacks casually across PETSc and the host application.
- Do not treat options prefixes or convergence reasons as optional diagnostics.
Additional References
Load these on demand:
references/ksp-and-pc-matrix.mdfor operator-class to solver-family mappingreferences/snes-and-ts-patterns.mdfor nonlinear and transient workflow designreferences/runtime-option-matrix.mdfor monitor, logging, and option-database baselinesreferences/dm-and-discretization-playbook.mdforDMDA,DMPlex, field splits, and hierarchy-aware setupreferences/external-backend-matrix.mdfor HYPRE, direct-solver, and matrix-free integration tradeoffsreferences/build-and-integration.mdfor external package wiring such as HYPRE or direct-solver backendsreferences/parallel-and-runtime-debugging.mdfor ownership ranges, assembly ordering, monitors, and distributed diagnosticsreferences/error-pattern-dictionary.mdfor fast matching of common PETSc failure classes
Reusable Templates
Use assets/templates/ when a concrete starting point is faster than rebuilding the solve path from scratch, especially:
ksp_poisson_minimal.cpetsc4py_ksp_minimal.pypetsc_build_example.shpetsc_ksp_slurm.sh
Outputs
Summarize:
- problem class and chosen PETSc layer
- matrix or operator strategy
- solver and preconditioner baseline
- runtime options or code-path decisions
- the exact failure phase if the workflow is being repaired
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: SciMate-AI
- Source: SciMate-AI/HPC-Skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.