필터 지우기
필터 지우기

Is the Parallel Computing Performance sensitive to MATLAB Version?

조회 수: 8 (최근 30일)
HI, I'm running code that needs multi-core computation.
But I observed something weird while running it.
I'm running two computers with same code.
However, eventhough the code running in MATLAB R2021b uses Higher performance CPU(8core, 16 threads),
It was slower than using MATLAB R2023b CPU(4core, 8 threads).
For R2021b, it uses parpool('local'), for R2023b, it uses parpool('processes').
(#May be due to local vs process ...?)

채택된 답변

Walter Roberson
Walter Roberson 2023년 12월 7일
parpool 'local' very likely used processes -- background thread pool had only just be introduced in R2021b. Here 'local' refers to a configuration named 'local', where there are ways to edit configurations by name.
parpool 'processes' is explicitly using processes.
There is probably no difference in execution model between the two different ways of designating the pool in those two configurations.
There could be differences in the numbers of workers allocated: although the default is one worker for each physical core ( not one worker for each thread), in theory the parpool 'local' might happened to have been configured with a different number of workers.
That said: different CPUs can be at different speeds even if they happen to be exactly the same model. And different models might have different instruction sets with different instruction timings. AMD vs Intel can make a difference in performance.
But more particularly: between R2021b and R2023b, there was an upgrade on the high-speed libraries used on Windows systems. That kind of upgrade often does not make much difference in performance, but in some cases the algorithms were improved a lot. It is known, though, for upgrades in the algorithms to become more sensitive -- to detect precision problems on marginal systems that used to scrape by... or sometimes to detect precision problems and decide that the system needs to go through a different algorithm because the more common algorithm would probably produce weak answers.
Thus, although during upgrades the general trend is for performance to stay the same or improve, sometimes increased numeric analysis leads newer versions to give up early, or to take slower paths for marginal systems.
  댓글 수: 3
Edric Ellis
Edric Ellis 2023년 12월 7일
parpool('local') and parpool('Processes') are precisely the same thing. The name "local" was changed to "Processes" to help distinguish between local processes and threads (because both are in some sense "local"). This is mentioned in the release notes for R2022b.
Steven Lord
Steven Lord 2023년 12월 7일
You mean, If I upgrade the version from 2021b to 2023b, the computation efficiency can be enhanced. Right?
It is possible that the computational efficiency for whatever operations your code peforms was improved in the later release, yes. It is not guaranteed.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by