ccsb-scripps / AutoDock-GPU

AutoDock for GPUs and other accelerators
https://ccsb.scripps.edu/autodock
GNU General Public License v2.0
399 stars 110 forks source link

Assertion '0' failed. Core Dumped #146

Open kma opened 3 years ago

kma commented 3 years ago

Hi,

I compiled Autodock-GPU with :

make DEVICE=GPU NUMWI=128

When I run the example: ./bin/autodock_gpu_64wi --ffile ./input/1stp/derived/1stp_protein.maps.fld --lfile ./input/1stp/derived/1stp_ligand.pdbqt I get this error:

AutoDock-GPU version: v1.4-release

Running 1 docking calculation

Cuda device:                              Tesla K40m (#1 / 4)
Available memory on device:               12127 MB (total: 12206 MB)

CUDA Setup time 0.255303s

Running Job #1
    Using heuristics: (capped) number of evaluations set to 1132076
    Local-search chosen method is: ADADELTA (ad)
SetKernelsGpuData copy to cData failed invalid device symbol
autodock_gpu_64wi: ./cuda/kernels.cu:130: void SetKernelsGpuData(GpuData*): Assertion `0' failed.
Abandon (core dumped)
atillack commented 3 years ago

@kma Hello, this is usually caused by compiling for the wrong compute architecture (by default we compile for 52, 60, 61, and 70 and higher) - try compiling for your architecture directly (I believe the K40m is compute architecture 3.5): make DEVICE=GPU NUMWI=128 TARGETS=35

If this doesn't work, you could try upgrading your Cuda version or to compile the OpenCL version with DEVICE=OCLGPU (in most of our GPUs, OpenCL actually is a bit faster even)

kma commented 3 years ago

Thank you @atillack this solved the problem.

parazue commented 3 years ago

ram@ram:~/Documents/Debanjan-PV-work/NP-AtDB-Vs-4jsv$ autodock_gpu --filelist lig_list.txt AutoDock-GPU version: v1.4-release

Running 20248 docking calculations

Cuda device: NVIDIA GeForce GTX 1050 Ti Available memory on device: 3631 MB (total: 4038 MB)

CUDA Setup time 0.411416s Error: can't open ./final-grid-4jsv.A.map!

Error in load_all_maps, stopped job.

Error in setup of Job #1: ( Grid map file: final-grid-4jsv.maps.fld ) ( Ligand file: lig10000.pdbqt ) pMem_fgrids: failed to upload maps to GPU memory. invalid argument autodock_gpu: ./host/src/performdocking.cpp:106: void copy_map_to_gpu(GpuTempData&, std::vector&, int, int): Assertion `0' failed. Aborted (core dumped)

Am using Ubuntu 18.04, AutoDock GPU -1.4.3 . AMD Processor, Nvidia 1050 Ti, CUDA 11.3. Kindly help me in sorting out.

atillack commented 3 years ago

@parazue Two things are going on in the output you posted: the map file for the "A" atom type cannot be opened and the pMem_fgrids upload error.

The first one means you'll need an "A" map and can hopefully be fixed by making sure that the file exists and permissions are set so it can be read.

The pMem_fgrids upload error is usually caused when too many maps (>31) are in the fld file when the filelist is used - in AD-GPU there are at most 29 atom types currently and 2 maps for electrostatics and desolvation which means you'll likely have doublets in there ... That said, it does seem common for both "CL" and "Cl" maps to be specified as both spellings are allowed in ligand files - you could get rid of one of them though (in the gpf file) and have a symlink (e.g. from the Cl to the CL map file) ... I will fix this limitation in the next release.

parazue commented 3 years ago

@atillack I have rectified the issues and started to carry out VS. Thanks for the support.

Running Job #4463: Fields from: ./3IKA_PP.maps.fld Ligands from: lig15625.pdbqt RNG seed is 1623449180 Local-search chosen method is: Solis-Wets (sw)

Rest of Setup time 0.013184s

Executing docking runs: 20% 40% 60% 80% 100% ---------+---------+---------+---------+---------+


Docking time 8.339902s

Shutdown time 0.000280s

Job #4463 took 8.353 sec after waiting 0.066 sec for setup

(Thread 0 is processing Job 4463) (Thread 0 is setting up Job 4464)

Running Job #4464: Fields from: ./3IKA_PP.maps.fld Ligands from: lig15627.pdbqt RNG seed is 1623449189 Local-search chosen method is: Solis-Wets (sw)

Rest of Setup time 0.013479s

Executing docking runs: 20% 40% 60% 80% 100% ---------+---------+---------+---------+---------+


Docking time 11.546458s

Shutdown time 0.000265s

Job #4464 took 11.560 sec after waiting 0.071 sec for setup

(Thread 0 is processing Job 4464) (Thread 0 is setting up Job 4465)

Running Job #4465: Fields from: ./3IKA_PP.maps.fld Ligands from: lig15628.pdbqt RNG seed is 1623449200 Local-search chosen method is: Solis-Wets (sw)

Rest of Setup time 0.012404s

Executing docking runs: 20% 40% 60% 80% 100% ---------+---------+---------+---------+---------+


Docking time 39.590855s

Shutdown time 0.000257s

Job #4465 took 39.604 sec after waiting 0.066 sec for setup

(Thread 0 is processing Job 4465) (Thread 0 is setting up Job 4466) ** stack smashing detected : terminated Aborted (core dumped)** ram@ram:~/Documents/Debanjan-PV-work/NP-AtDB-Vs-4jsv$

Am using GTX1050 Ti Graphics card with CUDA 11.3 installed. For docking 1000 molecules it takes 3hrs.

Kindly help out to sort the issues.

atillack commented 3 years ago

@parazue Thank you for posting the potential buffer overflow.

Although I have an idea what potentially could be the culprit (which could be part of code already modified in PR 139) I so far have been unable to reproduce your problem ...

To narrow it down a little bit, do you specify the output base names in the file list text file? (any line ending with .fld is a grid map, .pdbqt a ligand, else it's an output base name)

atillack commented 3 years ago

@parazue PR 139 is merged and released as v1.5. This very likely fixes your issue.

miaohao0309 commented 2 years ago

@atillack Hi

I also compiled Autodock-GPU with : make DEVICE=CUDA

But when I run the example: ./bin/autodock_gpu_64wi --ffile ./input/1stp/derived/1stp_protein.maps.fld --lfile ./input/1stp/derived/1stp_ligand.pdbqt

get this error:

AutoDock-GPU version: v1.5-release

Running 1 docking calculation

Cuda device: A100-PCIE-40GB (#1 / 4) Available memory on device: 40120 MB (total: 40536 MB)

CUDA Setup time 2.503058s

Running Job #1 Using heuristics: (capped) number of evaluations set to 1132076 Local-search chosen method is: ADADELTA (ad) SetKernelsGpuData copy to cData failed invalid device symbol autodock_gpu_64wi: ./cuda/kernels.cu:130: void SetKernelsGpuData(GpuData*): Assertion `0' failed. Aborted

My machine OS is "CentOS Linux release 7.9.2009 (Core)" Nvidia Driver Version: 460.32.03 Cuda version: 11.2

Please help me, thanks

atillack commented 2 years ago

@miaohao0309 For A100 you will need to add 80 to the Cuda compilation targets. You can do this either by editing the Makefile or with your build command: make DEVICE=CUDA NUMWI=64 TARGETS="80" should do the trick.

miaohao0309 commented 2 years ago

@atillack It's ok,very thanks

ullahsamee commented 2 years ago

Please guide on how to compile the "Autodock-GPU" on RTX 3070 GPU, Fedora 35 linux

Should I proceed with these commands below? As I've no problems with 1 & 2. However for the third command... I'm not sure how to compile Please help!

1) export GPU_INCLUDE_PATH=/usr/local/cuda/include 2) export GPU_LIBRARY_PATH=/usr/local/cuda/lib64 3) make DEVICE=OCLGPU

Thank you!

tomaszborowski commented 2 years ago

I have compiled using the command: make DEVICE=GPU NUMWI=64 TARGETS=61 but when I tried the test run: ./bin/autodock_gpu_64wi --ffile ./input/1stp/derived/1stp_protein.maps.fld --lfile ./input/1stp/derived/1stp_ligand.pdbqt

I got the following error: AutoDock-GPU version: v1.5-release

Running 1 docking calculation

Cuda device: NVIDIA GeForce GTX 1050 Available memory on device: 1208 MB (total: 1995 MB)

CUDA Setup time 0.094870s pMem_prng_states: failed to allocate GPU memory. out of memory autodock_gpu_64wi: ./host/src/performdocking.cpp:224: void setup_gpu_for_docking(GpuData&, GpuTempData&): Assertion `0' failed. Aborted (core dumped)

In the system I have: NVIDIA-SMI 510.47.03 Driver Version: 510.47.03 CUDA Version: 11.6

Could you, please, advice me how to fix this problem?

atillack commented 2 years ago

@tomaszborowski Your card ran out of memory allocating the PRNG device memory. This is a Cuda version issue as it preallocates this memory and errs on the side of requesting too much memory there (~500 MB for the PRNG states). The OpenCL version on the other hand allocates this memory later when the exact amount is known.

A solution to your problem is to compile and use the OpenCL version with make DEVICE=OCLGPU NUMWI=128. (Cuda installs usually come with OpenCL drivers as well so this should work out of the box for you)

tomaszborowski commented 2 years ago

@atillack Many thanks for your prompt response. Indeed it helped.

Is this message a reason to worry, or the GPU is used and I can ignore this error?:

AutoDock-GPU version: v1.5-release

Running 1 docking calculation

Kernel source used for development: ./device/calcenergy.cl
Kernel string used for building: ./host/inc/stringify.h
Kernel compilation flags: -I ./device -I ./common -DN128WI -cl-mad-enable beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware (If you have multiple ICDs installed and OpenCL works, you can ignore this message) Error: clGetDeviceIDs(): -1 beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware (If you have multiple ICDs installed and OpenCL works, you can ignore this message) Info: Specified OpenCL platform 0 does not have a suitable device, using OpenCL platform 1 ("NVIDIA CUDA") instead. OpenCL device: NVIDIA GeForce GTX 1050

atillack commented 2 years ago

@tomaszborowski By default, OpenCL AD-GPU is set to use the first device (counting starts at 1) on OpenCL platform 0 - if this fails (which the error message is about) then the platform counter gets increased and it cycles through the available platforms until it finds one with a suitable device. Should this automatic detection fail then AD-GPU exits with another error message.

Long story short, the error message is not to worry about but I will probably tone it down a little (probably should just be a warning ...) in a future release.

That said, you can also manually choose the platform number by adding platform nr * 256 to your device number that you specify with -D. So to choose platform 1 and device 1 the device number for AD-GPU would be 1 * 256 + 1 = 257 and autodock_gpu_128wi -D 257 <other options> will set it.

tomaszborowski commented 2 years ago

@atillack Once more many thanks for your explanation and help! The -D 257 option works - no more error message.

davidyanglee commented 2 years ago

@atillack Is there a chart on the TARGETS= to set to? I got the same error msg as above and trying to figure out what the TARGETS=# is for Nvidia 3090. Thank you!

davidyanglee commented 2 years ago

Actually randomly tested TARGETS="80" for Nvidia 3090 and it worked.

atillack commented 2 years ago

@davidyanglee Nvidia keeps a list here: https://developer.nvidia.com/cuda-gpus#compute