Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install plugin with custom versions openMM #57

Open
georopon opened this issue Jan 11, 2022 · 12 comments
Open

install plugin with custom versions openMM #57

georopon opened this issue Jan 11, 2022 · 12 comments

Comments

@georopon
Copy link

hi,

I like install plumed plugin with last version of openMM (7.7), but not have clear as make it task.

please, can help me.

@raimis
Copy link

raimis commented Jan 11, 2022

@georopon
Copy link
Author

Thanks so much!

@PedroHuertaRoque
Copy link

Hi,
When I build the plugin I get this error:

make install

No such file or directory
32 | #include "openmm/OpenMMException.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/OpenMMPlumed.dir/build.make:63: CMakeFiles/OpenMMPlumed.dir/openmmapi/src/PlumedForce.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/OpenMMPlumed.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

please, can help me.

@raimis
Copy link

raimis commented Jan 12, 2022

@PedroHuertaRoque is any reason to build the plugin from the source rather than using conda (https://github.com/openmm/openmm-plumed#installing-the-plugin)?

@tonigi
Copy link
Contributor

tonigi commented Jan 12, 2022

@peastman
Copy link
Member

That suggests that OPENMM_DIR isn't set correctly in CMake. It isn't finding the header files.

@jgninterline
Copy link

jgninterline commented Oct 2, 2023

Has anyone made progress on this? I have to compile plumed from source since I need a non-standard feature, so I assume that I need to install the plugin from source too.

I have openmm installed from conda so I set OPENMM_DIR to "~/miniconda3/envs/openmm-plumed/include", which contains "openmm/OpenMMException.h". grepping "OPENMM_DIR" shows that the path is correctly set in CMakeCache.txt, but CMakeLists.txt seems to both have an incorrect path (/usr/local/openmm) and the directory structure doesn't match the conda installation. (include and lib aren't in the OPENMM_DIR)

Is there a way to install plumed and the plugin with openmm from conda or do I need to install the whole stack from scratch?

UPDATE

Installing with OpenMM compiled from source worked. I did have to use "/path_to_plumed/plumed/include/plumed" for PLUMED_INCLUDE_DIR rather than "/path_to_plumed/plumed/include" as I would have expected.

@tonigi
Copy link
Contributor

tonigi commented Oct 4, 2023

A while ago I wrote this. Not sure if still relevant. https://github.com/giorginolab/miniomm/wiki/4.-Installing-OpenMM-Plumed-plugin

@peastman
Copy link
Member

peastman commented Oct 4, 2023

I think you want to set OPENMM_DIR to ../miniconda3/envs/openmm-plumed. It expects to find include and lib directories inside the home directory.

The value set in CMakeLists.txt is just the default. It gets overridden by whatever value you choose.

@jgninterline
Copy link

Thanks for your help, both!

Attacking the problem on two fronts. I have separate conda environments for each, but currently have shared openmm-plumed and plumed installations.

First, trying to install everything from source. Using both my settings and @tonigi's, everything compiles OK, however I get a CUDA_ERROR_UNSUPPORTED_PTX_VERSION when I try to run the CUDA tests. According to this post, it could be a CUDA version incompatibility. I'm running driver 470.182.03 and and just installed CUDA 11.4 which, according to the table @peastman referenced in that thread, should be compatible, but I still get the error. (and they ship together according to our network admin)

I'm also trying to get the conda installation working. @peastman's suggestion worked to install the plugin, however, when I run "make PythonInstall", I get:

$ make PythonInstall
[100%] Generating PlumedPluginWrapper.cpp
/home/gnelson/miniconda3/envs/openmm-plumed/include/swig/OpenMMSwigHeaders.i:12: Error: Unknown directive '%factory'.
make[3]: *** [python/CMakeFiles/PythonInstall.dir/build.make:73: python/PlumedPluginWrapper.cpp] Error 1
make[2]: *** [CMakeFiles/Makefile2:434: python/CMakeFiles/PythonInstall.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:441: python/CMakeFiles/PythonInstall.dir/rule] Error 2
make: *** [Makefile:283: PythonInstall] Error 2

and python can't find openmmplumed. (the installation does work otherwise, including on the GPU) I know nothing about swig so let me know what other information I can provide.

@peastman
Copy link
Member

peastman commented Oct 6, 2023

The CUDA_ERROR_UNSUPPORTED_PTX_VERSION is generally caused by using a CUDA toolkit that is newer than what your driver supports. Your driver is fairly old. Can you upgrade it? Another thing that can cause this problem is if you've set the OPENMM_CUDA_COMPILER environment variable to tell it to use a specific version of nvcc, which may be more recent than what you think you're using. In OpenMM 8.1 we're getting rid of the option to use nvcc. It will always use nvrtc from the toolkit, which should eliminate that problem.

The Unknown directive '%factory' error was introduced by an update to SWIG. OpenMM 8.1 will also have a workaround for it. In the mean time you can work around it in the OpenMM-PLUMED code by adding the line %include "factory.i" to plumedplugin.i, immediately after the %module line. See openmm/openmm#3989.

@jgninterline
Copy link

thanks @peastman!

I compiled everything on my local machine with cuda 11.8 and driver 520 and, as you predicted, the CUDA error went away. I'm now running into a problem making the openmm-plumed python installation:

$ make PythonInstall
In file included from PlumedPluginWrapper.cpp:3194:
/path/to/openmm-plumed-master/openmmapi/include/PlumedForce.h:35:10: fatal error: openmm/Context.h: No such file or directory
#include "openmm/Context.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
make[3]: *** [python/CMakeFiles/PythonInstall.dir/build.make:78: PythonInstall] Error 1
make[2]: *** [CMakeFiles/Makefile2:434: python/CMakeFiles/PythonInstall.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:441: python/CMakeFiles/PythonInstall.dir/rule] Error 2
make: *** [Makefile:283: PythonInstall] Error 2

I assume make just isn't looking in the right place or something simple like that since Context.h is located in CMAKE_INSTAL_PREFIX/include/openmm as I would expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants