Recursion Limit inside parfor
1 次查看(过去 30 天)
显示 更早的评论
It seems that resetting recursion limit is ignored inside parfor. I have a recursive program that will exceed the default 500 limit. I can run it without problem using usual for loop. However, if I change it to parfor, I got the error
Caused by:
Maximum recursion limit of 500 reached. Use
set(0,'RecursionLimit',N) to change the limit. Be aware
that exceeding your available stack space can crash MATLAB
and/or your computer.
And no matter where I put the reset limit command set(0,'RecursionLimit',2000) (inside or outside parfor). I still got the same error message
0 个评论
采纳的回答
Edric Ellis
2014-3-10
I would try calling
spmd
set(0, 'RecursionLimit', N);
end
as this will ensure it executes on all workers.
2 个评论
Edric Ellis
2014-3-11
Unexpected loss of connection can sometimes occur if the worker machines crash.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parallel for-Loops (parfor) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!