Solution of large sparse matrix systems using GPU MLDIVIDE
42 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yash Agrawal
am 16 Jan. 2020
Kommentiert: Yash Agrawal
am 17 Jan. 2020
I have a sparse 1 million by 1 million matrix system that I wish to solve repeatedly in a loop, (I use MLDIVIDE or the ' \ '). My CPU takes about 250 s to solve this once and the RAM goes up to 40 GB during the process. This has made me doubt that, Is it possible to solve this system on a 4 GB GPU, using the GPU MLDIVIDE? Will solving it on a GPU make it faster? Or it does not make sense? I have read that GPU is good for highly parallel operations. I have GeForce GTX 1050 Ti 4 GB GPU. My CPU is i7-9700 with 3 GHz, 8 cores, and 64 GB RAM.
0 Kommentare
Akzeptierte Antwort
Joss Knight
am 16 Jan. 2020
The general advice is that Sparse MLDIVIDE may be convenient, but it is 'usually' slower than use of an iterative solver with an appropriate preconditioner: gmres, cgs, pcg, bicg, bicgstab, qmr, tfqmr, lsqr.
3 Kommentare
Joss Knight
am 17 Jan. 2020
Yes, sparse matrix mldivide is supported on GPU, see here: https://uk.mathworks.com/help/matlab/ref/mldivide.html#d117e922106
But it's often very slow. We want to improve it, but it is a general truism that sparse direct solves are less efficient than iterative solvers.
Weitere Antworten (1)
Edric Ellis
am 16 Jan. 2020
A couple of suggestions:
- On the CPU, if you're repeatedly solving the same system, you might be able to benefit from the recently-introduced decomposition object.
- On the GPU, it's hard to say without knowing the exact details whether or not the GPU will be of benefit in this case, so perhaps it would be best to get a Parallel Computing Toolbox trial licence to enable you to experiment.
1 Kommentar
Siehe auch
Kategorien
Mehr zu Sparse Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!