Message Boards Message Boards

0
|
6655 Views
|
6 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Clear Mathematica data stored in the Virtual Memory?

Posted 7 years ago

I am running a lengthy calculation and after consuming 48 GH the message "out of memory" appears. These 48 GH are stored in the Virtual Memory during 72 hours and then desappear. I can't get rid of them before using ClearSystemCache[]. Any suggestions?

6 Replies

Thank you, I'll have a look at the script and see what is the maximum number of previous outputs it actually needs.

Dear Massimo,

I have a similar problem with my calculations and virtual memory usage. I ask you, therefore, if settign $HistoryLength = 1 worked for you, since I too probably need the outputs of the previous blocks in my code. Any suggestions would be appreciated.

Thanks!

POSTED BY: Gagandeep Singh

Depending on how you did the calculation it might be a good idea to set the $HistoryLength:

$HistoryLength = 1

I don't think Mathematica will decide if it stores things in the regular memory or the virtual memory, that should be the task of the operating system.

POSTED BY: Sander Huisman

Thank you. I never tried, but it seems to me that in virtually all cases a program needs the contents of the previous outputs, not just the last one. Or is there somethig escaping me?

Basically it is the storage of Out[...]. Remember that with % you can get the last answer and %% the penultimate and %%% the antepenultimate et cetera... This is only possible by having this 'history' in memory. $HistoryLength is by default set to infinity meaning it stores all these outputs. If you don't use it, it might take up lots of memory. However it depends a lot on how you wrote your script...

POSTED BY: Sander Huisman

Hi. I did try doing it, but it does not solve the issue for me. Most of the memory is required in just a single block run.I tried Parallelization[], but it does not run without errors as well... Any suggestions would be welcome please!

POSTED BY: Gagandeep Singh
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract