Skip to main content
Log in

Sparse systems solving on GPUs with GMRES

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

Scientific applications very often rely on solving one or more linear systems. When matrices are sparse, iterative methods are preferred to direct ones. Nevertheless, the value of nonzero elements and their distribution (i.e., the sketch of the matrix) greatly influence the efficiency of those methods (in terms of computation time, number of iterations, result precision) or simply prevent the convergence.

Among iterative methods, GMRES (Saad, Iterative methods for sparse linear systems. PWS Publishing, New York, 1996) is often chosen when dealing with general nonsymmetric matrices. Indeed its convergence is very fast and more stable than the biconjugate gradient. Furthermore, it is mainly based on mathematical operations (matrix-vector and dot products, norms, etc.) that can be heavily parallelized and is thus a good candidate to implement a solver for sparse systems on Graphics Processing Units (GPU).

This paper presents a GMRES method for such an architecture. It is based on the modified Gram–Schmidt approach and is very similar to that of Sparselib (Barrett et al., Templates for the solution of linear systems: building blocks for iterative methods, SIAM, Philadelphia, 1994). Our version uses restarting and a very basic preconditioning. For its implementation, we have based our code on CUBLAS (NVIDIA, http://developer.download.nvidia.com/compute/cuda/2_1/toolkit/docs/CUBLAS_Library_2.1.pdf, 2008) and SpMV (Bell and Garland, Efficient sparse matrix-vector multiplication on CUDA. NVIDIA technical report NVR-2008-004, 2008) libraries, in order to achieve a good performance whatever the matrix sizes and their sketch are. Our experiments exhibit encouraging results on the comparison between Central Processing Units (CPU) and GPU executions in double precision, obtaining a speedup ranging from 8 up to 23 for a large variety of problems.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Balay S, Buschelman K, Gropp WD, Kaushik D, Knepley MG, Curfman McInnes L, Smith BF, Zhang H (2001) PETSc Web page. http://www.mcs.anl.gov/petsc

  2. Barrachina S, Castillo M, Igual FD, Mayo R, Quintana-Orti ES (2008) Evaluation and tuning of the level 3 CUBLAS for graphics processors. In: IPDPS. IEEE, New York, pp 1–8

    Google Scholar 

  3. Barrett R, Berry M, Chan TF, Demmel J, Donato J, Dongarra J, Eijkhout V, Pozo R, Romine C, van der Vorst H (1994) Templates for the solution of linear systems: building blocks for iterative methods, 2nd edn. SIAM, Philadelphia

    Book  Google Scholar 

  4. Baskaran MM, Bordawekar R (2009) Optimizing sparse matrix-vector multiplication on GPUs. IBM research report RC24704, IBM, April 2009

  5. Bell N, Garland M (2008) Efficient sparse matrix-vector multiplication on CUDA. NVIDIA technical report NVR-2008-004, NVIDIA Corporation, December 2008

  6. Blatt M, Bastian P (2006) The iterative solver template library. In: PARA, vol 4699. Springer, Berlin, pp 666–675

    Google Scholar 

  7. Buatois L, Caumon G, Lévy B (2007) Concurrent number cruncher: an efficient sparse linear solver on the gpu. In: High performance computation conference (HPCC). Springer lecture notes in computer sciences, vol 4782. Award: Second best student paper

    Google Scholar 

  8. Davis T (1997) University of Florida sparse matrix collection. NA Digest, see http://www.cise.ufl.edu/research/sparse/matrices/

  9. Dongarra J, Duff IS, Sorenson DC, van der Vorst H (1998) Numerical linear algebra for high-performance computers. In: Software, environments, and tools, vol 7. SIAM, Philadelphia

    Google Scholar 

  10. Dongarra J, Lumsdaine A, Niu X, Pozo R, Remington K (1994) A sparse matrix library in C++ for high performance architectures. In: Second object oriented numerics conference, pp 214–218

    Google Scholar 

  11. NVIDIA (2008) NVIDIA CUBLAS library 2.1. http://developer.download.nvidia.com/compute/cuda/2_1/toolkit/docs/CUBLAS_Library_2.1.pdf

  12. NVIDIA (2009) NVIDIA a programming guide 2.2. http://developer.download.nvidia.com/compute/cuda/2_21/toolkit/docs/NVIDIA_CUDA_Programming_Guide_2.2.1.pdf

  13. Saad Y (1996) Iterative methods for sparse linear systems. PWS Publishing, New York

    MATH  Google Scholar 

  14. Jost T, Contassot-Vivier S, Vialle S (2009) An efficient multi-algorithms sparse linear solver for GPUs. In: International conference on parallel computing, ParCo2009, September 2009

  15. Vazquez F, Garzaon EM, Martinez JA, Fernandez JJ (2009) The sparse matrix-vector product on GPUs. Research report, University of Almeria, June 2009

  16. Wang M, Klie H, Parashar M, Sudan H (2009) Solving sparse linear systems on NVIDIA Tesla GPUs. In: 9th international conference computational science—ICCS. Lecture notes in computer science, vol 5544. Springer, Berlin, pp 864–873

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Raphaël Couturier.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Couturier, R., Domas, S. Sparse systems solving on GPUs with GMRES. J Supercomput 59, 1504–1516 (2012). https://doi.org/10.1007/s11227-011-0562-z

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-011-0562-z

Keywords

Navigation