Parallelized implementation of the Smith-Waterman algorithm for PiA GPU101 @PoliMi.
- Parallelized Score and Direction Matrix Computation;
- GPU Backtrace Implementation;
- CPU-GPU Comparison;
- Pseudo-Random Sequence Generation using the Collatz-Weyl Generator (CWG128).
-
Sequence Generation:
- Sequences are randomly generated using the Collatz-Weyl Generator, producing nucleotide sequences of given length (S_LEN) for alignment.
-
Parallelized Computation:
- The CUDA kernel sw_parallelized computes the score matrix, direction matrix, and performs the traceback. Each CUDA block handles one sequence pair.
-
CPU Baseline:
- The sw_serialized function implements a single-threaded CPU version of Smith-Waterman for comparison.
-
Clone the Repository:
git clone https://github.com/Penzo00/Smith-Waterman.git cd Smith-Waterman
-
Build the Program: Use
nvcc
to compile the CUDA code:nvcc -o sw_parallel_final_true sw_parallel_final_true.cu -O3
-
Run the Executable. Optionally, pass a seed for the Collatz-Weyl Generator:
./sw_parallel_final_true [seed]