Improving GPU Sparse Matrix-Vector Multiplication for Probabilistic Model Checking

  • Anton J. Wijs
  • Dragan Bošnački
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7385)


We present several methods to improve the run times of probabilistic model checking on general-purpose graphics processing units (GPUs). The methods enhance sparse matrix-vector multiplications, which are in the core of the probabilistic model checking algorithms. The improvement is based on the analysis of the transition matrix structures corresponding to state spaces of a selection of examples from the literature.

Our first method defines an enumeration of the matrix elements (states of the Markov chains), based on breadth-first search which can lead to a more regular representation of the matrices. We introduce two additional methods that adjust the execution paths and memory access patterns of the individual processors of the GPU. They exploit the specific features of the transition matrices arising from probabilistic/stochastic models as well as the logical and physical architectures of the device.

We implement the matrix reindexing and the efficient memory access methods in GPU-PRISM, an extension of the probabilistic model checker PRISM. The experiments with the prototype implementation show that each of the methods can bring a significant run time improvement - more than four times compared to the previous version of GPU-PRISM. Moreover, in some cases, the methods are orthogonal and can be used in combination to achieve even greater speed ups.


Model Check Memory Access Storage Format Memory Access Pattern Transition Probability Matrice 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Allmaier, S.C., Kowarschik, M., Horton, G.: State Space Construction and Steady-state Solution of GSPNs on a Shared-Memory Multiprocessor. In: Proc. 7th Intt. Workshop on Petri Nets and Performance Models, PNPM 1997, pp. 112–121. IEEE Comp. Soc. Press (1997)Google Scholar
  2. 2.
    Baier, C., Katoen, J.-P.: Principles of Model Checking, 950 p. MIT Press (2008)Google Scholar
  3. 3.
    Baier, C., Katoen, J.-P., Hermanns, H., Haverkort, B.: Model-Checking Algorithms for Contiuous-Time Markov Chains. IEEE Transactions on Software Engineering 29(6), 524–541 (2003)CrossRefGoogle Scholar
  4. 4.
    Barnat, J., Brim, L., Ceska, M., Lamr, T.: CUDA Accelerated LTL Model Checking. In: IEEE 15th International Conference on Parallel and Distributed Systems, ICPADS 2009, pp. 34–41. IEEE (2009)Google Scholar
  5. 5.
    Bell, A., Haverkort, B.R.: Distribute Disk-based Algorithms for Model Checking Very Large Markov Chains. In: Formal Methods in System Design, vol. 29, pp. 177–196. Springer (2006)Google Scholar
  6. 6.
    Bell, N., Garland, M.: Efficient Sparse Matrix-Vector Multiplication on CUDA NVIDIA. Technical Report NVR-2008-004 (December 2008)Google Scholar
  7. 7.
    Bell, N., Garland, M.: Implementing sparse matrix-vector multiplication on throughput-oriented processors. In: Proceedings of the ACM/IEEE Conference on High Performance Computing, SC 2009. ACM (2009)Google Scholar
  8. 8.
    Bošnački, D., Edelkamp, S., Sulewski, D.: Efficient Probabilistic Model Checking on General Purpose Graphics Processors. In: Păsăreanu, C.S. (ed.) SPIN 2009. LNCS, vol. 5578, pp. 32–49. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  9. 9.
    Bošnački, D., Edelkamp, S., Sulewski, D., Wijs, A.J.: Parallel probabilistic model checking on general purpose graphics processors. STTT 13(1), 21–35 (2011)CrossRefGoogle Scholar
  10. 10.
    Bošnački, D., Edelkamp, S., Sulewski, D., Wijs, A.J.: GPU-PRISM: An Extension of PRISM for General Purpose Graphics Processing Units (tool paper). In: Proc. Joint HiBi/PDMC Workshop, HiBi/PDMC 2010, pp. 17–19. IEEE Computer Society Press (2010)Google Scholar
  11. 11.
    Ciardo, G.: Distributed and Structured Analysis Approaches to Study Large and Complex Systems. European Educational Forum: School on Formal Methods and Performance Analysis, 344–374 (2000)Google Scholar
  12. 12.
    Cormie-Bowins, E.: A Comparison of Sequential and GPU Implementations of Iterative Methods to Compute Reachability Probabilities. In: Proc. of Workshop on GRAPH Inspection and Traversal Engineering, GRAPHITE 2012, Tallinn, Estonia, April 1 (to appear, 2012)Google Scholar
  13. 13.
  14. 14.
    Edelkamp, S., Sulewski, D.: Model Checking via Delayed Duplicate Detection on the GPU, Technical Report 821, Universität Dortmund, Fachberich Informatik (2008) ISSN 0933-6192Google Scholar
  15. 15.
    Holzmann, G.J., Bošnački, D.: The Design of a multi-core extension of the Spin Model Checker. IEEE Trans. on Software Engineering 33(10), 659–674 (2007) (first presented at: Formal Methods in Computer Aided Design (FMCAD), San Jose, November 2006)CrossRefGoogle Scholar
  16. 16.
    Kwiatkowska, M., Mehmood, R.: Out-of-Core Solution of Large Linear Systems of Equations Arising from Stochastic Modelling. In: Hermanns, H., Segala, R. (eds.) PROBMIV 2002, PAPM-PROBMIV 2002, and PAPM 2002. LNCS, vol. 2399, pp. 135–151. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  17. 17.
    Kwiatkowska, M., Norman, G., Parker, D.: PRISM: Probabilistic Symbolic Model Checker. In: Field, T., Harrison, P.G., Bradley, J., Harder, U. (eds.) TOOLS 2002. LNCS, vol. 2324, pp. 200–204. Springer, Heidelberg (2002)Google Scholar
  18. 18.
    Kwiatkowska, M., Norman, G., Parker, D.: Stochastic Model Checking. In: Bernardo, M., Hillston, J. (eds.) SFM 2007. LNCS, vol. 4486, pp. 220–270. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  19. 19.
    Kwiatkowska, M.Z., Parker, D., Qu, H.: Incremental Quantitative Verification for Markov Decision Processes. In: Proceedings of the IEEE/IFIP International Conference on Dependable Systems and Networks, pp. 359–370. IEEE (2011)Google Scholar
  20. 20.
    Vuduc, R.W.: Automatic Performance Tuning of Sparse Matrix Kernels. Ph.D. thesis, University of California, Berkeley (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Anton J. Wijs
    • 1
  • Dragan Bošnački
    • 1
  1. 1.Eindhoven University of TechnologyEindhovenThe Netherlands

Personalised recommendations