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

Controlling loops in parallel mercury code

Authors Info & Claims
Published:28 January 2012Publication History

ABSTRACT

Recently we built a system that uses profiling data to automatically parallelize Mercury programs by finding conjunctions with expensive conjuncts that can run in parallel with minimal synchronization delays. This worked very well in many cases, but in cases of tail recursion, we got much lower speedups than we expected, due to excessive memory usage. In this paper, we present a novel program transformation that eliminates this problem, and also allows recursive calls inside parallel conjunctions to take advantage of tail recursion optimization. Our benchmark results show that our new transformation greatly increases the speedups we can get from parallel Mercury programs; in one case, it changes no speedup into almost perfect speedup on four cores.

References

  1. Johan Bevemyr, Thomas Lindgren, and Håkan Millroth. Reform Prolog: the language and its implementation. In In Proc. of the 10th Int'l Conference on Logic Programming, pages 283--298. MIT Press, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Paul Bone, Zoltan Somogyi, and Peter Schachte. Estimating the overlap between dependent computations for automatic parallelization. Theory and Practice of Logic Programming, 11(4--5):575--591, 2011.Google ScholarGoogle Scholar
  3. John T. Feo, David C. Cann, and Rodney R. Oldehoeeft. A report on the Sisal language project. Journal of Parallel and Disributed Computing, 10:349--366, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Gopal Gupta and p Enrico Pontelli. Optimization schemas for parallel implementation of non-deterministic languages and systems. Software: Practice and Experience, 31(12):1143--1181, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Robert H Halstead. Implementation of Multilisp: Lisp on a multiprocessor. In Proceedings of the 1984 ACM Symposium on List and Functional Programming, pages 9--17, Austin, Texas, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. Lopez, M. Hermenegildo, and S. Debray. A methodology for granularity-based control of parallelism in logic programs. Journal of Symbolic Computation, 22(4):715--734, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Simon Marlow, Simon Peyton Jones, and Satnam Singh. Runtime support for multicore Haskell. SIGPLAN Notices, 44(9):65--78, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Peter Wang and Zoltan Somogyi. Minimizing the overheads of dependent AND-parallelism. In Proceedings of the 27th International Conference on Logic Programming, Lexington, Kentucky, 2011.Google ScholarGoogle Scholar

Index Terms

  1. Controlling loops in parallel mercury code

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      DAMP '12: Proceedings of the 7th workshop on Declarative aspects and applications of multicore programming
      January 2012
      62 pages
      ISBN:9781450311175
      DOI:10.1145/2103736
      • General Chair:
      • Umut Acar,
      • Program Chair:
      • Vítor Santos Costa

      Copyright © 2012 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 28 January 2012

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Upcoming Conference

      POPL '25

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader