skip to main content
10.1145/1708046.1708052acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

PASTHA: parallelizing stencil calculations in Haskell

Published: 19 January 2010 Publication History

Abstract

Stencils are typical building blocks for many numerical scientific applications. Different parallelization methods exist, the choice of a method depends on the given stencil, parallel programming system etc. Implementing stencils in a library simplifies application programming, allows to experiment with different parallelization methods, and supports their automatic adaptation to a given stencil. This paper introduces PASTHA, a prototype for a Haskell library that allows to declaratively describe stencil-based problems and calculate them in parallel. The description is flexible enough to cover all 2D stencils we are aware of. Implementation is based on task queues and strict evaluation. We report on experiments with a Gauß-Seidel stencil, where we achieved speedups of up to 4 on six cores, and with global and local sequence scoring from the Haskell bioinformatics library bio. For local scoring, the running time was reduced by a factor of 55, which is partially due to PASTHA.

References

[1]
bio: a bioinformatics library for haskell. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bio.
[2]
Eric Allen, David Chase, Joe Hallett, Victor Luchangco, Jan-Willem Maessen, Sukyoung Ryu, Guy L. Steele Jr., and Sam Tobin-Hochstadt. The Fortress Language Specification. 2007. URL http://research.sun.com/projects/plrg/Publications/fortress1.0beta.pdf.
[3]
Krste Asanovic, Ras Bodik, James Demmel, Tony Keaveny, Kurt Keutzer, John D. Kubiatowicz, Edward A. Lee, Nelson Morgan, George Necula, David A. Patterson, Koushik Sen, John Wawrzynek, David Wessel, and Katherine A. Yelick. The parallel computing laboratory at u.c. berkeley: A research agenda based on the berkeley view. Technical Report UCB/EECS-2008-23, EECS Department, University of California, Berkeley, Mar 2008. URL http://www.eecs.berkeley.edu/Pubs/TechRpts/2008/EECS-2008-23.html.
[4]
R.F. Barret, P.C. Roth, and S.W. Poole. Finite difference stencils implemented using chapel. Technical Report TM-2007/119, 2007.
[5]
B.L. Chamberlain, D. Callahan, and H.P. Zima. Parallel programmability and the chapel language. Int. J. High Perform. Comput. Appl., 21 (3): 291--312, 2007. ISSN 1094-3420. http://dx.doi.org/10.1177/1094342007078442.
[6]
L. Dagum and R. Menon. Openmp: an industry standard api for shared-memory programming. Computational Science & Engineering, IEEE, 5 (1): 46--55, 1998. ISSN 1070-9924. 10.1109/99.660313. URL http://dx.doi.org/10.1109/99.660313.
[7]
Kaushik Datta, Mark Murphy, Vasily Volkov, Samuel Williams, Jonathan Carter, Leonid Oliker, David Patterson, John Shalf, and Katherine Yelick. Stencil computation optimization and auto-tuning on state-of-the-art multicore architectures. pages 1--12, 2008.
[8]
Zhihua Du, Zhen Ji, and Feng Lin. Parallel computing for optimal genomic sequence alignment. pages 532--535, 2006.
[9]
Hikmet Dursun, Ken-Ichi Nomura, Liu Peng, Richard Seymour, Weiqiang Wang, Rajiv K. Kalia, Aiichiro Nakano, and Priya Vashishta. A multilevel parallelization framework for high-order stencil computations. pages 642--653, 2009. http://dx.doi.org/10.1007/978-3-642-03869-3_61.
[10]
Jens Gerlach and Mitsuhisa Sato. Generic programming for parallel mesh problems. In ISCOPE, pages 108--119, 1999.
[11]
Jens Gerlach, Peter Gottschling, and Uwe Der. A generic c framework for parallel mesh-based scientific applications. In HIPS, pages 45--54, 2001.
[12]
Jens Gerlach, Zheng-Yu Jiang, and Hans Werner Pohl. Integrating openmp into janus. pages 101--114, 2001
[13]
Don Jones, Simon Marlow, and Satnam Singh. Parallel performance tuning for haskell. In Haskell '09: Proceedings of the second ACM SIGPLAN symposium on Haskell. ACM, 2009. URL http://www.haskell.org/simonmar/papers/threadscope.pdf.
[14]
John F. Karpovich, Matthew Judd, W. Timothy Strayer, and Andrew S. Grimshaw. A parallel object-oriented framework for stencil algorithms. In HPDC, pages 34--41, 1993.
[15]
Simon Marlow, Simon Peyton Jones, and Satnam Singh. Runtime support for multicore haskell. pages 65--78, 2009. http://doi.acm.org/10.1145/1596550.1596563.
[16]
Gregory F. Pfister. In search of clusters: the coming battle in lowly parallel computing. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1998. ISBN 0-13-437625-0.
[17]
Marc Snir and Steve Otto. Mpi-the complete reference: The mpi core, 1998.
[18]
Gregory V. Wilson. Parallel Programming Using C. MIT Press, Cambridge, MA, USA, 1996. ISBN 0262731185. Foreword By-Stroustrup, Bjane.

Cited By

View all
  • (2021)Code Generation for Room Acoustics Simulations with Complex Boundary Conditions2021 IEEE International Parallel and Distributed Processing Symposium (IPDPS)10.1109/IPDPS49936.2021.00057(485-496)Online publication date: May-2021
  • (2019)Tiling Optimizations for Stencil Computations Using Rewrite Rules in LiftACM Transactions on Architecture and Code Optimization10.1145/336885816:4(1-25)Online publication date: 26-Dec-2019
  • (2018)High performance stencil code generation with LiftProceedings of the 2018 International Symposium on Code Generation and Optimization - CGO 201810.1145/3179541.3168824(100-112)Online publication date: 2018
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
DAMP '10: Proceedings of the 5th ACM SIGPLAN workshop on Declarative aspects of multicore programming
January 2010
90 pages
ISBN:9781605588599
DOI:10.1145/1708046
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 January 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. haskell
  2. sequence scoring
  3. stencil

Qualifiers

  • Research-article

Conference

POPL '10
Sponsor:

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 25 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2021)Code Generation for Room Acoustics Simulations with Complex Boundary Conditions2021 IEEE International Parallel and Distributed Processing Symposium (IPDPS)10.1109/IPDPS49936.2021.00057(485-496)Online publication date: May-2021
  • (2019)Tiling Optimizations for Stencil Computations Using Rewrite Rules in LiftACM Transactions on Architecture and Code Optimization10.1145/336885816:4(1-25)Online publication date: 26-Dec-2019
  • (2018)High performance stencil code generation with LiftProceedings of the 2018 International Symposium on Code Generation and Optimization - CGO 201810.1145/3179541.3168824(100-112)Online publication date: 2018
  • (2018)High performance stencil code generation with LiftProceedings of the 2018 International Symposium on Code Generation and Optimization10.1145/3168824(100-112)Online publication date: 24-Feb-2018
  • (2017)The Importance of Efficient Fine-Grain Synchronization for Many-Core SystemsLanguages and Compilers for Parallel Computing10.1007/978-3-319-52709-3_16(203-217)Online publication date: 24-Jan-2017
  • (2013)Parallelization of Shallow-water Equations with the Algorithmic Skeleton Library SkelGISProcedia Computer Science10.1016/j.procs.2013.05.22318(591-600)Online publication date: 2013
  • (2011)Efficient and Correct Stencil Computation via Pattern Matching and Static TypingElectronic Proceedings in Theoretical Computer Science10.4204/EPTCS.66.466(68-92)Online publication date: 1-Sep-2011
  • (2011)Efficient parallel stencil convolution in HaskellACM SIGPLAN Notices10.1145/2096148.203468446:12(59-70)Online publication date: 22-Sep-2011
  • (2011)Efficient parallel stencil convolution in HaskellProceedings of the 4th ACM symposium on Haskell10.1145/2034675.2034684(59-70)Online publication date: 22-Sep-2011
  • (2011)Computing without ProcessorsQueue10.1145/1989748.20005169:6(50-63)Online publication date: 27-Jun-2011
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media