Surendar Swaminathan
2009-Apr-06 19:22 UTC
[R] Bonpower Crashes Trying Sparse Matrix (Igraph)
Hello All, I have been trying to do bonpow for a while now.Bonpow works for few graphs and for few others it goes out of memory. I did see reply to one of the posting Alph Centrality Crashed in Igraph memory error. The solution in the posting was to use sparse matrix. This is the link of the message. http://lists.gnu.org/archive/html/igraph-help/2008-04/msg00071.html I was able to obtain edgelist for the graph and I do not know how to convert that to sparse matrix and obtain bonpow. Can someone help me. This is what I tried Summary(g) Vertices: 8047 Edges: 99060 Directed: FALSE No graph attributes. Vertex attributes: name. No edge attributes. I use get.adjacency( graph,Sparse=TR UE) to obtain the sparse matrix.Converted the sparse matrix to graph and fed the graph object to bonpow. Can someone help me with this.I know I am making a big mistake but I do not know how to solve them. Please find the attached graph object along with this mail. Nathan.
For the records, the possible solution is here: http://igraph.wikidot.com/r-recipes#toc6 Gabor On Mon, Apr 6, 2009 at 9:22 PM, Surendar Swaminathan <surendar.swaminathan at gmail.com> wrote:> Hello All, > > I have been trying to do bonpow for a while now.Bonpow works for few graphs > and for few others it goes out of memory. > > I did see reply to one of the posting Alph Centrality Crashed in Igraph > memory error. > > The solution in the posting was to use sparse matrix. This is the link of > the message. > > http://lists.gnu.org/archive/html/igraph-help/2008-04/msg00071.html > I was able to obtain edgelist for the graph and I do not know how to convert > that to sparse matrix and obtain bonpow. > Can someone help me. > ?This is what I tried > > Summary(g) > > Vertices: 8047 > Edges: 99060 > Directed: FALSE > No graph attributes. > Vertex attributes: name. > No edge attributes. > I use get.adjacency( graph,Sparse=TR > > UE) to obtain the sparse matrix.Converted the sparse matrix to graph and fed > the graph object to bonpow. > Can someone help me with this.I know I am making a big mistake but I do not > know how to solve them. > > Please find the attached graph object along with this mail. > > Nathan. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- Gabor Csardi <Gabor.Csardi at unil.ch> UNIL DGM
Surendar Swaminathan
2009-Apr-07 20:46 UTC
[R] Bonpower Crashes Trying Sparse Matrix (Igraph)
Hello Gabor, Thank you very much for the reply.With respect to the cross post.I replied to the thread that was created I must have made a mistake.I tried working on the code. I have total of 5 different graphs and Bonpow function in Igraph works for 2 graphs and for the other it goes out of memory.It is the same case using sparse matrix. The graphs that did not work for Bonpow function in Igraph does not work using the sparse.And for one of the graph R crashes. This is the error I get.Help on this would be great. bonpow.sparse(g) Error: cannot allocate vector of size 3.3 Gb In addition: Warning messages: 1: In solve(id - exponent * d, tol = tol) : Reached total allocation of 1535Mb: see help(memory.size) 2: In solve(id - exponent * d, tol = tol) : Reached total allocation of 1535Mb: see help(memory.size) 3: In solve(id - exponent * d, tol = tol) : Reached total allocation of 1535Mb: see help(memory.size) 4: In solve(id - exponent * d, tol = tol) : Reached total allocation of 1535Mb: see help(memory.size) Nathan On Mon, Apr 6, 2009 at 12:22 PM, Surendar Swaminathan < surendar.swaminathan@gmail.com> wrote:> Hello All, > > I have been trying to do bonpow for a while now.Bonpow works for few graphs > and for few others it goes out of memory. > > I did see reply to one of the posting Alph Centrality Crashed in Igraph > memory error. > > The solution in the posting was to use sparse matrix. This is the link of > the message. > > http://lists.gnu.org/archive/html/igraph-help/2008-04/msg00071.html > I was able to obtain edgelist for the graph and I do not know how to > convert that to sparse matrix and obtain bonpow. > Can someone help me. > This is what I tried > > Summary(g) > > Vertices: 8047 > Edges: 99060 > Directed: FALSE > No graph attributes. > Vertex attributes: name. > No edge attributes. > I use get.adjacency( graph,Sparse=TR > > UE) to obtain the sparse matrix.Converted the sparse matrix to graph and > fed the graph object to bonpow. > Can someone help me with this.I know I am making a big mistake but I do not > know how to solve them. > > Please find the attached graph object along with this mail. > > Nathan. >[[alternative HTML version deleted]]