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

8 次查看(过去 30 天)
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