如何编译 OpenMM?

如何编译 OpenMM?

我正在按照安装说明安装 OpenMM,安装说明位于OpenMM 用户指南

信息:测试无法完成,因为我只完成了 62% 的测试目标。见下文。

问题描述

make install(或sudo make install)显示以下消息:

(base) bcramer@schrodinger:~/build_openmm$ make install
[ 62%] Built target ApiWrappers
[ 62%] Built target OpenMM
 ..............etc..........
[ 62%] Built target TestSerializeDrudeLangevinIntegrator

make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libnvrtc.so', needed by 'libOpenMMCudaCompiler.so'.  Stop.
CMakeFiles/Makefile2:7253: recipe for target 'plugins/cudacompiler/CMakeFiles/OpenMMCudaCompiler.dir/all' failed
make[1]: *** [plugins/cudacompiler/CMakeFiles/OpenMMCudaCompiler.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

根据错误,我使用了:

stat /usr/lib/x86_64-linux-gnu/libnvrtc.so
stat: cannot stat '/usr/lib/x86_64-linux-gnu/libnvrtc.so': No such file or directory

此后我使用了:

sudo apt-file search /usr/lib/x86_64-linux-gnu/libnvrtc.so

这给出了答复:

libnvrtc9.1: /usr/lib/x86_64-linux-gnu/libnvrtc.so.9.1
libnvrtc9.1: /usr/lib/x86_64-linux-gnu/libnvrtc.so.9.1.85
nvidia-cuda-dev: /usr/lib/x86_64-linux-gnu/libnvrtc.so

当我跑步的时候

cd /usr/lib/x86_64-linux-gnu/

该文件libnvrtc.so不在指定目录中。

我在环境中包含了以下路径bash以便包含libnvrtc.so

export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64/stubs:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH

该文件libnvrtc.so存在于/usr/local/cuda-9.2/lib64

如果我stat /usr/lib/x86_64-linux-gnu/libnvrtc.so再次跑步,我会不断收到以下消息:

stat: cannot stat '/usr/lib/x86_64-linux-gnu/libnvrtc.so': No such file or directory

问题:我该如何解决这个问题才能完成make install工作?

答案1

我建议安装对应包

sudo apt install nvidia-cuda-dev libnvrtc9.1

如果上述方法失败,我建议删除 CUDA/usr/local/cuda-9.2以获得更可重复的结果。

相关内容