agentleFS
90184479018447/julia-pro-p/skills/simulation-and-hpc/SKILL.md

simulation-and-hpc

Skill0 starsChanged 3 days agoMITView on GitHub

Run simulations at scale: molecular dynamics setup, trajectory analysis, machine-learned force fields, distributed and GPU execution, and the parallel pattern each workload needs. Use when a simulation must go faster or bigger.

The file

Files
SKILL.md

Simulation and HPC

Scaling a simulation is two problems: making the physics setup correct, and making the decomposition match the algorithm. Doing the second first produces fast wrong answers.

TaskPage
MD setup, force fields, ensembles, trajectory analysis, enhanced samplingadvanced-simulations

Decomposition by algorithm

WorkloadPatternWhat breaks
MD with short-range forcesdomain decomposition + halo exchangeload imbalance once density varies
long-range electrostaticsparticle mesh / FFTthe FFT is the scaling limit, not the particles
ensemble of independent runsembarrassingly parallel, one process per runfile system contention, not CPU
parameter sweepjob array with a queueper-job startup cost dominates at small sizes
dense linear algebrathreaded BLAS, one rank per socketoversubscription: threads × ranks > cores
PDE on a meshMPI halo + local assemblypartition quality decides everything

Setup discipline

  • Force field and cutoffs recorded with the result. A trajectory with an unrecorded thermostat or cutoff is not reproducible.
  • Equilibration demonstrated, not assumed. Plot the observables you will report; a flat potential energy is not equilibrium.
  • Timestep justified. The fastest vibration in the system sets it; a 2 fs step with constrained hydrogens, less without.
  • Statistical error estimated. Block averaging or independent replicas; a single run has no error bar and no basis for comparison.

Before scaling out

Measure one rank first. If a single-process run is memory-bound or I/O-bound, more ranks make it worse. Then scale to 2 and 4 and record the efficiency; a curve that drops below 50% at 4 ranks has a decomposition problem, not a cluster problem.

Done when

The decomposition matches the algorithm (particles by domain, linear algebra by the solver backend), one rank was measured before scaling, parallel efficiency at 2 and 4 ranks is recorded, equilibration is demonstrated on the observables that will be reported, and the statistical error comes from block averaging or independent replicas.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.