mldivide take too much time

조회 수: 3 (최근 30일)
yusuf albadry
yusuf albadry 2020년 3월 14일
답변: Precise Simulation 2020년 5월 5일
Hi guys,
I am solving compressible NS using FEM , and I wrote my solver using MATLAB.
currently I have a problem with the running time ( 90x30 grid ). One time step takes about 22 seconds, 20 seconds of them are in the inverse line ! I dont know why it takes this much time !.
  댓글 수: 19
Walter Roberson
Walter Roberson 2020년 3월 15일
If your matrix is real-valued then if it is symmetric then it is also Hermitian -- equal to its complex transpose.
In such a case if the diagonal is all positive or all negative, then you might be able to use cholesky; if the diagonal does not meet that condition then LDL is used.
yusuf albadry
yusuf albadry 2020년 3월 15일
thank you Walter, for helping, it decreased the time to 50% :)
Thanks for all of you

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2020년 3월 18일
To summarize: the most important issue was that the poster had a Ryzen, which is at a disadvantage when using the Intel high performance Math library MKL. Fortunately a user has posted information on how to speed it up; https://www.mathworks.com/matlabcentral/answers/396296-what-if-anything-can-be-done-to-optimize-performance-for-modern-amd-cpu-s#answer_401963 and when the poster did that, they doubled performance.

Precise Simulation
Precise Simulation 2020년 5월 5일
You can also try the MUMPS linear solver which is also is up to 30-50% faster than mldivide (Umfpack) in serial mode (and also supports parallel), and is available as pre-compiled Matlab Mex files with the FEATool Multiphysics toolbox

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by