[Top][All Lists]

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

Re: [igraph] IGRAPH_FINALLY_REAL error in python binding

From: Tamás Nepusz
Subject: Re: [igraph] IGRAPH_FINALLY_REAL error in python binding
Date: Wed, 11 Dec 2013 21:26:54 +0100


Thanks for the bug report - I have fixed this now in the development branch:


FWIW, the problem happens only if igraph decides to use the Bellman-Ford 
algorithm to calculate the shortest paths. In the Python interface, this 
happens if the graph has at least one negative or zero edge weight, the number 
of target vertices is not larger than 100 and the “mode” argument of the 
shortest_path() call is equal to “out”. As a workaround, you could either:

1) omit the target vertex from the call or specify more than 100 target vertices
2) use mode=“all” or mode=“in” instead of mode=“out”. If you really need 
mode=“out”, you can swap the direction of each edge, swap the target node with 
the source node in the call and use mode=“in” instead.
3) eliminate negative or zero weights from your graph

All the best,

On Wednesday, 11 December 2013 at 11:15, Yaohua Xiong wrote:

> Hi,
> I'm relative new to the igraph lib and encounters a weird problem. The 
> problem is boiled down like this:
> given following code snippet
> """
> # initialize a graph with postive attribute "imp_tt"
> for i in range(1000):
> sp = graph.shortest_paths(sidx, tidx, weights="imp_tt")[0][0]
> """
> for a small graph of 1000+ vertices, this code snippet works perfectly.
> But for a bigger graph of 10000+ vertices the code crash with
> """
> python: igraph_error.c:173: IGRAPH_FINALLY_REAL: Assertion `no<100' failed.
> Aborted
> """
> after about 100 iterations.
> However if I delete the weights="imp_tt" part it works again.
> I searched the archive and get a sense that it involves a stack not get 
> released. But then why it doesn't need to be explicitly released for the 
> small graph?  
> Any Ideas what's going wrong?
> Best Regards,
> Yaohua Xiong
> --  
> M.Sc. Engg Yaohua Xiong
> Universität Stuttgart
> Lehrstuhl für Verkehrsplanung und Verkehrsleittechnik  
> _______________________________________________
> igraph-help mailing list
> address@hidden (mailto:address@hidden)
> https://lists.nongnu.org/mailman/listinfo/igraph-help

reply via email to

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