![]() |
|
|
|
#1
|
|||
|
|||
|
Is there a size limit on Mat_DP ?
My application crashes when I try allocating Mat_DP of large sizes. I am trying to allocate matrices having sizes 300,000 by 300,000.
Is there a limit to Mat_DP sizes? Other information that may prove helpful, is that my machine has 16 gb of memory, and I am compiling my Visual Studio project in 64 bits. Thank you for any help! |
|
#2
|
|||
|
|||
|
A matrix of size 300,000 by 300,000 has 3 x 10^5 times 3 x 10^5 = 9 x 10^10 elements. Each element is a double taking 8 bytes, so the total storage is 72 x 10^10 bytes, or 720 GB. So no hope of storing it on a typical machine. More important, just looping through such a large array to do a few operations would take a huge amount of time.
If most of the elements of your matrix are zero, take a look at the sparse matrix routines in section 2.7 or the band-diagonal routines in section 2.4 Saul Teukolsky |
![]() |
| Thread Tools | |
| Display Modes | |
|
|