Author(s): Peter Pirkelbauer, Chunhua Liao, Thomas Panas, Dan Quinlan
Unified Parallel C (UPC) extends the C programming language (ISO C 99) with explicit parallel programming support for the parti- tioned global address space (PGAS), which provides a global mem- ory space with localized partitions to each thread. Like its ancestor C, UPC is a low-level language that emphasizes code efficiency. The absence of dynamic (and static) safety checks allows program- mer oversights and software flaws that can be hard to spot. In this paper, we present an extension of a dynamic analysis tool, ROSE-Code Instrumentation and Runtime Monitor (ROSE- CIRM), for UPC to help programmers find C-style errors involving the global address space. Built on top of the ROSE source-to- source compiler infrastructure, the tool instruments source files with code that monitors operations and keeps track of changes to the system state. The resulting code is linked to a runtime monitor that observes the program execution and finds software defects. We describe the extensions to ROSE-CIRM that were necessary to support UPC. We discuss complications that arise from parallel code and our solutions. We test ROSE-CIRM against a runtime error detection test suite, and present performance results obtained from running error-free codes. ROSE-CIRM is released as part of the ROSE compiler under a BSD-style open source license.