Opened 7 years ago
Last modified 7 years ago
#54238 closed defect
graph_tool.centrality.pagerank throws a segmentation fault (v. 2.22) with clang-4.0 — at Initial Version
Reported by: | essandess (Steve Smith) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.1 |
Keywords: | Cc: | mamoll (Mark Moll), count0 (Tiago de Paula Peixoto) | |
Port: | py-graph-tool |
Description
This may be related to #380 because pagerank
uses OpenMP code.
This is macOS 10.12.4, Macports graph-tool, python 3.4:
`
port -qv installed | grep graph-tool
py34-graph-tool @2.22_0+clang38+openmp (active) platform='darwin 16'
2.22 (commit 44bf2b92, Thu Mar 2 23:08:39 2017 +0000)
`
SSCCE:
`
import graph_tool, graph_tool.all as gt
import numpy as np, numpy.random as npr
print(gt.version)
# Erdős–Rényi N = 5000 p = 1.5 * np.log(N)/N g = gt.random_graph(N, deg_sampler=lambda: npr.poisson((N-1)*p), directed=False, model='erdos')
# Segmentation fault
pr = graph_tool.centrality.pagerank(g)
`
Using clang-4.0 fixes the issue:
This worked for me:
`
sudo port -p -N install py34-graph-tool configure.compiler=macports-clang-4.0 configure.args-append=--enable-openmp
`
Would you please update the portfile to use clang-4.0?