¿Puedo saber qué 'worker' realiza cada ejecución del lazo parfor?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Cuando se realiza un lazo parfor, quiero saber si se puede conocer qué 'worker' realiza cada iteración
0 Kommentare
Antworten (1)
Shivani
am 14 Mai 2024
Please note that I will be answering the question in English as my knowledge of Spanish is limited.
To offer a more accurate solution, it would be helpful to have additional context regarding the specific reasons for wanting to identify which worker is executing each iteration. As far as I understand, MATLAB does not provide a direct way to determine the exact worker executing a given task within a ‘parfor’ loop.
It's important to note that the implementation of ‘parfor’ automatically distributes the loop's iterations among the workers. You can utilize the ‘parforOptions’ function to effectively control the distribution of the load to the worker nodes.
Please refer to the MATLAB documentation link for more details on how to use this function to control the partitioning of iterations among the workers: https://www.mathworks.com/help/releases/R2019b/parallel-computing/parforoptions.html?s_tid=doc_ta
Hope this resolves your query!
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!