Skip to main content

A Comparative Evaluation of Parallel Programming Python Tools for Particle-in-Cell on Symmetric Multiprocessors

  • Conference paper
  • First Online:
High Performance Computing (CARLA 2022)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1660))

Included in the following conference series:

  • 312 Accesses

Abstract

The Python programming language has established itself as a popular alternative for implementing scientific computing workflows. Its massive adoption across a wide spectrum of disciplines has created a strong community that develops tools for solving complex problems in science and engineering. In particular, there are several parallel programming libraries for Python codes that target multicore processors. We aim at comparing the performance and scalability of a subset of three popular libraries (Multiprocessing, PyMP, and Torcpy). We use the Particle-in-cell (PIC) method as a benchmark. This method is an attractive option for understanding physical phenomena, specially in plasma physics. A pre-existing PIC code implementation was modified to integrate Multiprocessing, PyMP, and Torcpy. The three tools were tested on a manycore and on a multicore processor by running different problem sizes. The results obtained consistently indicate that PyMP has the best performance, Multiprocessing showed a similar behavior but with longer execution times, and Torcpy did not properly scale when increasing the number of workers. Finally, a just-in-time (JIT) alternative was studied by using Numba, showing execution time reductions of up to 43%.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Adekanmbi, O.G.: Performance comparisons for Python libraries in parallel computing and physical simulation. In: 2022 ASEE Gulf Southwest Annual Conference. ASEE Conferences, Prairie View, Texas, March 2022. https://peer.asee.org/39194

  2. Blandón, J.S., Grisales, J.P., Riascos, H.: Electrostatic plasma simulation by particle-in-cell method using ANACONDA package. J. Phys. Conf. Ser. 850, 012007 (2017)

    Article  Google Scholar 

  3. Fink, Z., Liu, S., Choi, J., Diener, M., Kale, L.V.: Performance evaluation of Python parallel programming models: charm4Py and mpi4py (2021). https://doi.org/10.48550/ARXIV.2111.04872, https://arxiv.org/abs/2111.04872

  4. Galvez, J.J., Senthil, K., Kale, L.: CharmPy: a Python parallel programming model. In: 2018 IEEE International Conference on Cluster Computing (CLUSTER), pp. 423–433 (2018). https://doi.org/10.1109/CLUSTER.2018.00059

  5. Fehske, H., Schneider, R., Weiße, A.: Computational Many-Particle Physics. Springer, Cham (2008)

    Book  MATH  Google Scholar 

  6. (IBM) Integrated Baseboard Management Controller (iBMC) : torcpy: supporting task-based parallelism in Python (2019). https://github.com/IBM/torcpy

  7. Kadochnikov, I.: Accelerating the particle-in-cell method of plasma and particle beam simulation using CUDA tools. In: 27th International Symposium on Nuclear Electronics and Computing (NEC 2019) (2019)

    Google Scholar 

  8. Kim, T., Cha, Y., Shin, B., Cha, B.: Survey and performance test of python-based libraries for parallel processing. In: The 9th International Conference on Smart Media and Applications, SMA 2020, pp. 154–157. Association for Computing Machinery, New York (2020). https://doi.org/10.1145/3426020.3426057

  9. Lapenta, G.: Kinetic plasma simulation: particle in cell method

    Google Scholar 

  10. Lassner, C.: PyMP (2016). https://github.com/classner/pymp

  11. Meneses, G.C.S.E.: Parallel programming tools in Python

    Google Scholar 

  12. Miranda, E., Stephany, S.: Comparison of high-performance computing approaches in the python environment for a five-point stencil test problem. In: Anais do XV Brazilian e-Science Workshop, pp. 33–40. SBC, Porto Alegre, RS, Brasil (2021). https://doi.org/10.5753/bresci.2021.15786, https://sol.sbc.org.br/index.php/bresci/article/view/15786

  13. Pous, X.S.: Particle-in-cell algorithms for plasma simulations on heterogeneous architectures

    Google Scholar 

  14. Python: multiprocessing - process-based parallelism. https://docs.python.org/3/library/multiprocessing.html

  15. Rao, V.R.: Here’s why you should use Python for scientific research (2018). https://developer.ibm.com/blogs/use-python-for-scientific-research/

  16. Stańczak, D.: Implementation and performance analysis of particle-in-cell simulation software in Python (2017)

    Google Scholar 

  17. Top500: Top500 list. Top500 (2022). https://www.top500.org/

  18. Zetcode: Zetcode. https://zetcode.com/python/multiprocessing/

Download references

Acknowledgments

This research was partially supported by a machine allocation on Kabré supercomputer at the Costa Rica National High Technology Center.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Oscar Blandino H. .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Blandino H., O., Meneses, E. (2022). A Comparative Evaluation of Parallel Programming Python Tools for Particle-in-Cell on Symmetric Multiprocessors. In: Navaux, P., Barrios H., C.J., Osthoff, C., Guerrero, G. (eds) High Performance Computing. CARLA 2022. Communications in Computer and Information Science, vol 1660. Springer, Cham. https://doi.org/10.1007/978-3-031-23821-5_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-23821-5_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-23820-8

  • Online ISBN: 978-3-031-23821-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics