Matlab 2025b become unresponsive after running long iterations

조회 수: 32 (최근 30일)
Felix
Felix 2025년 10월 22일 21:04
편집: dpb 2025년 10월 24일 16:29
The thing seems to get stuck after loading a lot of files.
Despite those files are not kept in the memory.
e.g.,
for i = 1 : 10000
filename = xxxx_i % different file each iteration
data = load(filename);
% then do something with data, and data is updated every iteration
end
and MATLAB becomes unresponsive after running the said code. The behavior is kind of reproducable in different scripts loading different files for different purposes. The common ground is they are all loading a lot of files, and Matlab gets stuck afterwards. The memoery useage is normal.
Appears to be a new issue starting from 2025b, 2025a doesn`t have this behavior.
  댓글 수: 2
Steven Lord
Steven Lord 2025년 10월 22일 21:18
Without more details about what is happening during the "% then do something with data, and data is updated every iteration" step, it's likely going to be difficult if not impossible to offer any concrete suggestions.
dpb
dpb 2025년 10월 23일 17:38
편집: dpb 대략 17시간 전
Can you reproduce the symptoms with only
for i = 1 : 10000
filename = xxxx_i % different file each iteration
data = load(filename);
end
this part of the process? If so, could be indicative of not freeing up system file handles and running out of system resources.
Another possibility is that while overall memory use isn't excessive, the constant redefinition of the data variable causes memory segmentation and the system can't find a contiguous memory space of sufficient size.
Do symptoms change if you do forcibly
clear
at the end of the loop before starting the next iteration?
Another perturbation to try to uncover root cause would be to run the loop but just repeating the calculations on the same file to see if it really is related to multiple files being opened or something else inside the calculations is different in new release...
i=1;
filename = xxxx_i % define initial file
data = load(filename); % load data once only for testing
for i = 1 : 10000
then_do_something(data);
end
If the above runs without the symptom, then it would appear to be tied into the file i/o, indeed.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming Utilities에 대해 자세히 알아보기

태그

제품


릴리스

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by