Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Some additional data: On a Linux machine with 128 GB of RAM, I get

sage: m = matrix(ZZ, 500, 3000, [1..500*3000])
sage: m.smith_form()
(500 x 3000 dense matrix over Integer Ring, 500 x 500 dense matrix over Integer Ring, 3000 x 3000 dense matrix over Integer Ring)
sage: get_memory_usage()
8189.71875

for example, after about one hour of crunching. According to top, the python process is using 7.2 GB of memory.

click to hide/show revision 2
Address comments, mention matsnf

Some additional data: On the main Sage development machine, a 24-core Linux machine server with 128 GB of RAM, I get

sage: m = matrix(ZZ, 500, 3000, [1..500*3000])
sage: m.smith_form()
(500 x 3000 dense matrix over Integer Ring, 500 x 500 dense matrix over Integer Ring, 3000 x 3000 dense matrix over Integer Ring)
sage: get_memory_usage()
8189.71875

for example, after about one hour of crunching. According to top, the python process is using 7.2 GB of memory.

According to m.smith_form?? and m.elementary_divisors??, both methods both use PARI's matsnf function but with different arguments (1 and 0, respectively). Unfortunately, I'm not familiar with the algorithm(s) it uses, the particular implementation(s), or whether they can be parallelized, etc. Please see John Palmieri's answer for a much more practical... answer.