Why does mldivide solve equations so fast that FORTRAN can't compare it?
조회 수: 5 (최근 30일)
이전 댓글 표시
At present, I am studying the accelerated solution algorithm of the finite difference method (multigrid method). Therefore, I am very concerned about the speed comparison between Matlab's inverse division method and Mg method, but I find that the inverse division method or mldivide method is very fast, so I can't think of the significance of mg method? MG is meaningful only if:
1. Matlab's mldivide uses GPU acceleration
2. Matlab's mldivide uses multithreading or parallel acceleration
If this is the case, we would appreciate it if you could provide the source or bibliography
Of course, I also want to know whether these acceleration methods are also used by default, such as LU decomposition and QR decomposition
댓글 수: 0
답변 (2개)
Jan
2021년 10월 23일
편집: Jan
2021년 10월 23일
Matlab's code for the matrix division is not made public. Internally optimized BLAS libraries and MKL are used. The taskmanager shows, that multithreading is applied if the matrix size exceeds certain limits: mutliple cores are working.
QR and LU are using optimized libraries and mutlithreading also.
To see the source code, you have to be employed by MathWorks.
댓글 수: 0
Christine Tobler
2021년 10월 25일
MATLAB's mldivide uses multithreading. It doesn't use the GPU unless you have the Parallel Computing Toolbox and are using the gpuArray class.
We don't give out details about the internal implementation of mldivide. Two things you can look into:
- The mldivide documentation which describes which decomposition is used (presumably you'd be interested in the sparse case)
- The spparms function: If you call spparms('spumoni', 1), every call to mldivide for a sparse matrix will print diagnostic information about what decomposition is used to the command line.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 General Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!