I tried to install OpenMM via conda on python3.5.
All seems to work fine, but if I run:
python testInstallation.py
in miniconad3/lib/python3.5/site-packages/simtk/
I do not have a CPU platform available. In fact I get the following output:
There are 2 Platforms available:
1 Reference - Successfully computed forces
2 OpenCL - Error computing forces with OpenCL platform
OpenCL platform error: Error initializing context: clGetPlatformIDs (-1001)
Median difference in forces between platforms:
No CPU platform
- Peter Eastman
- Posts: 2588
- Joined: Thu Aug 09, 2007 1:25 pm
Re: No CPU platform
Hi Antonia,
Mostly likely this means one of two things: your computer doesn't support the CPU platform, or the plugin containing it isn't getting loaded.
The CPU platform requires that your CPU supports SSE 4.2. That includes nearly all computers made in the last five years, but if you have an old computer it might not.
If it's a problem with loading the plugin, start up a Python interpreter, then type the following:
That will print out information that should hopefully indicate what the problem is.
The OpenCL error probably means you either don't have a GPU that supports OpenCL, or that you don't have the needed drivers installed. What OS and hardware are you using?
Peter
Mostly likely this means one of two things: your computer doesn't support the CPU platform, or the plugin containing it isn't getting loaded.
The CPU platform requires that your CPU supports SSE 4.2. That includes nearly all computers made in the last five years, but if you have an old computer it might not.
If it's a problem with loading the plugin, start up a Python interpreter, then type the following:
Code: Select all
from simtk.openmm import *
print(Platform.getPluginLoadFailures())
The OpenCL error probably means you either don't have a GPU that supports OpenCL, or that you don't have the needed drivers installed. What OS and hardware are you using?
Peter
- NIKOLAY PLOTNIKOV
- Posts: 4
- Joined: Sun Dec 21, 2014 8:09 pm
Re: No CPU platform
I have a related question/problem on the CPU Platform with FFT library
If I run benchmark.py with PME-2fs I'm getting very bad timing compared to benchmark (only for this test).
my_test/benchmark
implicit, 2 fs 12.6/ 6.1
explicit-rf, 2 fs 14.6/ 14.6
pme 2 fs 1.6/ 10.5
I installed a local copy of FFTW and add compiled it with --float-enabled and --threads-enabled options. Then I added ~/bin to $PATH and ~/lib to $LD_LIB_PATH
~/lib contains:
libfftw3f.a libfftw3f.la libfftw3f_threads.a libfftw3f_threads.la pkgconfig
~/bin contains
fftwf-wisdom fftw-wisdom-to-conf
I compiled OpenMM myself and getting no error messages from this command
>>> from simtk.openmm import *
>>> print(Platform.getPluginLoadFailures())
()
I suspect fftw is not used. Are libraries supposed to be static or dynamic? How OpenMM detect them?
If I run benchmark.py with PME-2fs I'm getting very bad timing compared to benchmark (only for this test).
my_test/benchmark
implicit, 2 fs 12.6/ 6.1
explicit-rf, 2 fs 14.6/ 14.6
pme 2 fs 1.6/ 10.5
I installed a local copy of FFTW and add compiled it with --float-enabled and --threads-enabled options. Then I added ~/bin to $PATH and ~/lib to $LD_LIB_PATH
~/lib contains:
libfftw3f.a libfftw3f.la libfftw3f_threads.a libfftw3f_threads.la pkgconfig
~/bin contains
fftwf-wisdom fftw-wisdom-to-conf
I compiled OpenMM myself and getting no error messages from this command
>>> from simtk.openmm import *
>>> print(Platform.getPluginLoadFailures())
()
I suspect fftw is not used. Are libraries supposed to be static or dynamic? How OpenMM detect them?
- Peter Eastman
- Posts: 2588
- Joined: Thu Aug 09, 2007 1:25 pm
Re: No CPU platform
That should be LD_LIBRARY_PATH. So that may be one part of the problem. Also, you need dynamic libraries for FFTW, not static ones. They'll have filenames ending in ".so". The ones that end in ".a" are static libraries.~/lib to $LD_LIB_PATH
If that still doesn't fix it, the "ldd" command is useful for debugging errors in loading libraries:
Code: Select all
ldd /usr/local/openmm/lib/plugins/libOpenMMPME.so
Peter
- NIKOLAY PLOTNIKOV
- Posts: 4
- Joined: Sun Dec 21, 2014 8:09 pm
Re: No CPU platform
Thanks for your recommendation, Peter!
checking existence of libOpenMMPME.so really helped
I had to add
--enable-shared flag to fftw compilation to generated dynamic libraries.
Then it worked with precompiled libraries.
However I realized that I have problem creating a Makefile with ccmake. It doesn't detect fftw path (it's a local one):
[error message about these env]
FFTW_INCLUDES (ADVANCED)
FFTW_LIBRARY (ADVANCED)
linked by target "OpenMMPME" in directory
I had to manually set a few env , reconfigure and generate Cmake files:
OPENMM_BUILD_PME_PLUGIN ON
FFTW_INCLUDES /.../fftw/lib/include
FFTW_LIBRARY /.../fftw/lib/libfftw3f.so
FFTW_THREADS_LIBRARY /.../fftw/lib/libfftw3f_threads.so
but on the building (make install) stage it crashed:
so I had to go to put an explicit path to fftw3.h.
At the end of the day 2-hexacore E5-2620 generate about 9 ns/day
checking existence of libOpenMMPME.so really helped
I had to add
--enable-shared flag to fftw compilation to generated dynamic libraries.
Then it worked with precompiled libraries.
However I realized that I have problem creating a Makefile with ccmake. It doesn't detect fftw path (it's a local one):
[error message about these env]
FFTW_INCLUDES (ADVANCED)
FFTW_LIBRARY (ADVANCED)
linked by target "OpenMMPME" in directory
I had to manually set a few env , reconfigure and generate Cmake files:
OPENMM_BUILD_PME_PLUGIN ON
FFTW_INCLUDES /.../fftw/lib/include
FFTW_LIBRARY /.../fftw/lib/libfftw3f.so
FFTW_THREADS_LIBRARY /.../fftw/lib/libfftw3f_threads.so
but on the building (make install) stage it crashed:
Code: Select all
[ 67%] Building CXX object plugins/cpupme/CMakeFiles/OpenMMPME.dir/src/CpuPmeKernelFactory.cpp.o
In file included from source_codes/openmm/plugins/cpupme/src/CpuPmeKernelFactory.cpp:28:0:
source_codes/openmm/plugins/cpupme/src/CpuPmeKernels.h:41:19: fatal error: fftw3.h: No such file or directory
#include <fftw3.h>
At the end of the day 2-hexacore E5-2620 generate about 9 ns/day