dptech-corp / Uni-Dock

Uni-Dock: a GPU-accelerated molecular docking program
189 stars 39 forks source link

Unable to run unidock in WSL2 #12

Open XingyuLiao opened 1 year ago

XingyuLiao commented 1 year ago

The original system is Windows 10, and I get unidock in WSL2 of Ubuntu20.04.

The CUDA toolkit is installed(WSL version).

When running unidock, the GPU seems not to be working. But the CPU is hardly working with 100% load.

So, what's wrong with it?

caic99 commented 1 year ago

Hi @XingyuLiao , Would you provide more detailed info for us to locate the problem. Thanks!

XingyuLiao commented 1 year ago

1 2 3

This is the usage of CPU and GPU. It seems that unidock is running as a CPU program, not GPU.

The WLS info: Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Tue_Sep_15_19:10:02_PDT_2020 Cuda compilation tools, release 11.1, V11.1.74 Build cuda_11.1.TC455_06.29069683_0

Thu Jul 13 10:34:10 2023 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 510.72 Driver Version: 512.72 CUDA Version: 11.6 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... On | 00000000:01:00.0 Off | N/A | | N/A 57C P8 7W / N/A | 0MiB / 6144MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | No running processes found |

caic99 commented 1 year ago

Hi @XingyuLiao , CPU task is required to parse and construct PDBQT data structures. After that, GPU will be used in the docking phase. How long did you stuck in the CPU preprocessing step? Please try with less ligands to ensure the correctness. Sorry for we have not tried uni-dock on WSL systems. Thanks!

caic99 commented 1 year ago

@XingyuLiao And please check you are using --gpu-ligand but not --ligand. Would you provide your full command line for us.

XingyuLiao commented 1 year ago

@caic99 This is the running command: unidock --receptor Rec.pdbqt --ligand Lig_native.pdbqt --center_x -27.68294545 --center_y -29.06689091 --center_z 16.39609091 --size_x 20 --size_y 20 --size_z 20 --scoring vinardo --refine_step 5 --num_modes 100 --seed 5 --search_mode fast --dir unidock_out/ Thanks a lot for your reply. But the parameter "--gpu-ligand" seems not exist.

XingyuLiao commented 1 year ago

In addition, I try another command: unidock --receptor Rec.pdbqt --gpu_batch Lig_native.pdbqt --center_x -27.68294545 --center_y -29.06689091 --center_z 16.39609091 --size_x 20 --size_y 20 --size_z 20 --scoring vinardo --refine_step 5 --num_modes 100 --seed 5 --search_mode fast --dir unidock_out However, it doesn't work, and there is another error: Computing Vinardo grid ... entering done done. exiting done Total ligands: 1 Avaliable Memory = 5161MiB Total Memory = 6143MiB Batch 1 size: 0 ERROR: Empty ligand list.

caic99 commented 1 year ago

Hi @XingyuLiao ,

I compiled Uni-Dock from source code and successfully finished the task under examples/screening_test. I use ubuntu 22.04 with WSL2, on my 3070 Ti 8GB GPU. It seems that Uni-Dock works smoothly on WSL2 systems.

You could compiling from source code and try again.

P4j45 commented 2 months ago

Hi,

I succesfully compiled from source Uni-Dock from sourceunder WSL2/Debian, running on Windows 11. I prefer Debian over Ubuntu because it has a much smaller footprint and appears very stable and snappy. This is on a laptop with a NVIDIA RTX A500 GPU. It is important that you have the correct NVIDIA driver installed under Windows (not under Linux, WSL2 uses the Windows GPU driver!). There seem to be problems with NVIDIA drivers >version 537 in combination with WSL2, so I use the Windows NVIDIA driver version 537.99. This driver supports CUDA up to version 12.2, which I installed under WSL2. After this I could successfully run the default example. You can check if the GPU is invoked by running the Windows Task Manager and look for the GPU there.