Comparing the Performance of Julia on CPUs versus GPUs and Julia-MPI versus Fortran-MPI: a case study with MPAS-Ocean (Version 7.1)
-
Published:2023-10-05
Issue:19
Volume:16
Page:5539-5559
-
ISSN:1991-9603
-
Container-title:Geoscientific Model Development
-
language:en
-
Short-container-title:Geosci. Model Dev.
Author:
Bishnu SiddharthaORCID, Strauss Robert R.ORCID, Petersen Mark R.ORCID
Abstract
Abstract. Some programming languages are easy to develop at the cost of slow execution, while others are fast at runtime but much more difficult to write. Julia is a programming language that aims to be the best of both worlds – a development and production language at the same time. To test Julia's utility in scientific high-performance computing (HPC), we built an unstructured-mesh shallow water model in Julia and compared it against an established Fortran-MPI ocean model, the Model for Prediction Across Scales–Ocean (MPAS-Ocean), as well as a Python shallow water code. Three versions of the Julia shallow water code were created: for single-core CPU, graphics processing unit (GPU), and Message Passing Interface (MPI) CPU clusters. Comparing identical simulations revealed that our first version of the Julia model was 13 times faster than Python using NumPy, where both used an unthreaded single-core CPU. Further Julia optimizations, including static typing and removing implicit memory allocations, provided an additional 10–20× speed-up of the single-core CPU Julia model. The GPU-accelerated Julia code was almost identical in terms of performance to the MPI parallelized code on 64 processes, an unexpected result for such different architectures. Parallelized Julia-MPI performance was identical to Fortran-MPI MPAS-Ocean for low processor counts and ranges from 2× faster to 2× slower for higher processor counts. Our experience is that Julia development is fast and convenient for prototyping but that Julia requires further investment and expertise to be competitive with compiled codes. We provide advice on Julia code optimization for HPC systems.
Funder
Biological and Environmental Research National Nuclear Security Administration National Energy Research Scientific Computing Center
Publisher
Copernicus GmbH
Reference37 articles.
1. Besard, T., Foket, C., and De Sutter, B.: Effective Extensible Programming:
Unleashing Julia on GPUs,
IEEE T. Parall. Distr., 30, 827–841, https://doi.org/10.1109/TPDS.2018.2872064, 2018. a 2. Besard, T., Churavy, V., Edelman, A., and De Sutter, B.: Rapid software
prototyping for heterogeneous and distributed platforms,
Adv. Eng. Softw., 132, 29–46, 2019. a 3. Bezanson, J., Edelman, A., Karpinski, S., and Shah, V. B.: Julia: A fresh
approach to numerical computing, SIAM Rev., 59, 65–98, 2017. a 4. Bishnu, S.: Time-Stepping Methods for Partial Differential Equations and Ocean
Models, Zenodo,
https://doi.org/10.5281/zenodo.7439539, 2021. a, b, c 5. Bishnu, S.: Rotating Shallow Water Verification Suite, Zenodo [code],
https://doi.org/10.5281/zenodo.7421135, 2022. a, b, c, d
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
|
|