ccsb-scripps / AutoDock-GPU

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

feat/Added CMakeLists.txt file to the project #174

Open sisco0 opened 2 years ago

sisco0 commented 2 years ago

Solves #173. Should be merged before PR https://github.com/ccsb-scripps/AutoDock-GPU/pull/176.

A CMakeLists.txt has been added to the project with the purpose of showing a way to go on with a CMake-enabled simplified build system.

A test could be run for checking out this file system by running the following commands shown below.

  1. For CUDA builds:
    cmake . -DBUILD_CUDA=1 -B../AutoDock-GPU-Build-CUDA
    cmake --build ../AutoDock-GPU-Build-CUDA -j`nproc`
    (cd ../AutoDock-GPU-Build-CUDA && make CTEST_OUTPUT_ON_FAILURE=1 test)
  2. For OpenCL builds:
    cmake . -DBUILD_OPENCL=1 -B../AutoDock-GPU-Build-OpenCL
    cmake --build ../AutoDock-GPU-Build-OpenCL -j`nproc`
    (cd ../AutoDock-GPU-Build-OpenCL && make CTEST_OUTPUT_ON_FAILURE=1 test)
atillack commented 2 years ago

@sisco0 Thank you for this helpful PR. It might also address #7 🙂

sisco0 commented 2 years ago

Kindly take a look at the parent issue #173 where further steps are established at integrating this build system with the Github Actions CI. Also, I attach a screenshot of the build and test process performed as expected with the establishment of the new test through CMake, sadly, this feature could not be tested under Github-hosted machines for CI as they do not contain OpenCL capabilities.

image

atillack commented 2 years ago

@sisco0 I added C++11 flags and switched to creating symlinks as well as fixed all missing defines for OpenCL to work as well as the options for OVERLAP (parallelized pipeline using OpenMP) as well as NUMWI (number of work units).

The PR is still missing a compilation target and/or fallback for compiling in tool mode - it's a host-only binary that can be used to run XML conversion and contact analysis should no Cuda or OpenCL be available.

Integrating the OpenCL code into the binary is really the only acceptable solution so more work might still be needed for eventual Windows compilation (although Cuda should already compile).

atillack commented 2 years ago

@sisco0 Also, the release types and associated behavior (defines like DOCK_DEBUG) is still missing.

atillack commented 2 years ago

@sisco0 Please see comment in PR #176 - let's move forward with #176 and close this one.

sisco0 commented 2 years ago

I am out of office until Tuesday, I have no inconvenience if any fellow would like to fast-forward the unique branch approach. I plan to continue contributing to the project when I be back.