very large matrix manipulation
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi I have a matrix that could end up being possibly 25x25 large. I need to do large manipulations on this matrix, for instance I need to generate a matrix of zeros B = zeros(n^m,m); where n and m are the dimensions of the original matrix. This obviously gives me an error because there is not enough computing power to do this. If I understand it right, any value in the matrix is a byte so that would be 25^25 bytes right? thats about 8*10^24 gb?! Whatever - Its too big. Can I use multiple cores to deal with the issue? Please can someone suggest how to get around this
0 Kommentare
Antworten (2)
Walter Roberson
am 16 Nov. 2011
In B = zeros(n^m,m) each value in the matrix will be a double precision number, which is 8 bytes.
You can use B = zeros(n^m,m,'uint8') to get one byte per entry.
Remember too that you have n^m by m, so that would be 25^25 * 25 = 25^26 = 2220446049250313080847263336181640625 bytes.
Using multiple cores is not going to help without a fundamental reorganization of your problem. 25^26 bytes requires a 121 bit address space, but the maximum implemented for any x86 type chips (the only thing MATLAB runs on these days) is 48 bits of address space. Even if you managed to partition the problem up in to 48 bits of address space per instance, you would need approximately 2^(121-48) = 2^73 = 9444732965739290427392 systems (that is close to 1E22)
You need a redesign.
Jill Reese
am 28 Nov. 2011
If you have access to Parallel Computing Toolbox and MATLAB Distributed Computing Server, you may find that distributed arrays will help you to work around the memory limitation. That is exactly what they are intended for.
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!