PARALLEL NUMERICAL COMPUTATION: A COMPARATIVE STUDY ON CPU-GPU PERFORMANCE IN PI DIGITS COMPUTATION

  • Yozef Tjandra (1*) Calvin Institute of Technology
  • Sanga Lawalat (2) Calvin Institute of Technology

  • (*) Corresponding Author
Keywords: GPU, parallel computing, BBP formula, CPU-GPU comparison, parallel numerical method

Abstract

As the usage of GPU (Graphical Processing Unit) for non-graphical computation is rising, one important area is to study how the device helps improve numerical calculations. In this work, we present a time performance comparison between purely CPU (serial) and GPU-assisted (parallel) programs in numerical computation. Specifically, we design and implement the calculation of the hexadecimal -digit of the irrational number Pi in two ways: serial and parallel. Both programs are based upon the BBP formula for Pi in the form of infinite series identity. We then provide a detailed time performance analysis of both programs based on the magnitude. Our result shows that the GPU-assisted parallel algorithm ran a hundred times faster than the serial algorithm. To be more precise, we offer that as the value  grows, the ratio between the execution time of the serial and parallel algorithms also increases. Moreover, when  it is large enough, that is This GPU efficiency ratio converges to a constant, showing the GPU's maximally utilized capacity. On the other hand, for sufficiently small enough, the serial algorithm performed solely on the CPU works faster since the GPU's small usage of parallelism does not help much compared to the arithmetic complexity.

Downloads

Download data is not yet available.

References

Abdelfattah, A., Anzt, H., Boman, E. G., Carson, E., Cojean, T., Dongarra, J., . . . Li, S. (2020). A survey of numerical methods utilizing mixed precision arithmetic. arXiv preprint arXiv:2007.06674. https://arxiv.org/pdf/2007.06674.pdf

Bailey, D. H. (2006). The BBP Algorithm for Pi. Berkeley: Lawrence Berkeley National Lab.(LBNL). https://www.osti.gov/servlets/purl/983322

Bailey, D., Borwein, P., & Plouffe, S. (1997). On the rapid computation of various polylogarithmic constants. Mathematics of Computation, 66(218), 903-913. https://doi.org/10.1090/S0025-5718-97-00856-9

Baylor G.Fain, H. M. (2022). GPU acceleration and data fitting: Agent-based models of viral infections can now be parameterized in hours. Journal of Computational Science. https://doi.org/10.1016/j.jocs.2022.101662

Brodtkorb, A. R., Hagen, T. R., & Sætra, M. L. (2013). Graphics processing unit (GPU) programming strategies and trends in GPU computing. Journal of Parallel and Distributed Computing, 73(1), 4-13. https://doi.org/10.1016/j.jpdc.2012.04.003

David Kirk, W.-m. H. (2017). Programming Massively Parallel Processors. Cambridge: Elsevier.

Hockney, R. W., & Jesshope, C. R. (2019). Parallel Computers 2: Architecture, Programming and Algorithms. CRC Press.

Hu, Y., Liu, Y., & Liu, Z. (2022). A Survey on Convolutional Neural Network Accelerators: GPU, FPGA and ASIC. 2022 14th International Conference on Computer Research and Development (ICCRD) (pp. 100-107). IEEE. https://doi.org/10.1109/ICCRD54409.2022.9730377

Intel Corp. (2019). Intel®️ Core™️ i5 Processors. (Processors Productions) Retrieved 8 10, 2022, from Intel.com: https://www.intel.com/content/www/us/en/products/sku/190883/intel-core-i59400f-processor-9m-cache-up-to-4-10-ghz/specifications.html

Iwao, E. H. (2022, June 8). Even more pi in the sky: Calculating 100 trillion digits of pi on Google Cloud. Retrieved from Google Cloud Blog: https://cloud.google.com/blog/products/compute/calculating-100-trillion-digits-of-pi-on-google-cloud

Jeong, Y.-S., Oh, K.-J., Cho, C.-K., & Choi, H.-J. (2020). Pseudo-random number generation using LSTMs. The Journal of Supercomputing, 76(10), 8324-8342. https://doi.org/10.1109/BigComp.2018.00091

Keller, T. (2021, August 14). World record attempt by UAS Grisons: Pi-Challenge. Retrieved from University of Applied Science Grisons Website: https://www.fhgr.ch/en/themenschwerpunkte/applied-future-technologies/davis-centre/pi-challenge/

Kim, D. H., Williams, L. J., Hernandez-Fernandez, M., & Bjornson, B. H. (2022). Comparison of CPU and GPU bayesian estimates of fibre orientations from diffusion MRI. Plos one, 17(4), e0252736. https://doi.org/10.1371/journal.pone.0252736

Kumar, A., & Sen, S. (2019). Design and Analysis of Algorithms. Cambridge University Press.

Nvidia. (2016). Geforce GTX 1060 Specifications. (Graphics Cards Productions) Retrieved 8 10, 2022, from nvidia.com: https://www.nvidia.com/en-gb/geforce/graphics-cards/geforce-gtx-1060/specifications/

Reguly, I. Z., & Mudalige, G. R. (2020). Productivity, performance, and portability for computational fluid dynamics applications. Computers & Fluids, 104425. https://doi.org/10.1016/j.compfluid.2020.104425

Reitwiesner, G. W. (1950). An ENIAC Determination of π and e to more than 2000 Decimal Places. Mathematical Tables and Other Aids to Computation, 4(29), 11-15. https://doi.org/10.2307/2002695

Rosenfeld, V., Breß, S., & Markl, V. (2022). Query processing on heterogeneous CPU/GPU systems. ACM Computing Surveys (CSUR), 55(1), 1-38. https://doi.org/10.1145/3485126

Semenenko, J., Kolesau, A., Starikovičius, V., Mackūnas, A., & Šešok, D. (2020). Comparison of GPU and CPU efficiency while solving heat conduction problems. Mokslas-Lietuvos ateitis/Science-Future of Lithuania, 12. https://doi.org/10.3846/mla.2020.13500

Takahashi, D. (2020). On the computation and verification of π using BBP-type formulas. The Ramanujan Journal, 177-186. https://link.springer.com/article/10.1007/s11139-018-0104-x

V-Gen. (n.d.). V-GeN Platinum DDR 4 PC 19200 - 2400 MHz. Retrieved 8 10, 2022, from V-Gen.co.id: https://v-gen.co.id/ram/v-gen-platinum-ddr-4-pc-19200-2400-mhz-ecc/

Wolchover, N. (2022). Does time really flow? New clues come from a century-old approach to math. The Best Writing on Mathematics 2021, 19, 183.

Yunus, I., Kanata, B., & Ariessaputra, S. (2021). Perbandingan Kinerja CPU dengan GPU dan Tanpa GPU dalam Pemrosesan Gambar Menggunakan Metode Convolutional Neural Network. Indonesian Journal of Applied Science and Technology, 2(4), 127-134. Retrieved from https://journal.publication-center.com/index.php/ijast/article/view/1310

Published
2022-09-13
How to Cite
Tjandra, Y., & Lawalat, S. (2022). PARALLEL NUMERICAL COMPUTATION: A COMPARATIVE STUDY ON CPU-GPU PERFORMANCE IN PI DIGITS COMPUTATION. Jurnal Pilar Nusa Mandiri, 18(2), 93-100. https://doi.org/10.33480/pilar.v18i2.3291
Article Metrics

Abstract viewed = 364 times
PDF downloaded = 328 times