Skip to main content

Taming Multi-node Accelerated Analytics: An Experience in Porting MATLAB to Scale with Python

  • Conference paper
  • First Online:
Complex, Intelligent and Software Intensive Systems (CISIS 2022)

Abstract

High Performance Data Analytics (HPDA) at scale is a multifaceted problem that involves distributed computing resources, their location with respect to the data placement, fast networks, optimized I/O, hardware accelerators and a fairly complex software stack that draws both from the legacy of HPC and the cloud world. This complexity does not cope well with the needs of domain experts who desire to focus on their algorithms without having to understand all the features of the underlying infrastructure. Among these domain experts, engineers often rely on MATLAB to quickly model their complex numerical computations with a simple, textbook-like syntax and an effective Integrated Development Environment (IDE). On the other end, MATLAB was not designed with large-scale, out-of-core computations in mind, despite the introduction of some parallel computing tools (e.g., distributed arrays and spmd loops). In an ideal world, a domain expert should only focus on its application logic, while runtime/parallel computing experts should provide tools that act behind the scenes to efficiently distribute the computations on available resources and to provide optimal performance. Conversely, in real life it often happens that the domain expert prototypes its code with MATLAB on a small scale, then HPDA/HPC experts will leverage proper tools to deploy it at scale; this causes a significant effort overhead, as development needs to be performed twice, possibly with multiple iterations. The rise of Python as the language of choice for a huge number of data scientists, along with its open ecosystem, led to the development of many tools that tried to achieve a convergence between the goals of domain experts and the need for performance and scalability. Sometimes building upon existing frameworks (e.g. PySpark) or starting from scratch in pure Python (e.g. Dask), these tools bear promise to allow engineers to write their code with a reasonably textbook-like syntax, while retaining the capability to scale among multiple nodes (and accelerators) with minimal intervention to the application code. This paper discusses the process of porting an engineering application written in MATLAB (parallelized with existing toolboxes) to Python using Dask. An indication of the scalability results is also given, including a 20x speedup with respect to the MATLAB code using the same setup.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 259.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 329.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

Similar content being viewed by others

Notes

  1. 1.

    https://www.hdfgroup.org/solutions/hdf5/.

  2. 2.

    https://www.hpc.cineca.it/hardware/galileo100.

  3. 3.

    https://slurm.schedmd.com.

  4. 4.

    https://jobqueue.dask.org/en/latest/.

  5. 5.

    https://parquet.apache.org.

References

  1. Anderson, E., et al.: LAPACK Users’ Guide, 3rd edn. Society for Industrial and Applied Mathematics, Philadelphia, PA (1999)

    Book  Google Scholar 

  2. Dalcín, L., Paz, R., Storti, M.: MPI for python. J. Parallel Distrib. Comput. 65(9), 1108–1115 (2005). https://doi.org/10.1016/j.jpdc.2005.03.010

    Article  Google Scholar 

  3. Dask Development Team: Dask: Library for dynamic task scheduling (2016). https://dask.org

  4. Dongarra, J., Du Croz, J., Hammarling, S., Hanson, R.J.: An extended set of FORTRAN basic linear algebra subprograms. ACM Trans. Math. Softw. 14(1), 1–17 (1988). https://doi.org/10.1145/42288.42291

    Article  MATH  Google Scholar 

  5. Golub, G.H., Van Loan, C.F.: Matrix Computations, 3rd edn. Johns Hopkins University Press, Baltimore, MD, USA (1996)

    MATH  Google Scholar 

  6. Harris, C.R., et al.: Array programming with NumPy. Nature 585(7825), 357–362 (2020). https://doi.org/10.1038/s41586-020-2649-2

  7. MARS development team: MARS. https://docs.pymars.org/en/latest/

  8. McKinney, W.: Data structures for statistical computing in python. In: Van Der Walt,S., Millman, J. (eds.) Proceedings of the 9th Python in Science Conference, pp. 56–61 (2010). https://doi.org/10.25080/Majora-92bf1922-00a

  9. Meng, X., et al.: MLlib: machine learning in apache spark. J. Mach. Learn. Res. 17(1), 1235–1241 (2016)

    MathSciNet  MATH  Google Scholar 

  10. Moritz, P., et al.: Ray: a distributed framework for emerging AI applications. In: Proceedings of the 13th USENIX Conference on Operating Systems Design and Implementation, OSDI 2018, pp. 561–577. USENIX Association, USA (2018)

    Google Scholar 

  11. Rocklin, M.: Dask: parallel computation with blocked algorithms and task scheduling. In: Huff, K., Bergstra, J. (eds.) Proceedings of the 14th Python in Science Conference, pp. 130 – 136 (2015)

    Google Scholar 

  12. Sergeev, A., Balso, M.D.: Horovod: fast and easy distributed deep learning in TensorFlow. arXiv preprint arXiv:1802.05799 (2018)

  13. Smagorinsky, J.: General circulation experiments with the primitive equations: I. the basic experiment. Monthly Weather Rev. 91(3), 99–164 (1963). https://doi.org/10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2

  14. Tejedor, E., et al.: PyCOMPSs: parallel computational workflows in python. Int. J. High Perform. Comput. Appl. 31(1), 66–82 (2017). https://doi.org/10.1177/1094342015594678

    Article  Google Scholar 

  15. The pandas development team: pandas-dev/pandas: Pandas (2020). https://doi.org/10.5281/zenodo.3509134

  16. Viviani, P., Drocco, M., Aldinucci, M.: Scaling dense linear algebra on multicore and beyond: a survey. In: Proceedings of the 26th Euromicro International Conference on Parallel Distributed and Network-based Processing (PDP). IEEE, Cambridge, United Kingdom (2018)

    Google Scholar 

  17. Zaharia, M., et al.: Apache spark: a unified engine for big data processing. Commun. ACM 59(11), 56–65 (2016). https://doi.org/10.1145/2934664

    Article  Google Scholar 

Download references

Acknowledgements

This work has been supported by the EuroHPC-02-2019 ACROSS project, grant agreement No. 955648 and by PRACE, which awarded access to the Fenix Infrastructure resources at CINECA, partially funded from the European Union’s Horizon 2020 research and innovation programme through the ICEI project under the grant agreement No. 800858.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Paolo Viviani .

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

Viviani, P., Vitali, G., Lengani, D., Scionti, A., Vercellino, C., Terzo, O. (2022). Taming Multi-node Accelerated Analytics: An Experience in Porting MATLAB to Scale with Python. In: Barolli, L. (eds) Complex, Intelligent and Software Intensive Systems. CISIS 2022. Lecture Notes in Networks and Systems, vol 497. Springer, Cham. https://doi.org/10.1007/978-3-031-08812-4_20

Download citation

Publish with us

Policies and ethics