Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • graph-tool graph-tool
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Please use the issue tracker only to report bugs (i.e. errors in the library that need to be fixed) or feature requests.

For questions about how to compile, install or use the library, please use instead the web forum at https://forum.skewed.de/c/graph-tool.


(If unsure, use the forum first.)


IMPORTANT: When opening new issues, please choose the BUG template from the drop-down menu, and fill out the required information.

  • Tiago Peixoto
  • graph-toolgraph-tool
  • Issues
  • #225
Closed
Open
Issue created May 29, 2015 by Yunuscan@ynscn

Segmentation fault when using weights in community.minimize_blockmodel_dl

Hi,

I was trying to make some experiments with community detection. I'm creating a small graph, adding labels and weights as vertex and edge properties. After that I pass this graph and weights into minimize_blockmodel_dl. It sometimes work, but sometimes it returns a Segmentation Fault and stops. I've provided a minimal code to reproduce this behaviour. I also noticed that I only encounter this bug when I use "eweight" parameter.

graph_tool version = 2.2.42-1 python version = 2.7.6

minimal_error_code.py

from graph_tool.all import *

g = Graph(directed=False)

vprop = g.new_vertex_property("string") 
 
eprop = g.new_edge_property("int")

v1 = g.add_vertex()

vprop[v1] = "v1"

v2 = g.add_vertex()

vprop[v2] = "v2"

v3 = g.add_vertex()

vprop[v3] = "v3"

v4 = g.add_vertex()

vprop[v4] = "v4"

v5 = g.add_vertex()

vprop[v5] = "v5"

v6 = g.add_vertex()

vprop[v6] = "v6"

v7 = g.add_vertex()

vprop[v7] = "v7"

v8 = g.add_vertex()

vprop[v8] = "v8"

v9 = g.add_vertex()

vprop[v9] = "v9"

e1 = g.add_edge(v1,v2)

eprop[e1] = 5

e2 = g.add_edge(v1,v3)

eprop[e2] = 2

e3 = g.add_edge(v1,v4)

eprop[e3] = 1

e4 = g.add_edge(v2,v4)

eprop[e4] = 4

e5 = g.add_edge(v6,v7)

eprop[e5] = 400

e6 = g.add_edge(v1,v9)

eprop[e6] = 440

e7 = g.add_edge(v8,v5)

eprop[e7] = 480

e8 = g.add_edge(v7,v4)

eprop[e8] = 480

e9 = g.add_edge(v8,v9)

eprop[e9] = 320

e10 = g.add_edge(v2,v9)

eprop[e10] = 3

state = minimize_blockmodel_dl(g, eweight=eprop)

b = state.b

graph_draw(g, vertex_fill_color=b, vertex_shape=b, vertex_text=vprop, edge_text=eprop, output="polbooks_blocks_mdl.pdf")

This is the picture generated when it works. graph

Assignee
Assign to
Time tracking