Borrar filtros
Borrar filtros

Is the Parallel Computing Performance sensitive to MATLAB Version?

8 visualizaciones (últimos 30 días)
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 ...?)

Respuesta aceptada

Walter Roberson
Walter Roberson el 7 de Dic. de 2023
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 comentarios
Edric Ellis
Edric Ellis el 7 de Dic. de 2023
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 el 7 de Dic. de 2023
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by