Fastest large SVD computation in multithreaded machine?
Mostrar comentarios más antiguos
I have a waveform optimization problem that uses a large SVD in an interative loop. For instance, with my current settings, the matrix is 18800x18937, or roughly 356M elements (complex, either double or single, been experimenting). I have a machine with enough RAM (128 GB) to hold the entire thing; for other portions of the code I get some help using parpool('threads') and a parfor. Given the matrix sizes, I don't see a process pool as an option for other portions of the code.
Watching the utilization, it appears it uses about 6-10 threads for the native SVD, so it's partly parallel; I don't know if this is a Linux processor counting problem because the parpool only generated 10 workers despite it having 20 CPU cores. SPMD and distributed arrays seem to be only for process pools; with threads I don't need to distribute the array in memory.
Any tips on what to try, or is it going as fast as possible already? RdTildeRoot is 18800x18800 and computed once, Z is updated each iteration. From profiling, the SVD on this one line is 90% of the execution time.
[Ubar, ~, Utilde] = svd(RdTildeRoot * Z, 'econ');
4 comentarios
KSSV
el 25 de En. de 2022
Go to the parallel settings and see how may workers it is limited to.
Christine Tobler
el 25 de En. de 2022
Are those 20 CPU cores physical cores or logical cores? For numerical operations, MATLAB will only make as many threads as there are physical cores, as this is typically faster. You can use maxNumCompThreads to see and modify the maximum number of threads being used by MATLAB.
Martin Ryba
el 25 de En. de 2022
Martin Ryba
el 25 de En. de 2022
Respuestas (1)
Benjamin Thompson
el 25 de En. de 2022
0 votos
If you have the parallel computing toolbox and a good NVIDIA GPU, try using gpu Arrays. Try svds if you don't need all the singular values.
Categorías
Más información sobre Parallel Computing Fundamentals en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!