GPU Sequence Alignment

CUDA implementation of the Smith-Waterman Algorithm

Introduction

I have provided an implementation of the sequence alignment Smith-Waterman algorithm written in C using CUDA for the GPU-101 Project by Politecnico di Milano.

Github Directories

In the implementation directory it is possible to find the code of the program, while in the profile directory the profiling files generated by using nvprof for the gpu implementation on a Tesla T4. Lastly, the report directory contains a detailed description and discussion of the algorithm and its implementation in a 4-pages PDF document.

Code Usage

Compilation

In order to compile the implementation you need first of all to make sure you have access to a NVIDIA gpu, either on your PC or through Google Colab. Then, you need to open a terminal and clone this github repo with the following command.

git clone https://github.com/fabrizioaymone/cuda-smith-waterman.git

Then enter in the implementation directory.

cd cuda-smith-waterman/implementation/

Lastly, compile the source code using make

make

Launching

There are two versions of the implementation: pure and conventional. See details in my report. To launch the version of your choice pass to the program its name as argument. If you want, for instance, to run the pure implementation, use the following command.

./main.out pure