Parallel Cache Efficient Algorithm and Implementation of Needleman-Wunsch Global Sequence Alignment

  • Marek PałkowskiEmail author
  • Krzysztof Siedlecki
  • Włodzimierz Bielecki
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10842)


An approach allowing us to improve the locality of a parallel Needleman-Wunsch (NW) global sequence alignment algorithm is proposed. The original NW algorithm works with an arbitrary gap penalty function and examines all possible gap lengths. To compute the score of an element of an NW array, cells gap symbols are looked back over entire row and column as well as one adjacent cell. We modified the NW algorithm so to read cells only with the row-major order by means of forming a copy of the transposed scoring array. The loop skewing technique is used to generate parallel code. A formal parallel NW algorithm is presented. Experimental results demonstrate super-linear speed-up factor of the accelerated code due to considerable increasing code locality on a studied modern multi-core platform.


Needleman-Wunsch algorithm Global sequence alignment Cache efficiency Loop skewing Bioinformatics 



Thanks to the Miclab Team ( from the Technical University of Czestochowa (Poland) that provided access to high performance multi-core machines for the experimental study presented in this paper.


  1. 1.
    de Almeida, T.J.B.M., Roma, N.F.V.: A parallel programming framework for multi-core DNA sequence alignment. In: International Conference on Complex, Intelligent and Software Intensive Systems, pp. 907–912, February 2010Google Scholar
  2. 2.
    Altschul, S.F., Gish, W., Miller, W., Myers, E., Lipman, D.: A basic local alignment search tool. J. Mol. Biol. 215, 403–410 (1990)CrossRefGoogle Scholar
  3. 3.
    Bielecki, W., Palkowski, M.: Perfectly nested loop tiling transformations based on the transitive closure of the program dependence graph. Soft Comput. Comput. Inf. Sci. 342, 309–320 (2015)Google Scholar
  4. 4.
    Bondhugula, U., Hartono, A., Ramanujam, J., Sadayappan, P.: A practical automatic polyhedral parallelizer and locality optimizer. SIGPLAN Not. 43(6), 101–113 (2008)CrossRefGoogle Scholar
  5. 5.
    Chang, D.J., Kimmer, C., Ouyang, M.: Accelerating the Nussinov RNA folding algorithm with CUDA/GPU. In: 10th IEEE International Symposium on Signal Processing and Information Technology, pp. 120–125, December 2010Google Scholar
  6. 6.
    Li, J., Ranka, S., Sahni, S.: Multicore and GPU algorithms for Nussinov RNA folding. BMC Bioinform. 15(8), S1 (2014). Scholar
  7. 7.
    Needleman, S.B., Wunsch, C.D.: A general method applicable to the search for similarities in the amino acid sequence of two proteins. J. Mol. Biol. 48(3), 443–453 (1970)CrossRefGoogle Scholar
  8. 8.
    Padua, D.A. (ed.): Encyclopedia of Parallel Computing. Springer, New York (2011)zbMATHGoogle Scholar
  9. 9.
    Palkowski, M., Klimek, T., Bielecki, W.: TRACO: an automatic loop nest parallelizer for numerical applications. In: Federated Conference on Computer Science and Information Systems, FedCSIS 2015, Lódz, Poland, 13–16 September 2015, pp. 681–686 (2015).
  10. 10.
    Pearson, W.R., Lipman, D.J.: Rapid and sensitive protein simlarity searches. Science 227, 1435–1441 (1985)CrossRefGoogle Scholar
  11. 11.
    Smith, T., Waterman, M.: Identification of common molecular subsequences. J. Mol. Biol. 147(1), 195–197 (1981)CrossRefGoogle Scholar
  12. 12.
    Wolfe, M.: Loops skewing: the wavefront method revisited. Int. J. Parallel Prog. 15(4), 279–293 (1986)CrossRefGoogle Scholar
  13. 13.
    Xue, J.: Loop Tiling for Parallelism. The Springer International Series in Engineering and Computer Science, vol. 575. Springer, New York (2000). Scholar
  14. 14.
    Zhao, C., Sahni, S.: Cache and energy efficient alignment of very long sequences. In: IEEE 5th International Conference on Computational Advances in Bio and Medical Sciences (ICCABS), pp. 1–6 (2015)Google Scholar
  15. 15.
    Zhao, C., Sahni, S.: Cache and energy efficient algorithms for Nussinov’s RNA folding. BMC Bioinform. 18(15), 518 (2017)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  • Marek Pałkowski
    • 1
    Email author
  • Krzysztof Siedlecki
    • 1
  • Włodzimierz Bielecki
    • 1
  1. 1.Faculty of Computer Science and Information SystemsWest Pomeranian University of Technology in SzczecinSzczecinPoland

Personalised recommendations