Whenever I use mcmc algorithms with clabels the kernel dies (upon inspection, I found the error is 'segmentation fault (core dumped)').
g = gt.collection.data["lesmis"]
clabel = g.vp["clabel"] = g.new_vp("int")
for v in g.vertices():
clabel[v]=np.random.randint(3)
state = gt.NestedBlockState(g, state_args={'clabel':clabel,'pclabel':clabel})
for i in range(100):
state.multiflip_mcmc_sweep(niter=10)
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?
Best,
Valerio
---------------------------------------------------------------------
Lecturer in Business Applications of Informatics
Room 2.18a - Informatics Forum
School of Informatics - University of Edinburgh