Cannot execute matlabpool close on the labs.
Afficher commentaires plus anciens
Hi:
I'm just starting doing parallel programing and till now everything went fine, but now I get an error I don't understand.
*Error using ==> parallel_function at 598 Error in ==> matlabpool at 135 Cannot execute matlabpool close on the labs.
Error in ==> getallbiggervecs at 43 parfor i=1:m
Error in ==> getallbiggervecs at 36 y=[y;getallbiggervecs(Y,Xvar,nucleos)];
*
It's just my intuition, but I think that parallelism doesn't work fine with recursive functions.
Here's the routine (I added an extra if to use normal for.loop and compare):
3 commentaires
Sean de Wolski
le 9 Juin 2011
Your intuition is correct.
Sean de Wolski
le 9 Juin 2011
what is 'safestarmatlabpool'?
kira
le 9 Juin 2011
Réponses (1)
Edric Ellis
le 9 Juin 2011
1 vote
You can nest a PARFOR loop invoke another PARFOR loop, but you will not get any additional parallelism. (due to a current limitation, the inner PARFOR loop cannot occur directly in the text of the outer PARFOR loop) There is no extra parallelism because you cannot open or close another MATLABPOOL on the workers. (One way to tell if you're on a worker is to ask "isempty(getCurrentJob)")
6 commentaires
kira
le 9 Juin 2011
Walter Roberson
le 9 Juin 2011
Kira, you can do that by calling a function that opens the new pool and has a PARFOR. The limitation is on directly nested PARFOR.
kira
le 11 Juin 2011
Walter Roberson
le 11 Juin 2011
I have not worked in that area, but my understanding is that if you want the inner PARFOR to actually run distributed, it has to run in a different pool.
kira
le 13 Juin 2011
kira
le 14 Juin 2011
Catégories
En savoir plus sur Parallel for-Loops (parfor) dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!