Page 1 of 1

Error only from CPU and OpenCL platforms for OpenMM 7.1.0rc1

Posted: Thu Feb 09, 2017 9:34 am
by negelis
Hello,

I'm trying to use the newest version of OpenMM 7.1.0rc1 to run my previous script. It complains with I choose CPU or OpenCL platforms, but it works on Reference and CUDA platforms.

I installed OpenMM 7.1.0rc through conda. The output from the command

Code: Select all

python -m simtk.testInstallation
shows it is installed correctly:
1 Reference - Successfully computed forces
2 CPU - Successfully computed forces
3 CUDA - Successfully computed forces
4 OpenCL - Successfully computed forces

Median difference in forces between platforms:

Reference vs. CPU: 1.97982e-05
Reference vs. CUDA: 2.15095e-05
CPU vs. CUDA: 1.55441e-05
Reference vs. OpenCL: 2.15121e-05
CPU vs. OpenCL: 1.55329e-05
CUDA vs. OpenCL: 1.13937e-07

However, when I run the test script provided in the attachment, it only works on Reference and CUDA platform.
On CPU platform, it complains: Exception: All Forces must have identical exclusions
On OpenCL platform, it complains: Exception: Error initializing context: clCreateContext (-33)

I'm using CUDA8.0. The NVIDIA driver version is 375.26 and the GPU hardware is GeForce GTX 1080.

Thanks,
Xinqiang

Re: Error only from CPU and OpenCL platforms for OpenMM 7.1.0rc1

Posted: Tue Feb 14, 2017 10:42 am
by peastman
On CPU platform, it complains: Exception: All Forces must have identical exclusions
The CPU platform has the restriction that every nonbonded force (NonbondedForce, CustomNonbondedForce, etc.) must have exactly the same list of excluded interactions, because the list only gets stored once, and is used in building the neighbor list. It looks like some of your forces only include a subset of the exclusions, which is why it's complaining. (The CUDA and OpenCL platforms also have this same restriction, but they make an exception for CustomNonbondedForces with interaction groups, since those get processed differently.)
On OpenCL platform, it complains: Exception: Error initializing context: clCreateContext (-33)
-33 is CL_INVALID_DEVICE. Is your GPU possibly set to exclusive mode? That would explain it, since it would successfully create the CUDA context, but then be unable to create another context for the same GPU. Try adding the following at the end of the loop over platforms:

Code: Select all

del context
del integrator
Peter

Re: Error only from CPU and OpenCL platforms for OpenMM 7.1.0rc1

Posted: Wed Feb 15, 2017 8:36 am
by negelis
Thanks for your explanations, Peter. It solves the problem.

Xinqiang