sharing memory between OpenGL and OpenMM
- Gouthaman Balaraman
- Posts: 4
- Joined: Wed Feb 11, 2009 3:37 pm
sharing memory between OpenGL and OpenMM
Hey All,
How does openMM share memory with other libraries (such as OpenGL) that run on GPU? Lets say if OpenMM is in the backend of other GUI tools (the way Zephyr works), then should the trajectories (from OpenMM) be cleared to load for display. Is there a way to share memory between OpenGL and OpenMM on the GPU?
Thanks
Goutham
How does openMM share memory with other libraries (such as OpenGL) that run on GPU? Lets say if OpenMM is in the backend of other GUI tools (the way Zephyr works), then should the trajectories (from OpenMM) be cleared to load for display. Is there a way to share memory between OpenGL and OpenMM on the GPU?
Thanks
Goutham
- Peter Eastman
- Posts: 2602
- Joined: Thu Aug 09, 2007 1:25 pm
RE: sharing memory between OpenGL and OpenMM
Hi Goutham,
All programs compete for the same video memory. If there isn't enough available, OpenMM will fail when you try to start the simulation.
Peter
All programs compete for the same video memory. If there isn't enough available, OpenMM will fail when you try to start the simulation.
Peter
- Gouthaman Balaraman
- Posts: 4
- Joined: Wed Feb 11, 2009 3:37 pm
RE: sharing memory between OpenGL and OpenMM
Hey Peter,
Thanks! Do you know how Zephyr works? I think it is hooked to VMD, and in my test runs worked well. So does it (zephyr) share the memory, or does it copy data every time VMD has to display?
Thanks
Goutham
Thanks! Do you know how Zephyr works? I think it is hooked to VMD, and in my test runs worked well. So does it (zephyr) share the memory, or does it copy data every time VMD has to display?
Thanks
Goutham
- Peter Eastman
- Posts: 2602
- Joined: Thu Aug 09, 2007 1:25 pm
RE: sharing memory between OpenGL and OpenMM
They're independent programs. Zephyr connects to VMD over a network socket and sends across each structure to display.
Peter
Peter
- Michael Sherman
- Posts: 812
- Joined: Fri Apr 01, 2005 6:05 pm
RE: sharing memory between OpenGL and OpenMM
To clarify, Goutham -- Zephyr does absolutely nothing to manage GPU memory. That's not something you have to deal with explicitly.
Sherm
Sherm
- Gouthaman Balaraman
- Posts: 4
- Joined: Wed Feb 11, 2009 3:37 pm
RE: sharing memory between OpenGL and OpenMM
Thanks Peter and Sherm. Does the performance get affected by the fact that OpenMM has to wait for a bit when OpenGL is displaying the trajectories? Are there any benchmarks available on this aspect at all?
Thanks
Goutham
Thanks
Goutham
- Peter Eastman
- Posts: 2602
- Joined: Thu Aug 09, 2007 1:25 pm
RE: sharing memory between OpenGL and OpenMM
It definitely can affect the performance. The easiest way to see this is to adjust the setting in Zephyr for how often to display frames of the trajectory. You'll see that if you make this too small, the execution time will start to increase.
Peter
Peter
- Michael Sherman
- Posts: 812
- Joined: Fri Apr 01, 2005 6:05 pm
RE: sharing memory between OpenGL and OpenMM
Peter, is it clear that's a result of GPU memory contention? I would think it could instead result from other overhead associated with getting data over to VMD.
Sherm
Sherm
- Peter Eastman
- Posts: 2602
- Joined: Thu Aug 09, 2007 1:25 pm
RE: sharing memory between OpenGL and OpenMM
There are lots of factors contributing. We can't really separate them out, since we don't know all of what VMD is doing.
Peter
Peter