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

1 view (last 30 days)
Chanheung Cho
Chanheung Cho on 24 Jun 2021
Commented: Rik on 9 May 2022
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.
  1 Comment
Rik
Rik on 9 May 2022
I recovered the removed content from the Google cache (something which anyone can do). Editing away your question is very rude. Someone spent time reading your question, understanding your issue, figuring out the solution, and writing an answer. Now you repay that kindness by ensuring that the next person with a similar question can't benefit from this answer.
This page is now on the Wayback Machine.

Sign in to comment.

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