フィルターのクリア

Large structures won't save

4 ビュー (過去 30 日間)
Peter
Peter 2012 年 5 月 5 日
I have a large structure 'L' containing data (700MB). When I try to save it I get:
>save('test','L')
Out Of Memory during serialization of the Subsystem Data
??? Error using ==> save
Error closing file c:\...\MATLAB\test.mat
I'm running in Matlab 2011a on WinXP 32bit. If L is < ~500Mb it will save,more importantly and it works fine in Matlab 2007a and 2009b on the same machine.
memory gives the following output: >memory
Maximum possible array: 1022 MB
Memory available for all arrays: 1642 MB
Memory used by MATLAB: 1100 MB
Physical Memory (RAM): 3326 MB
Thanks for any ideas!

採用された回答

Peter
Peter 2012 年 6 月 9 日
Turns out somewhere between R2009 and R2011 the "save" function changed in such a way that a copy of the structure is made by the "save" command - thus exceeding the available memory and breaking code that worked on the earlier version. The fix is to use save with the -V7.3 option.
save('-v7.3','data')
  1 件のコメント
Kjeld Jensen
Kjeld Jensen 2013 年 6 月 3 日
I had similar problem saving a fairly large full workspace, getting the 'Out Of Memory during serialization of the Subsystem Data' error. This was with v2013a. However, the '-v7.3' trick worked. However, I notice that the resulting mat file is huge compared to similar workspace files saved without this trick.

サインインしてコメントする。

その他の回答 (1 件)

Richard
Richard 2012 年 5 月 18 日
I doubt that MATLAB is out of memory. You are probable just saving the data incorrectly. Look at
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 5 月 18 日
I see no inherent reason why MATLAB might not be out of memory. It seems possible to me that MATLAB needs to create internal versions of the structure in order to save it; and it seems possible to me that MATLAB might not need an internal copy for a plain numeric array.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by