Page 1 of 1

CUDA Problem using the AMOEBA FF

Posted: Wed Oct 09, 2013 12:54 am
by michaelschauperl
Hi there,

I just started to use the OpenMM package and i have an issue with using the AMOEBA FF.

If i am running the testInstallation script everything is fine. Also if i am doing Amber calculations on the CUDA platform everything is smooth. But if i am running an AMOEBA calculation i got the following error message:

Exception: Specified a Platform for a Context which does not support all required kernels

Do you have any idea what the problem could be?

Thanks,

Michael

Re: CUDA Problem using the AMOEBA FF

Posted: Wed Oct 09, 2013 10:37 am
by peastman
Hi Michael,

I can think of two potential problems. First, make sure you really are using the CUDA platform. I know you said you are, but just make absolutely sure, since the OpenCL platform doesn't include AMOEBA, so that could cause this problem.

The other possibility is that the AMOEBA CUDA plugin isn't getting loaded. Try the following commands:

Code: Select all

import simtk.openmm as mm
print mm.pluginLoadedLibNames
That will print the names of all plugins that got loaded. If the AMOEBA CUDA plugin isn't listed, that's the problem and we need to figure out why. To do that, try loading that plugin individually by calling Platform.loadPluginLibrary(), passing it an absolute path to that file. (It will be inside <OpenMM install directory>/lib/plugins.) If it fails, it will throw an exception with a hopefully informative error message.

Peter

Re: CUDA Problem using the AMOEBA FF

Posted: Thu Oct 10, 2013 4:28 am
by michaelschauperl
Hi Peter,

I tried what you said. Acutally the following plugins are loaded:
('libOpenMMDrudeSerialization.so', 'libOpenMMOpenCL.so', 'libOpenMMRPMDOpenCL.so', 'libOpenMMAmoebaSerialization.so', 'libOpenMMPME.so', 'libOpenMMCUDA.so')

Which means that the AMOEBA CUDA plugin isnt loaded.
If i am importing it per your definition, the program works.
You have any idea why i have to do that?

Thanks for your help,

Michael

Re: CUDA Problem using the AMOEBA FF

Posted: Thu Oct 10, 2013 11:48 am
by peastman
Strange. Let's confirm what's really happening.

First, I assume you're using the binary distribution of OpenMM 5.2?

Try

Code: Select all

print Platform.getDefaultPluginsDirectory()
So it really is loading plugins from the directory you think it is?

Now try

Code: Select all

print Platform.loadPluginsFromDirectory(Platform.getDefaultPluginsDirectory())
and libOpenMMAmoebaCUDA.so does not get listed? But if you call Platform.loadPluginLibrary(), specifying just that file in the same directory, it does successfully load?

Peter

Re: CUDA Problem using the AMOEBA FF

Posted: Fri Oct 11, 2013 5:47 am
by michaelschauperl
Hi Peter,

I am using the binary distribution.
if i am using the command
Platform.loadPluginsFromDirectory(Platform.getDefaultPluginsDirectory())
the Amoeba Cuda package is loaded.

Re: CUDA Problem using the AMOEBA FF

Posted: Fri Oct 11, 2013 5:30 pm
by peastman
That's really strange. That is precisely the line that gets executed when you "import simtk.openmm". Inside the __init__.py for that package you'll find

Code: Select all

pluginLoadedLibNames = Platform.loadPluginsFromDirectory(Platform.getDefaultPluginsDirectory())
I have no idea why it would fail to load the plugin there, but succeed when you entered exactly the same command later...

Peter