can_execute_parfor
Version 1.0.0 (1,64 ko) par
tommsch
Test whether there are available workers to run a parfor loop.
- This is an experimental function, implementing a crucially needed feature, which is for an unknown reason not part of Matlab.
- If you use it and it does not work: Please do not downgrad immediatly, but leave a comment. Since I need this functionality for my own projects, I am grateful for constructive comments.
Currently, in Matlab it is not possible to check whether there are available workers to run a parfor loop. It is able to check it for stuff to be run via parfeval, but not for stuff to be run via parfor.
The problem is that, when a function executes a parfor loop, but it is terminated early (e.g. via Ctrl-C), then the spawned workers for the parfor loop are not terminated. Instead they continue to run on. Since a too-long running parfor loop is often the reason why one aborts a program via Ctrl-C, this scenario happens easily.
Therefore, this function is crucially needed but for a strange reason not part of Matlab
Citation pour cette source
tommsch (2024). can_execute_parfor (https://www.mathworks.com/matlabcentral/fileexchange/168896-can_execute_parfor), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Créé avec
R2023b
Compatible avec les versions R2021b et ultérieures
Plateformes compatibles
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0 |