From: Dany on 13 Jun 2010 23:58 Hi, My matlab program tend to eat the memory, I have used a cluster with 32G Memory and multi processor and still having problems, My question is abt the best way to manage memory, basically I know it depends on what the program do and the system being used. Here is the case, the program generates a huge matrix and do some calculations on each row recursively. My 1st Question is , does matlab alway loads the whole matrix to the memory even if the other values are not needed all the time? if so, is there a way to load only the values needed in a time and then clears those being used earlier and how to do that. The 2nd Question is after each calculation I need to save values incrementally in file , they don't need to still in memory. The last Question is if I am able to do that does it slow the execution of the simulation.
From: Rob Campbell on 16 Jun 2010 10:58 > My 1st Question is , does matlab alway loads the whole matrix to the memory even >the other values are not needed all the time? Yes >if so, is there a way to load only the values needed in a time and then clears those >being used earlier and how to do that. Save your matrix one row at a time. eg save MAT row1 row2 row3 clear all load MAT row1 >The 2nd Question is after each calculation I need to save values incrementally in file , >they don't need to still in memory. ? >The last Question is if I am able to do that does it slow the execution of the simulation. If you do it right then it should make too much difference, but it will depend on the simulation.
From: us on 16 Jun 2010 11:05 "Dany " <rodytc(a)yahoo.com> wrote in message <hv49cb$l86$1(a)fred.mathworks.com>... > Hi, My matlab program tend to eat the memory, I have used a cluster with 32G Memory and multi processor and still having problems, My question is abt the best way to manage memory, basically I know it depends on what the program do and the system being used. Here is the case, the program generates a huge matrix and do some calculations on each row recursively. My 1st Question is , does matlab alway loads the whole matrix to the memory even if the other values are not needed all the time? if so, is there a way to load only the values needed in a time and then clears those being used earlier and how to do that. The 2nd Question is after each calculation I need to save values incrementally in file , they don't need to still in memory. The last Question is if I am able to do that does it slow the execution of the simulation. a hint: - answers to all of your questions are found by perusing... doc save; doc load; % with their various options/syntax us
|
Pages: 1 Prev: Multi core support for Simmechanics Next: Sampling rate calculations... |