Advertisement

FooPar: A Functional Object Oriented Parallel Framework in Scala

  • Felix Palludan Hargreaves
  • Daniel Merkle
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8385)

Abstract

We present FooPar, an extension for highly efficient Parallel Computing in the multi-paradigm programming language Scala. Scala offers concise and clean syntax and integrates functional programming features. Our framework FooPar combines these features with parallel computing techniques. FooPar is designed to be modular and supports easy access to different communication backends for distributed memory architectures as well as high performance math libraries. In this article we use it to parallelize matrix-matrix multiplication and show its scalability by a isoefficiency analysis. In addition, results based on a empirical analysis on two supercomputers are given. We achieve close-to-optimal performance wrt. theoretical peak performance. Based on this result we conclude that FooPar allows programmers to fully access Scalas design features without suffering from performance drops when compared to implementations purely based on C and MPI.

Keywords

Functional programming Isoefficiency Matrix multiplication 

Notes

Acknowledgments

We acknowledge the support of the Danish Council for Independent Research, the Innovation Center Denmark, the Lawrence Berkeley National Laboratory, and the Scientific Discovery through Advanced Computing (SciDAC) Outreach Center. We thank Jakob L. Andersen for supplying a template C-implementation of the DNS algorithm.

References

  1. 1.
    Scala in the enterprise. Ecole Polytechnique Federale de Lausanne (EPFL). http://www.scala-lang.org/node/1658 (2013). Accessed 4 May 2013
  2. 2.
    Abeles, P.: Java-Matrix-Benchmark - a benchmark for computational efficiency, memory usage and stability of Java matrix libraries. http://code.google.com/p/java-matrix-benchmark/ (2013). Accessed 12 Feb 2013
  3. 3.
    Bosque, J.L., Robles, O.D., Toharia, P., Pastor, L.: H-Isoefficiency: scalability metric for heterogenous systems. In: Proceedings of the 10th International Conference of Computational and Mathematical Methods in Science and Engineering (CEMMSE 2010), pp. 240–250 (2010)Google Scholar
  4. 4.
    Darema, F.: The SPMD model: past, present and future. In: Cotronis, Y., Dongarra, J. (eds.) EuroPVM/MPI 2001. LNCS, vol. 2131, p. 1. Springer, Heidelberg (2001)Google Scholar
  5. 5.
    Dekel, E., Nassimi, D., Sahni, S.: Parallel matrix and graph algorithms. SIAM J. Comput. 10(4), 657–675 (1981)CrossRefzbMATHMathSciNetGoogle Scholar
  6. 6.
    Gabriel, E., Fagg, G.E., Bosilca, G., Angskun, T., Dongarra, J.J., Squyres, J.M., Sahay, V., Kambadur, P., Barrett, B., Lumsdaine, A., Castain, R.H., Daniel, D.J., Graham, R.L., Woodall, T.S.: Open MPI: Goals, concept, and design of a next generation MPI implementation. In: Proceedings of the 11th European PVM/MPI Users’ Group Meeting, pp. 97–104 (2004)Google Scholar
  7. 7.
    Grama, A., Gupta, A., Kumar, V.: Isoefficiency: measuring the scalability of parallel algorithms and architectures. IEEE Parallel Distrib. Technol. Syst. Appl. 1(3), 12–21 (1993)CrossRefGoogle Scholar
  8. 8.
    Grama, A., Karypis, G., Kumar, V., Gupta, A.: Introduction to Parallel Computing. Addison Wesley, Reading (2003)Google Scholar
  9. 9.
    Gupta, A., Kumar, V.: Scalability of parallel algorithms for matrix multiplication. In: Proceedings of the 22nd International Conference on Parallel Processing, ICPP, vol. 3, pp. 115–123 (1993)Google Scholar
  10. 10.
    Hundt, R.: Loop recognition in C++/Java/Go/Scala. In: Proceedings of Scala Days (2011)Google Scholar
  11. 11.
    Hwang, K., Xu, Z.: Scalable Parallel Computing. McGraw-Hill, New York (1998)zbMATHGoogle Scholar
  12. 12.
    Kumar, V., Rao, V.N.: Parallel depth first search, part II: analysis. Int. J. Parallel Prog. 16(6), 501–519 (1987)CrossRefzbMATHMathSciNetGoogle Scholar
  13. 13.
    Loogen, R., Ortega-Mallén, Y., Peña, R.: Parallel functional programming in Eden. J. Funct. Program. 15, 431–475 (2005)CrossRefzbMATHGoogle Scholar
  14. 14.
    Odersky, M.: The Scala language specification (2011)Google Scholar
  15. 15.
    Odersky, M., Moors, A.: Fighting bit rot with types (experience report: Scala collections). In: Proceedings of the 29th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2009), vol. 4 of Leibniz International Proceedings in Informatics, pp. 427–451 (2009)Google Scholar
  16. 16.
    Odersky, M., Spoon, L., Venners, B.: Programming in Scala. Artima, New York (2010)Google Scholar
  17. 17.
    Quinn, M.J.: Parallel Programming in C with MPI and OpenMP. McGraw-Hill, Blacklick (2003)Google Scholar
  18. 18.
    Shafi, A., Manzoor, J.: Towards efficient shared memory communications in MPJ express. In: Proceedings of the 25th IEEE International Symposium on Parallel Distributed Processing 2009 (IPDPS), pp. 1–7 (2009)Google Scholar
  19. 19.
    Taboada, G.L., Touriño, J., Doallo, R.: F-MPJ: scalable Java message-passing communications on parallel systems. J. Supercomput. 1, 117–140 (2012)CrossRefGoogle Scholar
  20. 20.
    Thompson, S.J., Wadler, P.: Functional programming in education - introduction. J. Funct. Program. 3(1), 3–4 (1993)CrossRefGoogle Scholar
  21. 21.
    Zaharia, M., Chowdhury, N.M.M., Franklin, M., Shenker, S., Stoica, I.: Spark: cluster computing with working sets. Technical Report UCB/EECS-2010-53, EECS Department, University of California, Berkeley (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  1. 1.Department of Mathematics and Computer ScienceUniversity of Southern DenmarkOdenseDenmark

Personalised recommendations