Hi Tamás, I was afraid that it would be my problem! I will try to do it calculating small batches of the matrix, as you said. Thank you very much for your suggestion!!
Best, Charles On Wed, Nov 21, 2012 at 10:50 PM, Tamás Nepusz <[email protected]> wrote: >> I am trying to calculate the shortest paths for a large sparse graph >> (48000 nodes and 2000 edges). [...] >> shortest_paths<-shortest.paths(net,weights=E(net)$weight); >> Error in .Call("R_igraph_shortest_paths", graph, v - 1, to - 1, >> as.numeric(mode), : >> negative length vectors are not allowed > Oh, hang on. If you have 48K nodes, the resulting shortest path matrix would > have 48K * 48K elements. That's pretty big. I'm guessing that although you > have 32GB of memory, you hit some kind of internal limit within R and it > simply cannot allocate the matrix it would require to return the result. The > solution is to calculate the shortest paths for each start vertex separately > in a for loop (use the v=... argument to specify the start vertex). You can > also use smaller batches, say, 1000 vertices at the same time. > > Best, > Tamas > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help -- Um axé! :) -- Charles Novaes de Santana http://www.imedea.uib-csic.es/~charles PhD student - Global Change Laboratorio Internacional de Cambio Global Department of Global Change Research Instituto Mediterráneo de Estudios Avanzados(CSIC/UIB) Calle Miquel Marques 21, 07190 Esporles - Islas Baleares - España Office phone - +34 971 610 896 Cell phone - +34 660 207 940 _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
