DiffDock icon indicating copy to clipboard operation
DiffDock copied to clipboard

Issue with running inference.py

Open Tenchberry opened this issue 2 years ago • 2 comments

Hi there. I recently installed DiffDock, with all steps of the installation proceeding fine. When I attempted to test the installation by running the inference example in the README, the following traceback was returned:-

/home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch_geometric/typing.py:31: UserWarning: An issue occurred while importing 'torch-scatter'. Disabling its usage. Stacktrace: /home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch_scatter/_scatter_cuda.so: undefined symbol: _ZN2at4_ops6narrow4callERKNS_6TensorElll warnings.warn(f"An issue occurred while importing 'torch-scatter'. " /home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch_geometric/typing.py:42: UserWarning: An issue occurred while importing 'torch-sparse'. Disabling its usage. Stacktrace: /home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch_sparse/_diag_cuda.so: undefined symbol: _ZN3c106detail19maybe_wrap_dim_slowEllb warnings.warn(f"An issue occurred while importing 'torch-sparse'. " Traceback (most recent call last): File "inference.py", line 10, in from torch_geometric.loader import DataLoader File "/home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch_geometric/init.py", line 1, in import torch_geometric.utils File "/home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch_geometric/utils/init.py", line 8, in from .dropout import dropout_adj, dropout_node, dropout_edge, dropout_path File "/home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch_geometric/utils/dropout.py", line 6, in import torch_cluster # noqa File "/home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch_cluster/init.py", line 18, in torch.ops.load_library(spec.origin) File "/home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch/_ops.py", line 643, in load_library ctypes.CDLL(path) File "/home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/ctypes/init.py", line 373, in init self._handle = _dlopen(self._name, mode) OSError: /home/khaledabdel/software/miniconda3/envs/diffdock/lib/python3.8/site-packages/torch_cluster/_grid_cuda.so: undefined symbol: _ZN2at4_ops6narrow4callERKNS_6TensorElll

From looking at this, it seems like something went wrong with the installation, as it appears some packages cannot be imported properly. A bit of clarification would be highly appreciative here.

System is a CentOS 7 machine, with CUDA 12.0 installed.

Thanks for your time

Tenchberry avatar Jun 09 '23 13:06 Tenchberry

It may because your CUDA and torch version is not match, my suggestion is to check from the official website of pytorch and reinstall them.

Xu-kexin avatar Jun 13 '23 12:06 Xu-kexin

You can check it my solution here!

asarigun avatar Jan 12 '24 10:01 asarigun