sharing memory between OpenGL and OpenMM

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Gouthaman Balaraman
Posts: 4
Joined: Wed Feb 11, 2009 3:37 pm

sharing memory between OpenGL and OpenMM

Post by Gouthaman Balaraman » Wed Mar 03, 2010 7:06 pm

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

User avatar
Peter Eastman
Posts: 2602
Joined: Thu Aug 09, 2007 1:25 pm

RE: sharing memory between OpenGL and OpenMM

Post by Peter Eastman » Thu Mar 04, 2010 12:10 pm

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

User avatar
Gouthaman Balaraman
Posts: 4
Joined: Wed Feb 11, 2009 3:37 pm

RE: sharing memory between OpenGL and OpenMM

Post by Gouthaman Balaraman » Fri Mar 05, 2010 11:56 am

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

User avatar
Peter Eastman
Posts: 2602
Joined: Thu Aug 09, 2007 1:25 pm

RE: sharing memory between OpenGL and OpenMM

Post by Peter Eastman » Fri Mar 05, 2010 12:00 pm

They're independent programs. Zephyr connects to VMD over a network socket and sends across each structure to display.

Peter

User avatar
Michael Sherman
Posts: 812
Joined: Fri Apr 01, 2005 6:05 pm

RE: sharing memory between OpenGL and OpenMM

Post by Michael Sherman » Fri Mar 05, 2010 12:21 pm

To clarify, Goutham -- Zephyr does absolutely nothing to manage GPU memory. That's not something you have to deal with explicitly.

Sherm

User avatar
Gouthaman Balaraman
Posts: 4
Joined: Wed Feb 11, 2009 3:37 pm

RE: sharing memory between OpenGL and OpenMM

Post by Gouthaman Balaraman » Fri Mar 05, 2010 12:38 pm

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


User avatar
Peter Eastman
Posts: 2602
Joined: Thu Aug 09, 2007 1:25 pm

RE: sharing memory between OpenGL and OpenMM

Post by Peter Eastman » Fri Mar 05, 2010 12:41 pm

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

User avatar
Michael Sherman
Posts: 812
Joined: Fri Apr 01, 2005 6:05 pm

RE: sharing memory between OpenGL and OpenMM

Post by Michael Sherman » Fri Mar 05, 2010 12:53 pm

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

User avatar
Peter Eastman
Posts: 2602
Joined: Thu Aug 09, 2007 1:25 pm

RE: sharing memory between OpenGL and OpenMM

Post by Peter Eastman » Fri Mar 05, 2010 1:00 pm

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

POST REPLY