Asee peer logo

Performance Comparisons for Python Libraries in Parallel Computing and Physical Simulation

Download Paper |

Conference

2022 ASEE Gulf Southwest Annual Conference

Location

Prairie View, Texas

Publication Date

March 16, 2022

Start Date

March 16, 2022

End Date

March 18, 2022

Page Count

10

DOI

10.18260/1-2--39194

Permanent URL

https://peer.asee.org/39194

Download Count

1093

Request a correction

Paper Authors

author page

Olubunmi Gregory Adekanmbi Prairie View A&M University

Download Paper |

Abstract

Performance Comparisons for Python Libraries in Parallel Computing and Physical Simulation

Olubunmi Adekanmbi, Lei Huang Computer Science Department Prairie View A&M University Abstract

Physical simulation today requires fast and efficient parallel computing to achieve the accuracy and performance. At the core of physical simulation lies the tools and frameworks that are driving it, from programming language, compilation, algorithms and high-performance computing. Python is a high-level programming language of choice favored by many developers and researchers since it is very productive. However, Python is hard to achieve high performance due to its interpreted mode and its internal global interpreter lock (GIL).

There are different Python parallel libraries that are available today with the main aim of ensuring Python codes run faster in parallel to break the GIL, which is essential to promote Python as a high-performance programming language. With the new Python parallel libraries, physical simulations can be executed successfully on GPUs and multicores. Taichi, Numpy and Numba are Python libraries designed for high-performance numerical computing and machine learning. In this paper we introduce these Python libraries / frameworks and use them to implement several physical simulations. We evaluate the performance of these libraries and discuss the advantages and disadvantages in physical simulations.

To accomplish the research, we choose Taichi, Numpy and Numba to start with because they were specifically designed for high performance computing. For us to thoroughly compare these libraries we must first define sample physical simulations, understand the physics behind the simulations and implement them using these libraries i.e., have same simulation written with Taichi, Numpy and Numba. The simulations we are implementing is the N-body problem. The work will provide an informed decision on which of the libraries to adopt for both simulations and machine learning applications. We believe with these comparisons and having identified the advantages and disadvantages; we can proceed to creating functional programs/instructions.

Adekanmbi, O. G. (2022, March), Performance Comparisons for Python Libraries in Parallel Computing and Physical Simulation Paper presented at 2022 ASEE Gulf Southwest Annual Conference, Prairie View, Texas. 10.18260/1-2--39194

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2022 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015