Solving a large system takes too much memory?
Suppose i have a sparse matrix M with the following properties:
size(M) -> 100000 100000
sprank(M) -> 99236
nnz(M) -> 499987
numel(M) -> 1.0000e+10
who’s(‘M’) -> 8.4mb
How come solving the system takes way more than 8GB of RAM?
I’m using the following code (provided at http://www.mathworks.com/moler/exm/chapters/pagerank.pdf
function x = pagerank(G,p)
G = G – diag(diag(G));
[n,n] = size(G);
c = full(sum(G,1));
r = full(sum(G,2));
% Scale column sums to be 1 (or 0 where there are no out links).
k = find(c~=0);
D = sparse(k,k,1./c(k),n,n);
% Solve (I – p*G*D)*x = e
e = ones(n,1);
I = speye(n,n);
x = (I – p*G*D)e;
% Normalize so that sum(x) == 1.
x = x/sum(x);`Suppose i have a sparse matrix M with the following properties:
size(M) -> 100000 100000
sprank(M) -> 99236
nnz(M) -> 499987
numel(M) -> 1.0000e+10
who’s(‘M’) -> 8.4mb
How come solving the system takes way more than 8GB of RAM?
I’m using the following code (provided at http://www.mathworks.com/moler/exm/chapters/pagerank.pdf
function x = pagerank(G,p)
G = G – diag(diag(G));
[n,n] = size(G);
c = full(sum(G,1));
r = full(sum(G,2));
% Scale column sums to be 1 (or 0 where there are no out links).
k = find(c~=0);
D = sparse(k,k,1./c(k),n,n);
% Solve (I – p*G*D)*x = e
e = ones(n,1);
I = speye(n,n);
x = (I – p*G*D)e;
% Normalize so that sum(x) == 1.
x = x/sum(x);` Suppose i have a sparse matrix M with the following properties:
size(M) -> 100000 100000
sprank(M) -> 99236
nnz(M) -> 499987
numel(M) -> 1.0000e+10
who’s(‘M’) -> 8.4mb
How come solving the system takes way more than 8GB of RAM?
I’m using the following code (provided at http://www.mathworks.com/moler/exm/chapters/pagerank.pdf
function x = pagerank(G,p)
G = G – diag(diag(G));
[n,n] = size(G);
c = full(sum(G,1));
r = full(sum(G,2));
% Scale column sums to be 1 (or 0 where there are no out links).
k = find(c~=0);
D = sparse(k,k,1./c(k),n,n);
% Solve (I – p*G*D)*x = e
e = ones(n,1);
I = speye(n,n);
x = (I – p*G*D)e;
% Normalize so that sum(x) == 1.
x = x/sum(x);` matrix, solve, memory MATLAB Answers — New Questions