On 14.02.2017 17:20, P-M wrote:
I am trying to run the following snippet of code:
import graph_tool.all as gt import timeit, os import cPickle as pickle import numpy as np
g = gt.load_graph('graph_no_multi_reac_type.gt') gt.remove_parallel_edges(g)
print 'minimising state' start = timeit.default_timer() state = gt.minimize_nested_blockmodel_dl(g, deg_corr=True,verbose=False) duration = timeit.default_timer()-start print 'duration: ', duration
state = state.copy(sampling=True) with open('state_n_dc.pkl','wb') as state_pkl: pickle.dump(state,state_pkl,-1) print 'equilibrating Markov chain' start = timeit.default_timer() mcmc_args = {} mcmc_args=dict(parallel = True,niter=10) history = gt.mcmc_equilibrate(state, wait=1000, history=True,mcmc_args=mcmc_args) duration = timeit.default_timer()-start print 'duration: ', duration with open('history1.pkl','wb') as his1_pkl: pickle.dump(history,his1_pkl,-1)
On the attached graph ( graph_no_multi_reac_type.gt <http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/file/n4027034/graph_no_multi_reac_type.gt> ). I, however, get an error message stating "Segmentation fault (core dumped)". To be precise my screen output is:
minimising state duration: 991.349531889 equilibrating Markov chain Segmentation fault (core dumped)
So the error seems to arise during `history = gt.mcmc_equilibrate(state, wait=1000, history=True,mcmc_args=mcmc_args)`. Why might that be?
I have observed the issue both with `2.20dev (commit 01432d60, Sun Jan 15 19:54:52 2017 +0000)` and `2.20 (commit f6ef9990, Fri Jan 27 16:40:08 2017 +0000)`.
Best,
Philipp
Please supply the actual graph you used, so this can be investigated. The git version you tried is more than a month old; do you see this problem with a current git version? Since you tried with 2.20dev, I assume you compiled it yourself. What OS are you using, what GCC version do you have, and are you using sparsehash or not? Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>