MATLAB closing when beginning parallel processing

조회 수: 21 (최근 30일)
BobbyRoberts
BobbyRoberts 2022년 5월 7일
이동: Walter Roberson 2024년 11월 22일
It was working all day while I troubleshooted some things. Now, for some reason, MATLAB closes without any warning - just shuts off - when starting the parallel computing using the Parfor function. Does anyone have any ideas to what could be causing this issue? Thanks.
  댓글 수: 3
BobbyRoberts
BobbyRoberts 2022년 5월 8일
Thanks, Riccardo. My memory is fine, and the code was working before..
I think the problem started after I quit MATLAB mid-function a couple times. I'm thinking that it could be because there's still something running or open in the background. I can't seem to find out what, but I'm hopinng there's some type of function to basically reset this. However, restarting the program or the computer did not fix it either.
Zihan
Zihan 2024년 11월 22일
이동: Walter Roberson 2024년 11월 22일
Hi, I think I'm encountering the same issue! I'm using matlab R2021a on a 32-core server. The same code has been running fine on another PC with the same matlab version, but on this server, the matlab randomly crashes when I activate parallel pools without any warning - matlab usually automatically generate a crash report as 'matlab_crash_dump.1615562-1', but it is blank inside. My RAM seems to be fine as well.
I wonder if you have already find the cause and solution of this, which will be very much appreciated! Many thanks!

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

답변 (1개)

Shivang
Shivang 2023년 11월 22일
Hi,
I understand you are facing an issue where MATLAB shuts off when using the 'parfor' function.
While it is hard to pinpoint an issue without the code and the crash logs, you can try the following approach. Move the parfor-loop into a local function in the 'main file', passing any variables into and out of the local function as input and output arguments respectively.
From:
main.m
% user-code berfore parfor-loop
parfor i=1:10
% user-code
end
To:
main.m (modified)
% user-code berfore parfor-loop
runParforLoop()
function ParforLoop()
parfor i=1:10
% user-code
end
end
Refer to this documentation link for more details regarding local functions: https://www.mathworks.com/help/matlab/matlab_prog/local-functions.html
Hope this helps.
-Shivang

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by