Efficiently detecting races in Cilk programs that use reducer hyperobjects

  • I. Ting Angelina Lee
  • , Tao B. Schardl

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

14 Scopus citations

Abstract

A multithreaded Cilk program that is ostensibly deterministic may nevertheless behave nondeterministically due to programming errors in the code. For a Cilk program that uses reducers, a general reduction mechanism supported in various Cilk dialects, such programming errors are especially challenging to debug, because the errors can expose the nondeterminism in how the Cilk runtime system manages a reducer. We identify two unique types of races that arise from incorrect use of reducers in a Cilk program and present two algorithms to catch them. The first algorithm, called the Peer-Set algorithm, detects view-read races, which occur when the program attempts to retrieve a value out of a reducer when the read may result a nondeterministic value, such as before all previously spawned subcomputations that might update the reducer have necessarily returned. The second algorithm, called the SP+ algorithm, detects determinacy races, instances where a write to a memory location occurs logically in parallel with another access to that location, even when the raced-on memory locations relate to reducers. Both algorithms are provably correct, asymptotically efficient, and can be implemented efficiently in practice. We have implemented both algorithms in our prototype race detector, Rader. When running Peer-Set, Rader incurs a geometric-mean multiplicative overhead of 2.32 over running the benchmark without instrumentation. When running SP+, Rader incurs a geometric-mean multiplicative overhead of 16.76.

Original languageEnglish
Title of host publicationSPAA 2015 - Proceedings of the 27th ACM Symposium on Parallelism in Algorithms and Architectures
PublisherAssociation for Computing Machinery
Pages111-122
Number of pages12
ISBN (Electronic)9781450335881
DOIs
StatePublished - Jun 13 2015
Event27th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2015 - Portland, United States
Duration: Jun 13 2015Jun 15 2015

Publication series

NameAnnual ACM Symposium on Parallelism in Algorithms and Architectures
Volume2015-June

Conference

Conference27th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2015
Country/TerritoryUnited States
CityPortland
Period06/13/1506/15/15

Keywords

  • Cilk
  • Determinacy race
  • Nondeterminism
  • Reducers
  • View-read race

Fingerprint

Dive into the research topics of 'Efficiently detecting races in Cilk programs that use reducer hyperobjects'. Together they form a unique fingerprint.

Cite this