igraph-help
[Top][All Lists]

## Re: [igraph] IGRAPH_FINALLY_REAL error in python binding

 From: Yaohua Xiong Subject: Re: [igraph] IGRAPH_FINALLY_REAL error in python binding Date: Thu, 12 Dec 2013 13:06:13 +0100

Thanks for the explanation and workarounds！

On Wed, Dec 11, 2013 at 9:26 PM, Tamás Nepusz wrote:
Hi,

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

https://github.com/igraph/igraph/commit/043577090ce13b00fa86b1ccf844b1149d251ebd

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,
--
T.

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
>
> """
>
> 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