Code ran fine previously but now says 'out of memory'

8 次查看(过去 30 天)
Hi all, I have used a code for years and ran it on thousands of datasets (3D medical images, size 512x512x100). now for some reason, MATLAB says out of memory at a specific point in the code when nothing has changed in the code or the type of input file/variable and its the same computer (albeit now space on C drive is super low, can that have an impact?). ran fine 2 months ago. the license did change to a different university - can that have an effect??
its running fine on smaller sized variables (124x124x100) but I've run it on much larger files many times before, no problem. rest all input variables are the similar to previously used and its a very optimized code written and published and used by several groups. what could the issue possibly be? I've tried looking everywhere.

采纳的回答

Walter Roberson
Walter Roberson 2023-9-13
There is one possibility:
If you have configured Preferences -> MATLAB -> Workspace -> MATLAB array size limit
to be off, then the amount of memory that MATLAB would use would be limited by the amount of swap space that your system will provide. On Windows, the amount of swap space possible depends upon how much space is available on the C: drive (unless configured otherwise).
So, Yes, under limited conditions, having low space on C can affect how much memory MATLAB can access.
  5 个评论
Walter Roberson
Walter Roberson 2023-9-16
I have somes reclaimed a lot of space in Windows by removing old versions of windows; see https://support.microsoft.com/en-us/windows/delete-your-previous-version-of-windows-f8b26680-e083-c710-b757-7567d69dbb74
The old versions of windows are stored in a protected directory so you cannot remove them just using Windows Explorer.
Dyuman Joshi
Dyuman Joshi 2023-9-16
(Going slightly off the topic)
They are stored so that one can restore back to the older version, mostly in the case of incompatibility e.g. if it makes the system slower, or if it causes a BSOD error. Though I was under the understanding that they were deleted after a month, maybe for newer updates it is 10 days.
The Windows Update for a good amount of time now have been extremely sluggish, and with each update completed in my PC, MATLAB takes more time to start. Sigh.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Parallel Computing Fundamentals 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by