feat(mlip): ALCHEMI Polaris benchmark harness + batched MD driver - #22
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two capabilities on the existing
nvalchemi-mace(NVIDIA ALCHEMI) MLIP backend:smoke.py(correctness/integration evidence, explicitly not a benchmark).driver="md") — MD previously existed only inuma.py(FAIRChem, single-structure). ALCHEMI's batched path handled onlyenergy/opt.Benchmark harness —
alcf/polaris/mlip/benchmark/bench.py— single-GPU: batch-size sweep (structures/sec + peak GPU mem vianvidia-smi), structure-size scaling (supercells), and ALCHEMI-vs-ase-macebaseline. Emitsbench_results.jsonl+bench_meta.json.bench_multigpu.py— node-level throughput: one process per GPU (CUDA_VISIBLE_DEVICESpinned) over round-robin-sharded inputs, aggregated intonode_result.json. No runner change needed (runner is single-GPU per process).bench.pbs/bench_multigpu.pbs— Polaris PBS scripts modeled onsmoke.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:MLIPCalculationConfiggainsensemble,temperature,timestep,md_steps,frictionwith validation;driverextended to includemd; option gating updated in_validate_explicit_options.cli.py:--driver mdand--ensemble/--temperature/--timestep/--md-steps/--frictionon the shared_mlip_options; MD restricted tonvalchemi-mace.runner.py: MD branch in_run_nvalchemi_chunk, with the actual integrator construction isolated behind_NVALCHEMI_MD_INTEGRATORS+_nvalchemi_md_dynamics, plusn_stepsreporting and MD-only-on-ALCHEMI validation.The real
nvalchemi.dynamicsMD integrator class names/kwargs cannot be verified off-GPU (the package installs only with a CUDA extra). The code assumesVelocityVerlet(NVE) /Langevin(NVT) with(model, hooks, dt, n_steps, temperature[, friction]). On Polaris, runpython -c "import nvalchemi.dynamics as d; print(dir(d))"and, if they differ, update the single isolated mapping inrunner.py— a clear error is raised if the assumed names are absent.Testing
test_mlip_nvalchemi.py), config validation (test_mlip_validation.py), CLI gating (test_cli.py).test_mcp_api.pyimport error was excluded).🤖 Generated with Claude Code