Cannot execute matlabpool close on the labs.

조회 수: 1 (최근 30일)
kira
kira 2011년 6월 9일
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
Sean de Wolski
Sean de Wolski 2011년 6월 9일
what is 'safestarmatlabpool'?
kira
kira 2011년 6월 9일
safestarmatlabpool it's just a little routine that ask if matlabpool is open, before trying opennig...

댓글을 달려면 로그인하십시오.

답변 (1개)

Edric Ellis
Edric Ellis 2011년 6월 9일
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
kira
kira 2011년 6월 13일
i see... I'll check some routines and see what happens...
kira
kira 2011년 6월 14일
Hi again:
After some experiments, i have this:
a parfor that calls a function that also has a parfor:
- the inner function works fine if executed by itself
- the parfor works fine if the inner function use a for-loop instead of a parfor
- nothing happens (ie, the program is not executed) if the inner function use the parfor... the error i get is the one i posted...
So, the problem is not with the function being recursive by itself, since it works. But executed inside the parfor-loop it can't be done... why, i don't now...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by