dptech-corp / Uni-Dock

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

Uni-Dock seems unable to run on multiple GPUs #21

Open yuanfeifuzzy opened 1 year ago

yuanfeifuzzy commented 1 year ago

I try to run Uni-Dock parallel and expect it to use multiple GPUs (in my case 4 A40 GPUs), however, I only saw one GPU process when I started 4 unidock runs. And it seems all 4 runs were send to the same GPU and unfortunately it was killed by the following error soon:

CUDA error at /home/cdd/Uni-Dock/unidock/src/cuda/precalculate.cu:139 code=46(cudaErrorDevicesUnavailable) "cudaMalloc(&atom_xs_gpu, thread max_atom_num sizeof(sz))"

I was wondering is there any option like --devnum in AutoDock-GPU so that we can distribute jobs to multiple GPUs? By the way I tried the solution here to distribute jobs on each GPU.

caic99 commented 1 year ago

Hi @yuanfeifuzzy , You can set CUDA_VISIBLE_DEVICES env var for each unidock process to select the GPU.

yuanfeifuzzy commented 1 year ago

Hi @caic99 , Using _CUDA_VISIBLEDEVICES env var works. Thanks for the tip. I strongly recommend you implement --devnum option in the next version.

caic99 commented 1 year ago

@yuanfeifuzzy Thanks for your advice!