Skip to content

LAMMPS OpenCL on Apple M5 Max

Engine: lammps-reference. This report covers the five official top-level LAMMPS benchmark inputs from vendors/lammps/bench/ on the single Apple M5 Max host. It does not describe mlx_atomistic runtime performance.

CaseDescriptionStatusAcceleration classLoop time, sBlocker or caveat
ljAtomic Lennard-Jones fluidokfull_gpu_opencl0.298473none
eamBulk Cu EAM solidokfull_gpu_opencl0.725426none
chainFENE bead-spring polymer meltdiagnosticpartial_gpu_opencl0.544019bond and Langevin styles are not mapped to GPU styles
chuteGranular chute flowdiagnosticcpu_only_diagnostic0.108473no relevant mapped GPU/OpenCL styles in this build
rhodoRhodopsin in solvated lipid bilayerblockedpartial_gpu_openclN/APPPM double-precision build conflicts with the single-precision Apple GPU path

The raw records are under results/m5max-reference/lammps/. Each run copies the official input files into a case-local work directory before invoking LAMMPS, so the shared vendor tree stays unchanged.

FieldValue
LAMMPS version20250722
Packaged executable.venv/lib/python3.13/site-packages/lammps/lmp
GPU packagePKG_GPU=ON
GPU APIopencl
GPU precisionsingle
DeviceApple M5 Max
Run command rootUV_CACHE_DIR=/tmp/mlx-atomistic-uv-cache uv run python scripts/benchmark_m5max_reference.py

Do not rely on .venv/bin/lmp as the final reproducer. The harness bypasses the console script and records the active packaged executable.

CaseRelevant stylesGPU/OpenCL mapping
ljpair lj/cut, fix nveboth map to lj/cut/gpu and nve/gpu
eampair eam, fix nveboth map to eam/gpu and nve/gpu
chainbond fene, pair lj/cut, fix nve, fix langevinpair and NVE map to GPU; bond and Langevin do not
chutepair gran/hooke/history, fix gravity, fix freeze, fix nve/sphereno mapped GPU styles in this local build
rhodoharmonic bonds, CHARMM angles/dihedrals, lj/charmm/coul/long, pppm, shake, nptpair, PPPM, and NPT have GPU mappings; bonded terms and SHAKE do not

The classification is about this local LAMMPS OpenCL build, not about every possible LAMMPS build. A different build or precision setting can change the mapping and the rhodo outcome.

rhodo reaches PPPM initialization and then fails:

ERROR: PPPM was compiled for double precision floating point but GPU device supports single precision only.

That is why the suite manifest status is blocked even though the manifest validates structurally. The failure is preserved in results/m5max-reference/lammps/rhodo.json, with the LAMMPS log under results/m5max-reference/lammps/rhodo/work/log.lammps.

Terminal window
UV_CACHE_DIR=/tmp/mlx-atomistic-uv-cache uv run python scripts/benchmark_m5max_reference.py lammps --classify-only --json
UV_CACHE_DIR=/tmp/mlx-atomistic-uv-cache uv run python scripts/benchmark_m5max_reference.py lammps --json
UV_CACHE_DIR=/tmp/mlx-atomistic-uv-cache uv run python scripts/benchmark_m5max_reference.py validate --manifest results/m5max-reference/manifest.json --json

Use a host terminal or approved outside-sandbox command for final GPU/OpenCL measurements. The sandbox can hide device access and should only be used for dry classification or schema tests.