Soft Computing for Problem Solving pp 131-140 | Cite as

# GPU Computing for Compute-Intensive Scientific Calculation

## Abstract

GPU has emerged as a platform that off-loads computation intensive work from CPU and performs numerical computations in less time. One such mathematical operation is matrix multiplication. Matrix is one of the fundamental mathematical objects used in the scientific calculation, with applicability in various fields such as computer graphics, analysis of electrical circuits, computer networks, DNA sequence comparison, protein structure prediction, etc. This work presents a comparative analysis of scalar matrix multiplication in three modes, namely: (i) sequential programming in C language (ii) parallel implementations using OpenCL, and (iii) MPI. The testbed comprises of input matrices ranging from small size of \(100\times 100\) to a higher size of \(12{,}800\times 12{,}800\). We observe that parallel execution in OpenCL outperforms MPI and sequential C for higher dimensional matrices. In contrast, sequential C outperforms both MPI and OpenCL for small dimension matrices. Besides, we analyze that OpenCL program has attained a speedup of \(9\times \). Therefore, we conclude that parallel execution of code is more efficient for data of computationally large sizes and hence provides a potentially useful solution to address NP-complete problems.

## Keywords

HPC GPU Matrix multiplication OpenCL MPI## References

- 1.Hwu, W.W.: GPU Computing Gems, vol. 2. Elsevier (2012)Google Scholar
- 2.Li, J.: GPU Algorithms for Bioinformatics. University of Florida (2014)Google Scholar
- 3.de Oliveira, F.B., Davendra, D., Guimaraes, F.G.: Multi-objective differential evolution on the GPU with C-CUDA. In: Snasel, V., Abraham, A., Corchado, E. (eds.) Soft Computing Models in Industrial and Environmental Applications. Advances in Intelligent Systems and Computing, vol. 188. Springer, Berlin, Heidelberg (2013)Google Scholar
- 4.Pevsner, J.: Bioinformatics and Functional Genomics. Wiley (2015)Google Scholar
- 5.Rigden, D.J. (ed.): From Protein Structure to Function with Bioinformatics. Springer, Berlin (2009)Google Scholar
- 6.Dill, K.A., Bromberg, S., Yue, K., Chan, H.S., Ftebig, K.M., Yee, D.P., Thomas, P.D.: Principles of protein folding—a perspective from simple exact models. Protein Sci.
**4**(4), 561–602 (1995)CrossRefGoogle Scholar - 7.Berger, B., Leighton, T.: Protein folding in the hydrophobic-hydrophilic (HP) model is NP-complete. J. Comput. Biol.
**5**(1), 27–40 (1998)CrossRefGoogle Scholar - 8.Islam, M.K., Chetty, M.: Clustered memetic algorithm with local heuristics for ab initio protein structure prediction. IEEE Trans. Evol. Comput.
**17**(4), 558–576 (2013)CrossRefGoogle Scholar - 9.Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. MIT Press, Leiserson (2009)zbMATHGoogle Scholar
- 10.Gaster, B.R., Howes, L., Kaeli, D., Mistry, P., Schaa, D.: Heterogeneous Computing with OpenCL. Morgan Kaufmann (2012)Google Scholar
- 11.Quinn, M.J.: Parallel Programming in C with MPI and OpenMP. McGraw-Hill (2003)Google Scholar
- 12.Dubey, S.P.N., Kini, N.G., Balaji, S., Kumar, M.S.: A review of protein structure prediction using lattice model. Crit. Rev. Biomed. Eng.
**46**(2), 147–162 (2018)CrossRefGoogle Scholar