- the first 2/3 of the iterations are divided equally between the cores, large chunks
- the next 1/6 (I think it might have been) of the iterations are divided into smaller chunks and handed out to cores as the cores become available
- the remaining (1/6th?) iterations are handed out to cores individually as they become available.
parallel computing workers number vs. PSO particle number
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Wei Wang
le 12 Août 2021
Commenté : Walter Roberson
le 12 Août 2021
Hi there,
I'm trying to run PSO in Matlab. I have a processor of 64 cores. I'm wondering how I should assign particle numbers for PSO. Is that true that at each iteration if I assign 64*n (n is an integer) particles, there won't be idle workers waiting each other, which brings efficiency compared with non-64*n particles? My simulation time varies from 25-40s per simulation.
0 commentaires
Réponse acceptée
Walter Roberson
le 12 Août 2021
Is that true that at each iteration if I assign 64*n (n is an integer) particles, there won't be idle workers waiting each other
No, that is not true. When you use parfor, the only way to avoid having cores idle waiting for other cores, is use a pool of size 1.
The question becomes how long they are going to wait. The answer to that is going to depend upon the variability in work loads.
When there are sufficient cores:
It is possible in this scheme for cores to run out of individual iterations while one of the original large chunks is still executing.
4 commentaires
Walter Roberson
le 12 Août 2021
I would suggest that you experiment with a parpool of 16 that is allocated 4 cores per worker. Use the Cluster Profile manager to reduce number of workers but increase numthreads.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Particle Swarm dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!