Memory usage shoots up after computing two variable/references, D & Rj_mats. For these two, varinfo() reports:
D 6.000 MiB 262144×262144 SparseMatrixCSC{Int64,Int64}
Rj_mats 10.039 KiB 256-element Array{SparseMatrixCSC{Int64,Int64},1}
Curios about memory usage, I saved these two in separate files as below:
@save "blah"*"_Rj_mats"*".bson" Rj_mats
@save "blah"*"_D"*".bson" D
The file sizes reported by OS are:
1.44 GB (1,512,503 KB) for blah_Rj_mats.bson
6.00 MB (6,145 KB) for blah_D.bson
varinfo() was invoked after Rj_mats is initialized inside a function as below and filled up in a subsequent loop (within the same function):
global Rj_mats = Array{SparseMatrixCSC{Int, Int}, 1}(undef,n);
Looking forward to comments, critique and helpful pointers.
Thanks for reading!