AutoDock-GPU icon indicating copy to clipboard operation
AutoDock-GPU copied to clipboard

Running Autodock-GPU asynchronously

Open Vardanos opened this issue 3 years ago • 1 comments

Hi, We decided to test if we get speedup for a big batch of molecules if we call the GPU asynchronously (using python asyncio by calling terminal command "concurrently"). We tested on 2080 SUPER, and in the case of compiling using OCLGPU, we get no errors and 3x speedup for 60 molecules. In the case of compiling with CUDA, approximately 3-4 out of 60 molecules go into docking, and for the rest we get the following error:

['.../autodock_gpu -ffile .../receptor.maps.fld -lfile ligand.pdbqt -resnam result -nrun 50' exited with 255]
AutoDock-GPU version:

Running 1 docking calculation
Cuda device:                              GeForce RTX 2080 SUPER
Available memory on device:               5374 MB (total: 7979 MB)

CUDA Setup time 0.614074s
(Thread 0 is setting up Job #1)

Running Job #1:
   Using heuristics: (capped) number of evaluations set to 480000
   Local-search chosen method is: ADADELTA (ad)
Error: out of memory launching kernel gpu_calc_initpop_kernel

Do you know what is causing this issue and any workarounds?

Thanks in advance!

Vardanos avatar Apr 07 '21 11:04 Vardanos

@Vardanos It looks like one of the Cuda kernel launches (gpu_calc_initpop) fails with an "out of memory" error - I would interpret this not as missing GPU RAM but shared memory. Likely the reason some of them ran successfully is because they did not overlap.

Based on the number of evals using our heuristics and the relatively long setup time it seems that the speedup you are seeing is mostly due to overlapping file IO (i.e. grid map reading).

You could try running with the -filelist <text file> feature (with a text file containing the map.fld file, the ligand, and the resname on individual lines) - if you compile AD-GPU with OVERLAP=ON, this will asynchronously execute the setup and processing of those runs specified in the file list.

If, like one usually does in a virtual screening of many ligands against a single target, the file list text file only contains one fld map file, the maps will only be read once saving even more file IO. Here is an example:

file.lst: ../receptor.maps.fld ../ligand_1.pdbqt result_1 ../ligand_2.pdbqt result_2 . . . ../ligand_1234.pdbqt result_1234

atillack avatar Apr 13 '21 02:04 atillack