parfor giving : Maximum variable size allowed by the program is exceeded.

Dear All,
I'm getting an error message while using parfor which has completely stumped me. I'm doing the following numerical integration:
for i = 1:N
I = quadgk(@(u)Integrand1(u,x(i), etc, etc ) ,0,200,'RelTol',1e-6,'AbsTol',1e-6);
f(1,i) = (1/pi) * I;
end
for some Integrand which is defined and f & x are preallocated. This runs fine but takes a long time so would be efficient to run in parallel. When I run the loop with 'parfor' I get the following error:
Maximum variable size allowed by the program is exceeded.
Error in run (line 63)
evalin('caller', [script ';']);
Caused by:
Maximum variable size allowed by the program is exceeded.
I guess this error is due to my stack being filled up but that shouldn't happen here given that it runs in serial ok.

답변 (1개)

Paul
Paul 2013년 12월 20일

0 개 추천

nobody seems interested in this question but some extent solved my problem for anyone else facing this issue.
ok - so I missed out a piece of information. The above code was run using the command line because i'm ssh'in to a remote linux box at my office. This crashes even though the machine has massive memory. However, we I run the program using the matlab gui everythings works out fine. No idea why this is the case - maybe there are is a switch need when starting the matlab script?

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2013년 12월 19일

답변:

2013년 12월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by