Opened 7 years ago

Closed 7 years ago

#54238 closed defect (fixed)

py34-graph-tool: graph_tool.centrality.pagerank throws a segmentation fault (v. 2.22) with clang-4.0

Reported by: essandess (Steve Smith) Owned by: count0 (Tiago de Paula Peixoto)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: Cc: mamoll (Mark Moll)
Port: py-graph-tool

Description (last modified by ryandesign (Ryan Carsten Schmidt))

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?

Change History (4)

comment:1 Changed 7 years ago by mamoll (Mark Moll)

I have py36-graph-tool @2.22_0+clang39+gtk3+openmp installed on OS X 10.12.5 and cannot reproduce this. Maybe clang 3.9 is new enough? I can also add a clang-4.0 as a variant.

comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: count0 removed
Description: modified (diff)
Owner: set to count0
Status: newassigned
Summary: graph_tool.centrality.pagerank throws a segmentation fault (v. 2.22) with clang-4.0py34-graph-tool: graph_tool.centrality.pagerank throws a segmentation fault (v. 2.22) with clang-4.0

Remember to use WikiFormatting.

What do you mean by "#380"? Neither MacPorts Trac ticket 380 nor MacPorts GitHub pull request 380 relate to this port.

comment:3 Changed 7 years ago by mf2k (Frank Schima)

Port: py-graph-tool added; py34-graph-tool removed

comment:4 Changed 7 years ago by mamoll (Mark Moll)

Resolution: fixed
Status: assignedclosed

This appears to have been fixed in the latest version of the port. Closing this ticket. Reopen if it still doesn't work for you with py-graph-tool @2.23.

Note: See TracTickets for help on using tickets.