Skip to main content

Iterating Skeletons

Structured Parallelism by Composition

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8241))

Abstract

Algorithmic skeletons are higher-order functions which provide tools for parallel programming at a higher abstraction level, hiding the technical details of parallel execution inside the skeleton implementation. However, this encapsulation becomes an obstacle when the actual algorithm is one that involves iterative application of the same skeleton to successively improve or approximate the result. Striving for a general and portable solution, we propose a skeleton iteration framework in which arbitrary skeletons can be embedded with only minor modifications. The framework is flexible and allows for various parallel iteration control and parallel iteration body variants. We have implemented it in the parallel Haskell dialect Eden using dedicated stream communication types for the iteration. Two non-trivial case studies show the practicality of our approach. The performance of our compositional iteration framework is competitive with customised iteration skeletons.

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

Buying options

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   72.00
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

Learn about institutional subscriptions

Notes

  1. 1.

    Skeleton iteration should not be confused with parallel for-loops or parallel map, where a sequential block is executed in parallel by multiple threads, instead of several times. We focus on computations defined by algorithmic skeletons which are by themselves already parallel and will be executed several times in sequence.

  2. 2.

    The original Eden definition specifies that top-level lists are communicated as streams. In this work, we use a modified Trans class which gives programmers more control of streaming through separate stream types.

  3. 3.

    The superscripts in our types are merely annotations to indicate implicit constraints on the list lengths. Fixed sized lists could however be implemented e.g. using the recent Haskell library Vec, see http://hackage.haskell.org/package/Vec

  4. 4.

    Eden supports explicit placement of computations in a multi-node parallel system. We have omitted placement aspects from our code for simplicity throughout.

  5. 5.

    Similar to whileControl, but forwards the initial input directly to the iteration body, thus doing at least one iteration before termination.

References

  1. Berthold, J., Dieterle, M., Loogen, R.: Implementing parallel google map-reduce in Eden. In: Sips, H., Epema, D., Lin, H.-X. (eds.) Euro-Par 2009. LNCS, vol. 5704, pp. 990–1002. Springer, Heidelberg (2009)

    Google Scholar 

  2. Bu, Y., Howe, B., Balazinska, M., Ernst, M.D.: The HaLoop approach to large-scale iterative data analysis. VLDB J. 21(2), 169–190 (2012)

    Article  Google Scholar 

  3. Bird, R.S.: Using circular programs to eliminate multiple traversals of data. Acta Inform. 21, 239–250 (1984)

    Article  MATH  Google Scholar 

  4. Cole, M.: Algorithmic Skeletons: Structured Management of Parallel Computation. MIT Press, Cambridge (1989)

    MATH  Google Scholar 

  5. Dean, J., Ghemawat, S.: Mapreduce: simplified data processing on large clusters. CACM 51(1), 107–113 (2008)

    Article  Google Scholar 

  6. Dieterle, M., Horstmeyer, T., Loogen, R.: Skeleton composition using remote data. In: Carro, M., Peña, R. (eds.) PADL 2010. LNCS, vol. 5937, pp. 73–87. Springer, Heidelberg (2010)

    Google Scholar 

  7. Ekanayake, J., Li, H., Zhang, B., Gunarathne, Th., Bae, S., Qiu, J., Fox, G.: Twister: a runtime for iterative mapreduce. In: HPDC ’10. ACM (2010)

    Google Scholar 

  8. Ewen, St, Tzoumas, K., Kaufmann, M., Markl, V.: Spinning fast iterative data flows. PVLDB 5(11), 1268–1279 (2012)

    Google Scholar 

  9. Loogen, R., Ortega-Mallén, Y., Peña-Marí, R.: Parallel functional programming in Eden. J. Funct. Program. 15(3), 431–475 (2005)

    Article  MATH  Google Scholar 

  10. Loogen, R.: Eden – parallel functional programming with Haskell. In: Zsók, V., Horváth, Z., Plasmeijer, R. (eds.) CEFP. LNCS, vol. 7241, pp. 142–206. Springer, Heidelberg (2012)

    Google Scholar 

  11. Leyton, M., Piquer, J.M.: Skandium: multi-core programming with algorithmic skeletons. In: PDP. IEEE Computer Society (2010)

    Google Scholar 

  12. MacKay, D.: Information Theory, Inference, and Learning Algorithms. Cambridge University Press, Cambridge (2003). See chapter 20, p. 284ff

    MATH  Google Scholar 

  13. Peña, R., Rubio, F.: Parallel functional programming at two levels of abstraction. In: PPDP’01, pp. 187–198. ACM (2001)

    Google Scholar 

  14. Zhang, Y., Gao, Q., Gao, L., Wang, C.: iMapReduce: a distributed computing framework for iterative computation. JOGC 10, 47–68 (2012)

    Google Scholar 

Download references

Acknowledgements

The authors thank the anonymous referees for their helpful comments on a previous version of this paper. Jost Berthold was partially supported by DSF under contract number 10-092299 (Hiperfit).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mischa Dieterle .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Dieterle, M., Horstmeyer, T., Berthold, J., Loogen, R. (2013). Iterating Skeletons. In: Hinze, R. (eds) Implementation and Application of Functional Languages. IFL 2012. Lecture Notes in Computer Science(), vol 8241. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41582-1_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-41582-1_2

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-41581-4

  • Online ISBN: 978-3-642-41582-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics