- There is insufficient memory for your largest array
- There is insufficient memory for all data used in the script
Matlab out of memory
13 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone ,
I am trying to solve an interpolation problem in 18 dimensions using RBF kernel and there are 60000 query points. Although I have vectorized my code for RBF Kernel but still matlab throws the out of memory error and when I run the memory command by creating a breakpoint just before the line that throws the error I get the following results :
K>> memory
Maximum possible array: 115929 MB (1.216e+11 bytes) *
Memory available for all arrays: 115929 MB (1.216e+11 bytes) *
Memory used by MATLAB: 4540 MB (4.760e+09 bytes)
Physical Memory (RAM): 130937 MB (1.373e+11 bytes)
* Limited by System Memory (physical + swap file) available.
Is there anything I can do to get rid of this problem?
Thank you.
0 件のコメント
回答 (1 件)
Aditya
2022 年 9 月 14 日
Hi,
I understand that you are encountering out of memory error when executing MATLAB code.
The best way to handle out of memory errors is to rewrite the code.
You can start by debugging the code for any logical errors. For example, check if you accidently create huge arrays e.g., by rand(1e6) if rand(1, 1e6) was meant.
You may need to rethink the data structures being used in the program and how they are manipulated. For e.g., using single instead of double, inefficient usage of structs/cells, using sparse arrays as much as possible etc. Please see Strategies for Efficient Use of Memory - MATLAB & Simulink (mathworks.com) for more information.
If the issue persists, you are limited by the memory on the machine that you are using. You can adjust settings to increase the available memory for MATLAB as explained in Resolve "Out of Memory" Errors - MATLAB & Simulink (mathworks.com)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!