Static Analysis and Symbolic Execution for Deadlock Detection in MPI Programs

  • Craig C. Douglas
  • Krishanthan Krishnamoorthy
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10861)


Parallel computing using MPI has become ubiquitous on multi-node computing clusters. A common problem while developing parallel codes is determining whether or not a deadlock condition can exist. Ideally we do not want to have to run a large number of examples to find deadlock conditions through trial and error procedures. In this paper we describe a methodology using both static analysis and symbolic execution of a MPI program to make a determination when it is possible. We note that using static analysis by itself is insufficient for realistic cases. Symbolic execution has the possibility of creating a nearly infinite number of logic branches to investigate. We provide a mechanism to limit the number of branches to something computable. We also provide examples and pointers to software necessary to test MPI programs.



This research was supported in part by grants DMS-1722692, ACI-1541392, and ACI-1440610 from the National Science Foundation.


  1. 1.
    Aho, A.V., Ullman, J.D.: Principles of Compiler Design. Addison-Wesley, Boston (1977)zbMATHGoogle Scholar
  2. 2.
    Barrett, C., Sebastiani, R., Seshia, S., Tinelli, C.: Satisfiability modulo theories. In: Frontiers in Artificial Intelligence and Applications, vol. 185, pp. 825–885. IOS Press (2009)Google Scholar
  3. 3.
    Becker, B., Drechsler, R.: Binary Decision Diagrams: Theory and Implementation. Springer, Heidelberg (1998). Scholar
  4. 4.
    Biere, A., Cimatti, A., Clarke, E., Zhu, Y.: Symbolic model checking without BDDs. In: Cleaveland, W.R. (ed.) TACAS 1999. LNCS, vol. 1579, pp. 193–207. Springer, Heidelberg (1999). Scholar
  5. 5.
    Chou, C.N., Ho, Y.S., Hsieh, C., Huang, C.Y.: Symbolic model checking on systemc designs. In: DAC Design Automation Conference 2012, pp. 327–333. IEEE Press (2012)Google Scholar
  6. 6.
    Clarke, E.M., Grumberg, O., Long, D.E.: Model checking and abstraction. ACM Trans. Program. Lang. Syst. 16, 1512–1542 (1994)CrossRefGoogle Scholar
  7. 7.
    Elwakil, M., Yang, Z., Wang, L., Chen, Q.: Message race detection for web services by an SMT-based analysis. In: Xie, B., Branke, J., Sadjadi, S.M., Zhang, D., Zhou, X. (eds.) ATC 2010. LNCS, vol. 6407, pp. 182–194. Springer, Heidelberg (2010). Scholar
  8. 8.
    Gropp, W., Lusk, E.: Using MPI: Portable Parallel Programming with the Message-Passing Interface. Scientific and Engineering Computation, 3rd edn. MIT Press, Cambridge (2014)Google Scholar
  9. 9.
    Gupta, S., Pratap, P., Saran, H., Arun-Kumar, S.: Dynamic code instrumentation to detect and recover from return address corruption. In: Proceedings of the 2006 International Workshop on Dynamic Systems Analysis, WODA 2006, pp. 65–72. ACM, New York (2006)Google Scholar
  10. 10.
    Hilbrich, T., de Supinski, B.R., Schulz, M., Mueller, M.S.: A graph based approach for MPI deadlock detection. In: Proceedings of the 23rd International Conference on Supercomputing, ICS 2009, pp. 296–305. ACM, New York (2009)Google Scholar
  11. 11.
    Jhala, R., Majumdar, R.: Software model checking. ACM Comput. Surv. 41, Article ID 21 (2009)CrossRefGoogle Scholar
  12. 12.
    Jiang, B.: Deadlock detection is really cheap. ACM SIGMOD Rec. 17, 2–13 (1988)CrossRefGoogle Scholar
  13. 13.
    King, J.C.: A new approach to program testing. In: Hackl, C.E. (ed.) IBM 1974. LNCS, vol. 23, pp. 278–290. Springer, Heidelberg (1975). Scholar
  14. 14.
    Kitsuregawa, K.M., Tanaka, H.: Database Machines and Knowledge Base Machines. Springer, New York (1988). Scholar
  15. 15.
    Krishnamoorthy, K.: Detect Deadlock in MPI programs using static analysis and symbolic execution. Master’s thesis, University of Wyoming, Computer Science Department, Laramie, WY (2017)Google Scholar
  16. 16.
    Khurshid, S., Păsăreanu, C.S., Visser, W.: Generalized symbolic execution for model checking and testing. In: Garavel, H., Hatcliff, J. (eds.) TACAS 2003. LNCS, vol. 2619, pp. 553–568. Springer, Heidelberg (2003). Scholar
  17. 17. ROSE compiler. Accessed 3 Mar 2018
  18. 18.
    Turing, A.: On computable numbers, with an application to the entscheidungsproblem. Proc. Lond. Math. Soc. 42, 230–265 (1937)MathSciNetCrossRefGoogle Scholar
  19. 19.
    Wang, C., Yang, Y., Gupta, A., Gopalakrishnan, G.: Dynamic model checking with property driven pruning to detect race conditions. In: Cha, S.S., Choi, J.-Y., Kim, M., Lee, I., Viswanathan, M. (eds.) ATVA 2008. LNCS, vol. 5311, pp. 126–140. Springer, Heidelberg (2008). Scholar
  20. 20. The Yices SMT solver. Accessed 3 Mar 2018

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  1. 1.School of Energy Resources and Department of MathematicsUniversity of WyomingLaramieUSA
  2. 2.Computer Science DepartmentUniversity of WyomingLaramieUSA

Personalised recommendations