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

5 ビュー (過去 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 Center および File ExchangeSystems of Nonlinear Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by