ccsb-scripps / AutoDock-GPU

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

Automatically choose all available Cuda compute targets > 50 #270

Closed atillack closed 2 months ago

atillack commented 2 months ago

This PR adds the ability to compile for all available Cuda compute targets > 50.

Additionally, OVERLAP=ON and NUMWI=128 are now defaults - so in a well-configure Cuda environment all that should be needed now is make without having to specify other options.

I also fixed compile warnings related to strncat.

rwxayheee commented 2 months ago

Hi @atillack Just a quick update on the capability of older cuda:

For cuda 11.0.3, now the compilation worked perfectly with gcc 9.1.0. Thanks so much for the change!

For cuda 10 and earlier, because only older gcc (below 8?) is compatible, filsystem.h is not in these gcc versions (or have a different name, I don't really know since which exact version of gcc, but this post might be able to provide the information). I was never able to compile AD-GPU with gcc below 8. (if you don't want users to compile with old cuda and gcc, we could provide some suggested combinations or the requirements in README, if that helps

filesystem.h was required by ./host/src/getparameters.cpp

rwxayheee commented 2 months ago

I was able to compile it with the following combinations: (1) cuda 11.0.3, gcc 9.1.0 (2) cuda 11.1.1 to 11.8.0, gcc 10.3.0 (3) cuda 12.2, gcc 11.4.0

For testing, I did the basic docking with the provided files for ad4 and checked the results. I tested on the following hardware: Tesla P100 V100 T4 (Ampere) A100

All look good to me. I will approve this PR if you think no further changes are to be made.

atillack commented 2 months ago

@rwxayheee Thank you! Yeah, since without C++17 the filesystem operations we need would be a terribly unportable mess this is an easy choice 🙂

atillack commented 2 months ago

I will update README.md separately to point out we now need at least Cuda 11 due to needing GCC >= 9.

atillack commented 2 months ago

(this has technically been true for a while now since we switched to C++17)

atillack commented 2 months ago

Thank you Amy!

rwxayheee commented 2 months ago

I will update README.md separately to point out we now need at least Cuda 11 due to needing GCC >= 9.

Sounds great, thank you! No hurry though, we can work on that tomorrow

atillack commented 2 months ago

@rwxayheee I edited README.md in the develop branch (since those changes were there since commit 846dc2b).

rwxayheee commented 2 months ago

Hi @atillack Thank you! I looked at f404aca34d484703d31aa77eee86af92159b452d. All look good to me.