Effacer les filtres
Effacer les filtres

How to stop parfor from launching a parallel pool automatically?

16 vues (au cours des 30 derniers jours)
Mohammad Abouali
Mohammad Abouali le 12 Oct 2014
Whenever MATLAB reaches parfor it will try to start a parallel pool and then run the parfor in parallel.
How can I stop parfor from launching a parallel pool automatically? I mean I want parfor to use a parallel pool if it was launched before. But once the code reaches parfor, if there is no parallel pool already launched then it just runs the parfor in serial without launching a parallel pool.
Any help is appreciated.

Réponse acceptée

Oleg Komarov
Oleg Komarov le 12 Oct 2014
Modifié(e) : Oleg Komarov le 13 Oct 2014
In the preferences:
.
To edit parallel preferences programmatically:
ps = parallel.Settings;
ps.Pool.AutoCreate = false;
  3 commentaires
Oleg Komarov
Oleg Komarov le 13 Oct 2014
See my edit.
Mohammad Abouali
Mohammad Abouali le 13 Oct 2014
Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Parallel Computing Fundamentals dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by