MATLAB Answers

Why the dpsolve (Matlab) makes the array exceeds 32RAM?

5 views (last 30 days)
Chanheung Cho
Chanheung Cho on 24 Jun 2021
Answered: Shubham Khatri on 4 Jul 2021
I use the dpsolve code in my matlab code below
[c,s,v,x] = dpsolve(model,fspace,snodes,Vapprox,qapprox)
And the result is:
model = struct with fields:
e: [225×2 double]
w: [225×1 double]
params: {[1×1 struct]}
discount: 0.9300
actions: [11×1 double]
func: 'armdp_sdp_fixed'
horizon: 100
Requested 29820x54200 (12.0GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.
The first time, I thought that the problem is lack of the RAM, and I change the computer, 32GB RAM, and have still the same problem (the array size gets larger and exceeded the 32 RAM).
Could you let me know what is the problem with me? and what is the meaning of 29820x54200.
Thank you.

Answers (1)

Shubham Khatri
Shubham Khatri on 4 Jul 2021
Hello,
This issue could be due to RAM limitations. Try the following suggestions:
1. Go to MATLAB > Preferences > Workspace and ensure the Maximum array size limit is set to 100%.
Then execute 'memory' command in the Command Window and send the output. Ensure that the Maximum possible array size is larger than the memory required by the data used in neural network.
2. Also, check that the Java Heap Memory is not set to a very large value because that might restrict the amount of memory available to perform computations.
Also, please refer to these (Answer 1, answer 2) comminuty answers
Hope it helps

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by