[MacPorts] #54238: py34-graph-tool: graph_tool.centrality.pagerank throws a segmentation fault (v. 2.22) with clang-4.0 (was: graph_tool.centrality.pagerank throws a segmentation fault (v. 2.22) with clang-4.0)

MacPorts noreply at macports.org
Sat May 27 09:25:02 UTC 2017


#54238: py34-graph-tool: graph_tool.centrality.pagerank throws a segmentation fault
(v. 2.22) with clang-4.0
------------------------------+----------------------
  Reporter:  essandess        |      Owner:  count0
      Type:  defect           |     Status:  assigned
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.4.1
Resolution:                   |   Keywords:
      Port:  py34-graph-tool  |
------------------------------+----------------------
Changes (by ryandesign):

 * cc: count0 (removed)
 * owner:   => count0
 * status:  new => assigned


Old 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?

New 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?

--

Comment:

 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.

--
Ticket URL: <https://trac.macports.org/ticket/54238#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list