igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Problems calculating shortest paths for sparse large graph


From: Charles Novaes de Santana
Subject: Re: [igraph] Problems calculating shortest paths for sparse large graph
Date: Thu, 22 Nov 2012 04:58:55 +0100

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 <address@hidden> 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
> address@hidden
> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]