[graph-tool] Unexpected python quit after edge-weighted block model minimisation

JanNimczik janse.nim at freenet.de
Tue Jun 2 09:49:52 CEST 2015


Hi Tiago,

thanks for your swift reply. Here is a variant of the Price network from the
Quick Start Section of your documentation where I added random integers as
edge weights. When I run the gt.minimize_blockmodel_dl command I get the
same crash as with my own network. 

#! /usr/bin/env python
from numpy.random import * 
seed(42)
import graph_tool.all as gt

g = gt.Graph()

v_age = g.new_vertex_property("int")
e_age = g.new_edge_property("int")
e_weight = g.new_edge_property("int")

N = 100000
v = g.add_vertex()
v_age[v] = 0
vlist = [v]

for i in range(1, N):
    v = g.add_vertex()
    v_age[v] = i

    i = randint(0, len(vlist))
    target = vlist[i]

    # add edge and random edge weight
    e = g.add_edge(v, target)
    e_age[e] = i
    e_weight[e] = randint(1,6)

    vlist.append(target)
    vlist.append(v)

g.vertex_properties["age"] = v_age
g.edge_properties["age"] = e_age
g.edge_properties["weight"] = e_weight

state = gt.minimize_blockmodel_dl(g)
print(state.B)
state_w = gt.minimize_blockmodel_dl(g, eweight=g.edge_properties["weight"],
multigraph = True)
print(state_w.B)


I don't know if it helps, but here is an additional message that pops up in
the Terminal directly before the breakdown:
Python(2069,0x7fff725f8300) malloc: *** error for object 0x7fb36c9fc068:
incorrect checksum for freed object - object was probably modified after
being freed.
*** set a breakpoint in malloc_error_break to debug

Please let me know if you need any other information.
Thanks a lot,
Jan



--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Unexpected-python-quit-after-edge-weighted-block-model-minimisation-tp4026162p4026164.html
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.



More information about the graph-tool mailing list