Error of array exceeds maximum array size preference

8 次查看(过去 30 天)
I am trying to create an array of a very large dimension in MATLAB. I am receving the following error:
'Requested 4290*65*4290*65 (579.3GB) array exceeds maximum array size preference. Creation of arrays greater than this Limit may take a lonfg time and cause MATLAB to become unresponsive.'
I have ran the code on a system with 8 core processor with 256GB RAM and on MATLAB2017 version.
I have ran the same code on a different computer system with 12 core processor with 128GB RAM and used the MATLAB2023b version on that system. With this system and this MATLAB version, I was able to generate the matrix of above mentioned size. Can anyone help with what exactly is the problem? Is it with the MATLAB version or the number of cores or it has something other issues?
  2 个评论
Stephen23
Stephen23 2024-3-12
"Can anyone help with what exactly is the problem?"
The error message tells us that you are trying to create an array which would require 579.3 GB.
Your computer has 128 GB of RAM.
Consider: can you store 579.3 liters of milk in a 128 liter bottle?
Shreya Chauhan
Shreya Chauhan 2024-3-15
Thank you for the answer. The proble is code is working on 128 GB RAM system but not on 256 GB RAM system. We are looking for the reson behind this.

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2024-3-12
Preferences -> Workspace -> MATLAB Array Size Limit
Turn off "Limit array size to a percentage of RAM"
Meanwhile, make sure that you have configured your system to permit lots of virtual memory.
... Expect response to be fairly slow.
  2 个评论
Shreya Chauhan
Shreya Chauhan 2024-3-15
Thank you for the answer. We tried your solution but it is still not working and now it is showing Out of memoery insted of the previous error. Regarding virtual memory, I am not much familiar with that part.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by