UPC-SPIN : A Framework for the Model Checking of UPC Programs ∗

This paper presents a software framework for the model check ing of the inter-thread synchronization functionalities of Un ified Parallel C (UPC) programs. The proposed framework includes a fron tend compiler that generates finite models of UPC programs in t he modeling language of the SPIN model checker. The model gener ation is based on a set of abstraction rules that transform th e UPC synchronization primitives to semantically-equivalent c ode snippets in SPIN’s modeling language. The back-end includes SPI N that verifies the generated model. If the model checking succ eeds, then the UPC program is correct with respect to properties of interest such as data race-freedom and/or deadlock-freedom. Oth erwise, the back-end provides feedback as sequences of UPC instructions that lead to a data race or a deadlock from initial states , called counterexamples . Using the UPC-SPIN framework, we have detected design flaws in several real-world UPC applications, including a program simulating heat flow in metal rods, parallel bub ble sort, parallel data collection, and an integer permutation program. More importantly, for the first time (to the best of our knowle dg ), we have mechanically verified data race-freedom and deadloc kfreedom in a UPC implementation of the Conjugate Gradient (C G) kernel of the NAS Parallel Benchmarks (NPB). We believe that UPC-SPIN provides a valuable tool for developers towards in creasing their confidence in the computational results generated by UPC applications.

[1]  Yuanyuan Zhou,et al.  Learning from mistakes: a comprehensive study on real world concurrency bug characteristics , 2008, ASPLOS.

[2]  Stephan Merz,et al.  Model Checking , 2000 .

[3]  Phillip Merkey,et al.  Maximum weighted matching using the partitioned global address space model , 2009, SpringSim '09.

[4]  Kenneth L. McMillan,et al.  Symbolic model checking , 1992 .

[5]  John W. Backus,et al.  The syntax and semantics of the proposed international algebraic language of the Zurich ACM-GAMM Conference , 1959, IFIP Congress.

[6]  Gerard J. Holzmann,et al.  A practical method for verifying event-driven software , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[7]  Alex Groce,et al.  Swarm Verification , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[8]  Gerard J. Holzmann,et al.  The Model Checker SPIN , 1997, IEEE Trans. Software Eng..

[9]  Carl E. Landwehr,et al.  Basic concepts and taxonomy of dependable and secure computing , 2004, IEEE Transactions on Dependable and Secure Computing.

[10]  Ganesh Gopalakrishnan,et al.  Precise Dynamic Analysis for Slack Elasticity: Adding Buffering without Adding Bugs , 2010, EuroMPI.

[11]  Ümit V. Çatalyürek,et al.  A framework for scalable greedy coloring on distributed-memory parallel computers , 2008, J. Parallel Distributed Comput..

[12]  Gerard J. Holzmann,et al.  Logic Verification of ANSI-C Code with SPIN , 2000, SPIN.

[13]  Katherine Yelick,et al.  UPC Language Specifications V1.1.1 , 2003 .

[14]  Gerard J. Holzmann,et al.  An Automated Verification Method for Distributed Systems Software Based on Model Extraction , 2002, IEEE Trans. Software Eng..

[15]  Stephen F. Siegel Verifying Parallel Programs with MPI-Spin , 2007, PVM/MPI.

[16]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multi-threaded programs , 1997, TOCS.

[17]  Rajeev Thakur,et al.  Sound and Efficient Dynamic Verification of MPI Programs with Probe Non-determinism , 2009, PVM/MPI.

[18]  Ganesh Gopalakrishnan,et al.  Scheduling considerations for building dynamic verification tools for MPI , 2008, PADTAD '08.

[19]  AvizienisAlgirdas,et al.  Basic Concepts and Taxonomy of Dependable and Secure Computing , 2004 .

[20]  Stephen F. Siegel,et al.  Analyzing BlobFlow: A Case Study Using Model Checking to Verify Parallel Scientific Software , 2008, PVM/MPI.

[21]  Sébastien Tixeuil,et al.  A Self-stabilizing -Approximation Algorithm for the Maximum Matching Problem , 2008, SSS.

[22]  Stephen F. Siegel,et al.  Automatic formal verification of MPI-based parallel programs , 2011, PPoPP '11.

[23]  Tarek A. El-Ghazawi,et al.  UPC: unified parallel C , 2006, SC.