Azzera filtri
Azzera filtri

How to solve Matlab memory issue

1 visualizzazione (ultimi 30 giorni)
Kavitha Srinivasan
Kavitha Srinivasan il 21 Nov 2012
Hi all
I am working with huge data file of matrix size 1024*736 and has 367 such files. The approximate RAM required for processing this is 16 GB. I am using Matlab 64-bit version in Linux of 16 GB capacity. But matlab freezes even at 4 GB. What is causing the problem? Is Matlab is not configured to utilise the system memory at all. Are the matlab and system are not working in hands to solve memory problems. How to get rid of this?
Thanks for all your support.
  2 Commenti
Walter Roberson
Walter Roberson il 21 Nov 2012
Are you sure about the processing memory? If the matrices are double precision, then the total memory of what you outline is a bit over 2 Gb to load them. What kind of operation do you do on them after they are loaded?
Kavitha Srinivasan
Kavitha Srinivasan il 21 Nov 2012
Yes. the matrices are stored as double and I used FDk reconstruction operation, (that involves weighting, filtering, back projection) of those input files.

Accedi per commentare.

Risposte (2)

Jan
Jan il 21 Nov 2012
What is the output of:
[a,b,c] = computer
The memopry can be exhausted by other problems also, e.g. when a pre-allocation is forgotten. Then the finals amount of memory might be some GB only, but temporarily thousands of GB could be allocated. So please post a minimal example which reproduces the problem. Usually rand is sufficient to simulate reading large files.
  3 Commenti
Walter Roberson
Walter Roberson il 22 Nov 2012
(FDK appears to mean Feldkamp-Davis-Kress)
Kavitha Srinivasan
Kavitha Srinivasan il 22 Nov 2012
yes. its cone beam reconstruction algorithm

Accedi per commentare.


Matt J
Matt J il 22 Nov 2012
Modificato: Matt J il 22 Nov 2012
To do FDK reconstruction, you don't have to load the entire data set into memory at the same time. Traditionally, it is done by processing one projection view at a time. If your 367 files each contain a projection view, why not just load one of them into RAM at a time, do the processing needed to update your image volume, ad then throw it away?
Also, how do you rationalize
memo = 8*(4*nx*ny*nz + 2*nu*nv);
If your image volume is being held as 4-byte singles, shouldn't it just be
memo = 4*nx*ny*nz;

Community Treasure Hunt

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

Start Hunting!

Translated by