Does matlab using all cores in a multi-core cpu in sequential computing mode?

조회 수: 4 (최근 30일)
Richard Hern
Richard Hern 2020년 6월 22일
댓글: Walter Roberson 2020년 6월 22일
When I use matlab to call pcg to solve a sparse linear algebraic system in a sequential way, the windows task manager shows that all cores in the two-core cpu are used simutaneously. It appears that all cores are parallely called. Does matlab parallely using all cores in a multi-core cpu in sequential computing mode?
  댓글 수: 2
Mohammad Sami
Mohammad Sami 2020년 6월 22일
Only certain functions are optimized to take advantage of multiple core processor. More generally matlab remains a single threaded application and you have to use parallel computing toolbox to take full advantage of multi core processors.
More details are available here.
Walter Roberson
Walter Roberson 2020년 6월 22일
Most of the major linear algebra and vectorized mathematical operations automatically use all of the available cores.
I am not familiar with how pcg specifically works.
Parallel Computing Toolbox often turns out to be slower than the automatic vectorization, due to the overhead of communicating the data to the separate processes. Parallel Computing Toolbox mostly wins out for code that only needs to transfer relatively small amounts of data (compared to the computation) where the code iterates instead of working in vectorized form. For example chaotic mathematics often cannot take advantage of vectorization. (That said, there is a dandy fractal demonstration for GPU)

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by