Azzera filtri
Azzera filtri

Error of array exceeds maximum array size preference

21 visualizzazioni (ultimi 30 giorni)
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 Commenti
Stephen23
Stephen23 il 12 Mar 2024
"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 il 15 Mar 2024
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.

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 12 Mar 2024
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 Commenti
Shreya Chauhan
Shreya Chauhan il 15 Mar 2024
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.
Walter Roberson
Walter Roberson il 15 Mar 2024
The problem might be the array size limit.

Accedi per commentare.

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by