[Openmm-betatesters] OpenCL error when using RPMD plugin

Peter Eastman peastman at stanford.edu
Thu Jan 10 11:02:15 PST 2013


Hi Nabil,

Thanks, I think I see what's going on.

In previous releases, we found a common mistake was for people to forget to initialize the positions on their Context.  Then all their forces would evaluate to nan or inf (since all the particles were at the same location), the simulation would blow up, and they would have no idea why.  So we added a check for that: if you do anything that requires forces or energy without having first called setPositions(), it throws an exception.

But RPMD is different in that you never actually call setPositions() on your Context.  You just provide the positions to the integrator, and it copies them to the Context for you.  So the first time you call step() on the integrator, it makes an explicit call to setPositions() for you so the Context will know it's ok.

But I see we aren't doing that in getState().  So if you call getState() on the integrator before having called step(), the Context think's you've made a mistake and throws an exception.

I'll fix that.  In the mean time, just add a call to setPositions() on the Context so it won't complain.

Peter


On Jan 10, 2013, at 7:54 AM, Nabil Faruk <nffaruk at gmail.com> wrote:

> Hi,
> after positions and velocities have been set for the RPMD integrator, I get the following error when calling getState():
> 
> OpenCL internal error: CL_INVALID_KERNEL_ARGS error executing CL_COMMAND_NDRANGE_KERNEL on Tesla M2070 (Device 0).
> 
> OpenCL internal error: CL_INVALID_KERNEL_ARGS error executing CL_COMMAND_NDRANGE_KERNEL on Tesla M2070 (Device 0).
> 
> terminate called after throwing an instance of 'OpenMM::OpenMMException'
>   what():  Particle positions have not been set
> 
> This issue did not happen with OpenMM 4.1.1
> Any thoughts? Thanks,
> 
> -- 
> Nabil
> _______________________________________________
> Openmm-betatesters mailing list
> Openmm-betatesters at simtk.org
> https://simtk.org/mailman/listinfo/openmm-betatesters



More information about the Openmm-betatesters mailing list