Error only from CPU and OpenCL platforms for OpenMM 7.1.0rc1

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Xinqiang Ding
Posts: 33
Joined: Tue May 05, 2015 2:27 pm

Error only from CPU and OpenCL platforms for OpenMM 7.1.0rc1

Post by Xinqiang Ding » Thu Feb 09, 2017 9:34 am

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
Attachments
test.tar.gz
(115.03 KiB) Downloaded 5 times

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

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

Post by Peter Eastman » Tue Feb 14, 2017 10:42 am

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

User avatar
Xinqiang Ding
Posts: 33
Joined: Tue May 05, 2015 2:27 pm

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

Post by Xinqiang Ding » Wed Feb 15, 2017 8:36 am

Thanks for your explanations, Peter. It solves the problem.

Xinqiang

POST REPLY