#10395 closed defect (fixed)
OpenMM Metal platform missing in MacOS 1.7?
| Reported by: | Tristan Croll | Owned by: | Tom Goddard |
|---|---|---|---|
| Priority: | moderate | Milestone: | |
| Component: | Platform | Version: | |
| Keywords: | Cc: | chimera-programmers, Tristan Croll | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | Mac OS X (X11) | |
| Project: | ChimeraX |
Description (last modified by )
Going by the query from a user at https://x.com/taha_shahid/status/1738063741327937823?s=20 it looks like the library files for the OpenMM Metal platform (see #8869) may not have made it into the ChimeraX 1.7 release (left my Mac in the office for the Christmas break, so it's hard for me to check).
Change History (9)
comment:1 by , 22 months ago
| Cc: | added |
|---|---|
| Component: | Unassigned → Platform |
| Owner: | changed from to |
comment:2 by , 22 months ago
| Description: | modified (diff) |
|---|---|
| Owner: | changed from to |
comment:3 by , 22 months ago
The one called "HIP" added to ChimeraX 1.6 is actually the Metal platform -
it's only named that way because OpenMM 8.0 lacked the API to add a
platform with a new name, and "HIP" was going unused. It's defined by the
libraries attached to #8869, which just need to be copied into the
lib/Plugins directory. The speedup over OpenCL is quite substantial, so
it's definitely worth having there.
comment:4 by , 22 months ago
| Cc: | added |
|---|---|
| Owner: | changed from to |
Ticket #8869 was assigned to Eric and apparently he added the Metal libraries. I did not know about it. I cannot tell from that ticket how Eric added the libraries -- they don't appear in our prereqs/openmm/Makefile in 1.6 or 1.7. In ChimeraX 1.6 and 1.7 we are using the same OpenMM 8.0 but because we updated Python from 3.9 to 3.11 new OpenMM 8.0 Conda builds were used in ChimeraX 1.7.
Perhaps the Metal libraries would still work if added to the ChimeraX distribution. Eric may know how to do that. We may make a ChimeraX 1.7.1 release that could include them.
comment:5 by , 22 months ago
It shouldn't take anything more than unzipping the file into lib/Plugins. When I get back to the office (probably Jan 8 - have a conference the week before) I can test on my Mac. On Fri, Dec 22, 2023 at 9:18 PM ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu> wrote: > > > > >
comment:6 by , 22 months ago
| Owner: | changed from to |
|---|
I assume this happened when Tom upgraded OpenMM to 8.0 back on June 27th. You probably need to do the procedure from #8869 whenever you upgrade. I assume the fix right now is to untar the OpenMM tarball, drop those files in, and then tar/bzip it back up.
comment:7 by , 22 months ago
Ok, I'll test the libraries and put them in if they seem to work. I think I will install a bit differently and not modify the Conda tar balls, but instead just have our Makefile install those for the Mac library in a separate step. That way we will be less likely to miss this when we next update OpenMM.
comment:8 by , 22 months ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixed in daily build (Dec 23, 2023) and 1.7.1 release.
I made the prereqs/openmm/Makefile install the Metal libraries. I tested using
isolde benchmark max small
and got these results on a Mac Studio M2 Ultra (Mac14,14) with macOS 14.2.1
ISOLDE 1.7 benchmark, small cryoEM 4913 atoms
CPU 1.01 sec per coord update, HIP 0.082 sec/update, OpenCL 0.103 sec/update
ISOLDE 1.6 benchmark, small cryoEM 4913 atoms
CPU 0.99 sec per coord update, HIP 0.083 sec/update, OpenCL 0.103 sec/update
Note that OpenMM Metal is only about 18% faster than OpenCL on this Mac M2 machine, and about 12x faster than CPU only.
comment:9 by , 22 months ago
Thanks for testing! The speedup is quite size-dependent - closer to 2x for very small systems (i.e. starting from a selection of a few residues in ISOLDE. On Fri, 22 Dec 2023 at 23:14, ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu> wrote: > > > > > > > > > >
Was there ever an OpenMM Metal platform? In Mac ARM ISOLDE 1.6 I see openmm platforms HIP, OpenCL, CPU, Reference. It looks like HIP is for AMD ROCm (AMD's GPU library) support (https://github.com/amd/openmm-hip) -- maybe that could work on old Intel Macs with AMD GPU. It might need ROCm libraries installed on the Mac -- I don't know anything about ROCm. Of course Apple stopped making Mac's with AMD GPUs a years ago. Strangely ISOLDE 1.6 on my Mac ARM machine (no AMD GPU) shows HIP as the platform and it simulates fine. I don't think it could be using HIP. Maybe it is using OpenCL. Hard to tell, the Log does not say anything about what platform was actually used.
In ISOLDE 1.7 on Mac ARM it shows openmm platforms OpenCL, CPU and Reference and OpenCL is chosen. That seems like the correct platform for Mac ARM (M1/M2 GPU), and the simulation works. The frame rate during the cryoEM tutorial full simulation seems to be about 5 frames/second on both 1.6 (HIP chosen) and 1.7 (OpenCL chosen).
Reassigning to Tristan since he should know what OpenMM platforms Mac machines are intended to use.
ChimeraX includes the standard Conda OpenMM packages, so the platforms it supports are based on the Conda builds.