openmm / openmm-plumed

OpenMM plugin to interface with PLUMED
59 stars 23 forks source link

Platform Exception with PLUMED 2.3.1 / OpenMM 7.1.0 / CUDA 8.0 #7

Closed flblanc closed 3 years ago

flblanc commented 7 years ago

Hello,

I am having trouble getting PLUMED 2.3.1 and OpenMM 7.1.0 to work together with the current version of the openmm-plumed plugin (downloaded earlier today). I have compiled openmm-plumed with CUDA (version 8.0); the executable passes the tests and can be imported in Python.

However, when I try to launch an OpenMM simulation (with a setup that I know works otherwise) with a PlumedForce, I obtain the following exception:

Traceback (most recent call last): File "openmm-implicit-obc2.py", line 104, in <module> simulation = Simulation(psf.topology, system, integrator, platform) File "/usr/local/lib/python2.7/dist-packages/simtk/openmm/app/simulation.py", line 103, in __init__ self.context = mm.Context(self.system, self.integrator, platform) File "/usr/local/lib/python2.7/dist-packages/simtk/openmm/openmm.py", line 5570, in __init__ this = _openmm.new_Context(*args) Exception: Specified a Platform for a Context which does not support all required kernels

This error arises regardless as to whether I specify CUDA or CPU as the Platform for OpenMM. Would you have an idea of how to solve the problem?

I am fairly new to openMM and PLUMED (long term NAMD user here...), so I may have missed something obvious. If that is the case I apologize.

Thanks in advance for your help,

Florian

peastman commented 7 years ago

That sounds like the plugins aren't getting loaded. Do you have PLUMED in your library path? If not, that will prevent them from loading.

If that isn't the problem, try bringing up a Python interpreter and type the following:

from simtk.openmm import *
print(pluginLoadedLibNames)

That will print the name of every plugin library that got loaded. Confirm that the PLUMED plugins did not get loaded. Next type

print(Platform.getPluginLoadFailures())

That will print details about any plugins that failed to load. Hopefully it will include informative error messages.

flblanc commented 7 years ago

Thank you very much for your reply. Adding PLUMED in my LD_LIBRARY_PATH variable solved the problem and I can now run openMM/PLUMED simulations.

However, note that even before that, the print(pluginLoadedLibNames) command yielded 'libOpenMMPlumedReference.so' and 'libOpenMMPlumedCUDA.so' among its outputs. Is that the expected behaviour?

Anyway, thank you again. Is there a citable reference for the plugin ?

peastman commented 7 years ago

Is that the expected behaviour?

It's not what I would have expected. Strange...

Is there a citable reference for the plugin ?

Nothing formal. Just reference the github repository.

sstolzenberg commented 6 years ago

Hello Peter,

I am having the same error from above.

here are my .bashrc entries: /////////////////// export LIBRARY_PATH=/home/sstolzen/mypackages/openmm-7.1.1/lib/plugins:/home/sstolzen/mypackages/plumed-2.3.3/lib/plumed:/home/sstolzen/mypackages/plumed-2.3.3/lib:/home/sstolzen/mypackages/openmm-7.1.1/lib:$HOME/local/lib:$HOME/.local/lib:$LIBRARY_PATH export LD_LIBRARY_PATH=$LIBRARY_PATH ///////////////////

python output: ///////////////////

from simtk.openmm import * print(pluginLoadedLibNames) ('libOpenMMPME.so', 'libOpenMMCPU.so', 'libOpenMMCUDA.so', 'libOpenMMOpenCL.so', 'libOpenMMRPMDCUDA.so', 'libOpenMMDrudeCUDA.so', 'libOpenMMAmoebaCUDA.so', 'libOpenMMRPMDOpenCL.so', 'libOpenMMDrudeOpenCL.so', 'libOpenMMCudaCompiler.so', 'libOpenMMRPMDReference.so', 'libOpenMMDrudeReference.so', 'libOpenMMAmoebaReference.so') print(Platform.getPluginLoadFailures()) () ///////////////////

Seems like my open did not even intend to open openmmplumed libraries? (I first built open-plumed with the given open and plumed built, and further had to install openmm via "conda install openmm")

Thanks for your help again! Sebastian

raimis commented 3 years ago

We already provide a conda package (https://github.com/openmm/openmm-plumed#installing-the-plugin). The regular users should no longer need to build the plugin from the source code and face similar issues.