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

Error when building from source #40

Open
xqding opened this issue Jul 1, 2021 · 1 comment
Open

Error when building from source #40

xqding opened this issue Jul 1, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@xqding
Copy link

xqding commented Jul 1, 2021

I followed the tutorial to build the plugins from source and had the following error when I run "make install".

Scanning dependencies of target CopyTestFiles
[ 3%] CMake-copying file /home/xqding/Downloads/openmm-torch-v.03/tests/central.pt to /home/xqding/Downloads/build_openmm_torch/tests/central.pt
[ 6%] CMake-copying file /home/xqding/Downloads/openmm-torch-v.03/tests/global.pt to /home/xqding/Downloads/build_openmm_torch/tests/global.pt
[ 10%] CMake-copying file /home/xqding/Downloads/openmm-torch-v.03/tests/periodic.pt to /home/xqding/Downloads/build_openmm_torch/tests/periodic.pt
[ 10%] Built target CopyTestFiles
Scanning dependencies of target OpenMMTorch
[ 13%] Building CXX object CMakeFiles/OpenMMTorch.dir/openmmapi/src/TorchForce.cpp.o
[ 17%] Building CXX object CMakeFiles/OpenMMTorch.dir/openmmapi/src/TorchForceImpl.cpp.o
[ 20%] Building CXX object CMakeFiles/OpenMMTorch.dir/serialization/src/TorchForceProxy.cpp.o
[ 24%] Building CXX object CMakeFiles/OpenMMTorch.dir/serialization/src/TorchSerializationProxyRegistration.cpp.o
make[2]: *** No rule to make target /usr/local/cuda/lib64/libnvToolsExt.so', needed by libOpenMMTorch.so'. Stop.
make[1]: *** [CMakeFiles/OpenMMTorch.dir/all] Error 2
make: *** [all] Error

In the file build_openmm_torch/CMakeFiles/OpenMMTorch.dir/build.make, the dependency objects of libOpenMMTorch.so are listed as

libOpenMMTorch.so: CMakeFiles/OpenMMTorch.dir/openmmapi/src/TorchForce.cpp.o
libOpenMMTorch.so: CMakeFiles/OpenMMTorch.dir/openmmapi/src/TorchForceImpl.cpp.o
libOpenMMTorch.so: CMakeFiles/OpenMMTorch.dir/serialization/src/TorchForceProxy.cpp.o
libOpenMMTorch.so: CMakeFiles/OpenMMTorch.dir/serialization/src/TorchSerializationProxyRegistration.cpp.o
libOpenMMTorch.so: CMakeFiles/OpenMMTorch.dir/build.make
libOpenMMTorch.so: /home/xqding/apps/libtorch-1.3.0/lib/libtorch.so
libOpenMMTorch.so: /home/xqding/apps/libtorch-1.3.0/lib/libc10.so
libOpenMMTorch.so: /export/apps/CentOS7/cuda/10.0/lib64/stubs/libcuda.so
libOpenMMTorch.so: /export/apps/CentOS7/cuda/10.0/lib64/libnvrtc.so
libOpenMMTorch.so: /export/apps/CentOS7/cuda/10.0/lib64/libnvToolsExt.so
libOpenMMTorch.so: /export/apps/CentOS7/cuda/10.0/lib64/libcudart.so
libOpenMMTorch.so: /home/xqding/apps/libtorch-1.3.0/lib/libc10_cuda.so
libOpenMMTorch.so: /home/xqding/apps/libtorch-1.3.0/lib/libc10_cuda.so
libOpenMMTorch.so: /home/xqding/apps/libtorch-1.3.0/lib/libc10.so
libOpenMMTorch.so: /export/apps/CentOS7/cuda/10.0/lib64/libcudart.so
libOpenMMTorch.so: /usr/local/cuda/lib64/libnvToolsExt.so
libOpenMMTorch.so: /usr/local/cuda/lib64/libcudart.so
libOpenMMTorch.so: /export/apps/CentOS7/cuda/10.0/lib64/libcufft.so
libOpenMMTorch.so: /export/apps/CentOS7/cuda/10.0/lib64/libcurand.so
libOpenMMTorch.so: /export/apps/CentOS7/cudnn/9.2/lib64
libOpenMMTorch.so: /usr/local/cuda/lib64/libculibos.a
libOpenMMTorch.so: /usr/local/cuda/lib64/libculibos.a
libOpenMMTorch.so: /export/apps/CentOS7/cuda/10.0/lib64/libcublas.so

It is strange that libOpenMMTorch.so depends on both /export/apps/CentOS7/cuda/10.0/lib64/libnvToolsExt.so and /usr/local/cuda/lib64/libnvToolsExt.so, because I already set the CUDA library path to /export/apps/CentOS7/cuda/10.0 in configuration.

Any suggestions on how to fix it? I also attached the CMakeCache.txt file in case it is helpful.

Thanks!
CMakeCache.txt

@peastman
Copy link
Member

peastman commented Jul 1, 2021

I'm not sure what's going on. /usr/local/cuda doesn't appear anywhere in your CMakeCache.txt, so it isn't getting it from there. It's also significant that the error occurs while building libOpenMMTorch.so, which shouldn't be linking to CUDA at all. Any CUDA dependencies should be in libOpenMMTorchCUDA.so.

Could this be an indirect dependency coming from PyTorch? That is, libOpenMMTorch.so requires libTorch, which in turn needs to link to CUDA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants