Skip to content

Guideline for users

Diogo edited this page Nov 9, 2021 · 9 revisions

Minimal compilation instructions

1. Find CUDA (and install it if needed)

The path to CUDA libraries varies widely across systems. For example, as of November 2021, installing CUDA with aptitude on Ubuntu 20.04 places "cuda.h" in /usr/include and "libcuda.so" in /usr/lib/x86_64-linux-gnu. If these paths are where CUDA is installed on your system, setting the following environment variables will tell the compiler where to find them.

export GPU_INCLUDE_PATH=/usr/include
export GPU_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu

To download CUDA visit https://developer.nvidia.com/cuda-toolkit or use aptitude: sudo apt install nvidia-cuda-toolkit

General setup instructions

First of all, make sure that OpenCL drivers have been installed for the target accelerator platform in your system.

The following configuration has worked smoothly. Other environments or configurations might work as well, but are untested.

Operating system: Linux CPU GPU
CentOS 6.7 & 6.8 / Ubuntu 14.04 & 16.04 Intel SDK for OpenCL 2017 AMD APP SDK v3.0 / CUDA 8,9,10

Before compiling and / or executing

The corresponding environmental variables must be defined

  • CPU accelerator : $(CPU_INCLUDE_PATH) and $(CPU_LIBRARY_PATH)
  • GPU accelerator : $(GPU_INCLUDE_PATH) and $(GPU_LIBRARY_PATH)
  • Both platforms: $(LD_LIBRARY_PATH)

Explanation

  • $(CPU_INCLUDE_PATH) / $(GPU_INCLUDE_PATH): paths containing the OpenCL header files, i.e., CL/cl.h, CL/cl.hpp, and opencl.h.
  • $(CPU_LIBRARY_PATH) / $(GPU_LIBRARY_PATH): paths containing the OpenCL shared library, i.e., libOpenCL.so.

The following environment variables are usually set by the corresponding driver installer: $INTELOCLSDKROOT, $AMDAPPSDKROOT, and $CUDAROOT.

If they are defined, they can be used to set the required include and library paths, e.g.,:

% echo $INTELOCLSDKROOT
/opt/intel/opencl-1.2-sdk-6.0.0.1049

% export CPU_INCLUDE_PATH=$INTELOCLSDKROOT/include
% export CPU_LIBRARY_PATH=$INTELOCLSDKROOT/lib/x64
% echo $AMDAPPSDKROOT
/opt/AMDAPPSDK-3.0

% export GPU_INCLUDE_PATH=$AMDAPPSDKROOT/include
% export GPU_LIBRARY_PATH=$AMDAPPSDKROOT/lib/x64_86
% echo $CUDAROOT
/usr/local/cuda-10.0

% export GPU_INCLUDE_PATH=$CUDAROOT/include
% export GPU_LIBRARY_PATH=$CUDAROOT/lib64

Compilation

The basic compilation requires the specify the target accelerator:

make DEVICE=<TYPE>
Parameters Description Values
<TYPE> Accelerator chosen CPU, GPU

After successful compilation, the host binary autodock_<type>_<N>wi is placed under bin.

Binary-name portion Description Values
<type> Accelerator chosen cpu, gpu

Usage

Basic

./bin/autodock_<type>_<N>wi \
-ffile <protein>.maps.fld \
-lfile <ligand>.pdbqt
Mandatory options Description Value
-ffile Receptor file <receptor>.maps.fld
-lfile Ligand file <ligand>.pdbqt

Example

Input:

./bin/autodock_gpu_64wi \
-ffile ./input/1stp/derived/1stp_protein.maps.fld \
-lfile ./input/1stp/derived/1stp_ligand.pdbqt

Output:

AutoDock-GPU version: sd-tsri-147-ga5587b1026e44a39bb7614ce057959970aef3483

Kernel source used for development:      ./device/calcenergy.cl                  
Kernel string used for building:         ./host/inc/stringify.h                  
Kernel compilation flags:                 -I ./device -I ./common -DN64WI        
Local-search chosen method is: Solis-Wets (sw)

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

Program run time 8.435 sec

By default the output log file is written in the current working folder. Examples of output logs can be found under examples/output.

Supported arguments

Argument Description Default value
-nrun # LGA runs 1
-nev # Score evaluations (max.) per LGA run 2500000
-ngen # Generations (max.) per LGA run 27000
-lsmet Local-search method sw (Solis-Wets)
-lsit # Local-search iterations (max.) 300
-psize Population size 150
-mrat Mutation rate 2 (%)
-crat Crossover rate 80 (%)
-lsrat Local-search rate 6 (%)
-trat Tournament (selection) rate 60 (%)
-resnam Name for docking output log "docking"
-hsym Handle symmetry in RMSD calc. 1

For a complete list of available arguments and their default values, check getparameters.cpp.

Further reading

Go to Wiki home.

Clone this wiki locally