Clabels cause segmentation fault

Hi all,

I am having some problems working with clabels.

Whenever I use mcmc algorithms with clabels the kernel dies (upon inspection, I found the error is 'segmentation fault (core dumped)').

I am not sure what I am doing wrong, so here’s a minimum working example:

g =["lesmis"]

clabel = g.vp["clabel"] = g.new_vp("int")

for v in g.vertices():

state = gt.NestedBlockState(g, state_args={'clabel':clabel,'pclabel':clabel})

for i in range(100):

If it helps, I’m getting the same problem with the following changes:
- use equilibrate instead of multiflip.
- use two labels instead of three.
- use minimize_nested_blockmodel_dl instead of NestedBlockState
- pass clabels dictionary as **args

Extra information:
- If I run the multifip MCMC fewer times (let’s say 10) sometimes it works, sometimes it doesn’t, so it seems that the error is somewhat stochastic.
- This happens on different machines, both with Linux and Mac

Is this a bug or am I doing something wrong?



attachment.html (3.84 KB)

This is indeed a bug, unfortunately.

Can you please open an issue in the website with the minimal example
above so I can keep track of this and fix it?