Skip to content

feat(mlip): ALCHEMI Polaris benchmark harness + batched MD driver - #22

Merged
tdpham2 merged 1 commit into
mainfrom
feat/alchemi-benchmark-batched-md
Sep 8, 2026
Merged

feat(mlip): ALCHEMI Polaris benchmark harness + batched MD driver#22
tdpham2 merged 1 commit into
mainfrom
feat/alchemi-benchmark-batched-md

Conversation

@tdpham2

@tdpham2 tdpham2 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

Adds two capabilities on the existing nvalchemi-mace (NVIDIA ALCHEMI) MLIP backend:

  1. A Polaris throughput benchmark harness — the repo previously had only smoke.py (correctness/integration evidence, explicitly not a benchmark).
  2. A batched MD driver (driver="md") — MD previously existed only in uma.py (FAIRChem, single-structure). ALCHEMI's batched path handled only energy/opt.

Benchmark harness — alcf/polaris/mlip/benchmark/

  • bench.py — single-GPU: batch-size sweep (structures/sec + peak GPU mem via nvidia-smi), structure-size scaling (supercells), and ALCHEMI-vs-ase-mace baseline. Emits bench_results.jsonl + bench_meta.json.
  • bench_multigpu.py — node-level throughput: one process per GPU (CUDA_VISIBLE_DEVICES pinned) over round-robin-sharded inputs, aggregated into node_result.json. No runner change needed (runner is single-GPU per process).
  • bench.pbs / bench_multigpu.pbs — Polaris PBS scripts modeled on smoke.pbs (conda module, ALCF proxy, model-weight pre-warm before timed runs).
  • README.md — how to run each sweep, read results, and hardware/parity caveats.

Batched MD driver

  • config.py: MLIPCalculationConfig gains ensemble, temperature, timestep, md_steps, friction with validation; driver extended to include md; option gating updated in _validate_explicit_options.
  • cli.py: --driver md and --ensemble/--temperature/--timestep/--md-steps/--friction on the shared _mlip_options; MD restricted to nvalchemi-mace.
  • runner.py: MD branch in _run_nvalchemi_chunk, with the actual integrator construction isolated behind _NVALCHEMI_MD_INTEGRATORS + _nvalchemi_md_dynamics, plus n_steps reporting and MD-only-on-ALCHEMI validation.

⚠️ One Polaris-only step remains

The real nvalchemi.dynamics MD integrator class names/kwargs cannot be verified off-GPU (the package installs only with a CUDA extra). The code assumes VelocityVerlet (NVE) / Langevin (NVT) with (model, hooks, dt, n_steps, temperature[, friction]). On Polaris, run python -c "import nvalchemi.dynamics as d; print(dir(d))" and, if they differ, update the single isolated mapping in runner.py — a clear error is raised if the assumed names are absent.

Testing

  • Added tests: MD dispatch/result-mapping (test_mlip_nvalchemi.py), config validation (test_mlip_validation.py), CLI gating (test_cli.py).
  • Full MLIP/CLI suite green locally (only the unrelated pre-existing test_mcp_api.py import error was excluded).
  • Benchmark scripts validated for imports, arg-parsing, and structure prep; GPU runs are Polaris-only.

🤖 Generated with Claude Code

Benchmark harness (alcf/polaris/mlip/benchmark/):
- bench.py: single-GPU batch-size sweep, structure-size scaling, and
  ALCHEMI-vs-ASE-MACE baseline; emits bench_results.jsonl + bench_meta.json
- bench_multigpu.py: node-level throughput, one process per GPU over
  round-robin-sharded inputs, aggregated into node_result.json
- bench.pbs / bench_multigpu.pbs: Polaris PBS scripts (weight pre-warm,
  ALCF proxy) plus a README. Kept separate from smoke.py (correctness only).

Batched MD driver (driver="md" on the nvalchemi-mace backend):
- MLIPCalculationConfig gains ensemble/temperature/timestep/md_steps/friction
  with validation; option gating extended in _validate_explicit_options
- CLI: --driver md plus --ensemble/--temperature/--timestep/--md-steps/
  --friction; MD restricted to nvalchemi-mace
- runner: MD branch in _run_nvalchemi_chunk with the integrator isolated
  behind _NVALCHEMI_MD_INTEGRATORS / _nvalchemi_md_dynamics so the real
  nvalchemi.dynamics class names can be confirmed on Polaris in one place
- tests for MD dispatch, result mapping, config validation, and CLI gating

Co-Authored-By: Claude <[email protected]>
@tdpham2
tdpham2 merged commit b32485a into main Sep 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant