mschauer / CausalInference.jl

Causal inference, graphical models and structure learning in Julia
https://mschauer.github.io/CausalInference.jl/latest/
Other
190 stars 24 forks source link

Core dumped #35

Closed shuiruge closed 1 year ago

shuiruge commented 4 years ago

Description

When running the example code, core dumped when calling functions in CausalInference.jl.

How to reproduce

julia> using Distributions, CausalInference, LightGraphs, DelimitedFiles, LinearAlgebra, Statistics

julia> p = 0.01
0.01

julia> run(`wget http://nugget.unisa.edu.au/ParallelPC/data/real/NCI-60.csv`)
--2020-08-06 10:08:33--  http://nugget.unisa.edu.au/ParallelPC/data/real/NCI-60.csv
Resolving nugget.unisa.edu.au (nugget.unisa.edu.au)... 130.220.238.199
Connecting to nugget.unisa.edu.au (nugget.unisa.edu.au)|130.220.238.199|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 503900 (492K) [text/csv]
Saving to: ‘NCI-60.csv.1’

NCI-60.csv.1        100%[===================>] 492.09K  22.0KB/s    in 22s

2020-08-06 10:08:55 (22.8 KB/s) - ‘NCI-60.csv.1’ saved [503900/503900]

Process(`wget http://nugget.unisa.edu.au/ParallelPC/data/real/NCI-60.csv`, ProcessExited(0))

julia> X = readdlm("NCI-60.csv", ',')
47×1190 Array{Float64,2}:
 6.99  8.88  12.0   9.675  7.19  11.34  …  4.23718  6.37608  5.20627  3.50863
 7.13  8.38  10.33  9.05   7.22  10.45     4.75954  6.17181  6.7689   2.93449
 6.8   8.74  11.35  9.405  7.31  11.04     4.37352  6.67987  5.62962  3.67044
 7.14  8.35   9.85  9.415  7.24  12.69     4.92636  6.90313  6.80625  3.12128
 6.96  8.78  10.49  9.075  7.16  11.08     4.2918   6.44953  6.05958  3.46598
 7.13  8.12  10.42  9.28   7.2   11.18  …  5.16958  6.2123   5.52125  3.04637
 6.43  8.1    9.52  8.92   7.11   9.03     5.06683  6.62371  6.18011  3.70149
 6.9   8.07  10.59  9.175  6.95  10.19     4.42233  6.54749  7.22168  3.68644
 6.85  7.85  10.49  8.75   6.92  11.15     4.82896  7.19305  6.57986  3.15056
 7.21  8.57  10.52  9.375  7.05  10.91     5.08984  6.459    6.02511  2.94772
 7.08  8.97  10.82  9.26   7.11  11.69  …  4.94262  6.41526  5.34156  3.61674
 ⋮                                ⋮     ⋱
 6.83  6.94   9.66  9.09   6.77   6.47     4.65602  6.09287  8.54819  2.933
 6.63  7.83  10.01  8.525  7.07   6.48     4.69862  6.00309  7.22021  3.0219
 6.9   7.97   9.88  8.86   6.92   6.57     4.40671  6.0104   7.45978  3.0842
 6.4   7.16   8.83  7.31   6.61   6.51  …  4.54673  6.50196  6.12835  3.33407
 6.79  7.29   8.91  9.235  6.77   6.4      4.34924  6.37084  6.97208  3.03957
 6.9   8.52  10.5   8.66   6.91   6.51     4.43472  6.45681  6.97463  3.29303
 6.44  7.87   8.69  8.635  6.87   6.42     4.14958  6.63677  7.10673  2.98364
 6.47  6.26   7.67  7.615  6.76   6.38     4.22982  6.18741  7.17066  3.23644
 6.82  8.19   9.66  8.93   6.84   6.39  …  4.06572  5.89088  7.78291  2.99947
 6.56  6.38   8.83  8.855  6.91   6.42     4.21092  6.1497   7.38943  3.2686

julia> d, n = size(X)
(47, 1190)

julia> C = Symmetric(cor(X, dims=2))
47×47 Symmetric{Float64,Array{Float64,2}}:
 1.0       0.807696  0.757761  0.787986  …  0.616891  0.528619  0.563903
 0.807696  1.0       0.772865  0.824406     0.697699  0.690263  0.702064
 0.757761  0.772865  1.0       0.803171     0.556586  0.491281  0.522343
 0.787986  0.824406  0.803171  1.0          0.576896  0.567632  0.567215
 0.813678  0.848589  0.785915  0.796059     0.696705  0.69009   0.702516
 0.768449  0.75849   0.845676  0.795379  …  0.533072  0.475594  0.484969
 0.847352  0.76714   0.742304  0.799302     0.5444    0.522602  0.521669
 0.793934  0.890278  0.753355  0.819742     0.673537  0.671544  0.667793
 0.800139  0.778964  0.858277  0.818942     0.541695  0.484179  0.511507
 0.841787  0.833696  0.828992  0.85063      0.604515  0.579083  0.583844
 0.79488   0.781762  0.857281  0.787233  …  0.57783   0.520079  0.547467
 ⋮                                       ⋱            ⋮
 0.607503  0.73983   0.575925  0.627975     0.840001  0.862012  0.864089
 0.602156  0.740401  0.549489  0.617055     0.829732  0.884191  0.890923
 0.66981   0.784469  0.619499  0.662866     0.83598   0.87832   0.874532
 0.634844  0.746884  0.594401  0.627522  …  0.842019  0.83081   0.862018
 0.670839  0.778984  0.616863  0.663717     0.835929  0.847246  0.849272
 0.727325  0.793674  0.693941  0.719001     0.782905  0.790569  0.802886
 0.573711  0.686349  0.537377  0.575016     0.815878  0.861199  0.860698
 0.616891  0.697699  0.556586  0.576896     1.0       0.781553  0.810175
 0.528619  0.690263  0.491281  0.567632  …  0.781553  1.0       0.888733
 0.563903  0.702064  0.522343  0.567215     0.810175  0.888733  1.0

julia> h, S = skeleton(d, gausscitest, (C, n), quantile(Normal(), 1-p/2))
Illegal inttoptr
          %45 = ptrtoint double addrspace(13)* %44 to i64
Illegal inttoptr
          %scevgep56 = ptrtoint double addrspace(13)* %scevgep to i64
Illegal inttoptr
          %74 = inttoptr i64 %73 to i8 addrspace(13)*

signal (6): Aborted
in expression starting at REPL[7]:1
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7fd2fb33fd04)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at /usr/bin/../lib/x86_64-linux-gnu/libLLVM-8.so.1 (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at /usr/bin/../lib/x86_64-linux-gnu/libLLVM-8.so.1 (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at /usr/bin/../lib/x86_64-linux-gnu/libLLVM-8.so.1 (unknown line)
unknown function (ip: 0x7fd2fb429ac1)
unknown function (ip: 0x7fd2fb42c2d8)
unknown function (ip: 0x7fd2fb42c8cd)
unknown function (ip: 0x7fd2fb367b4a)
unknown function (ip: 0x7fd2fb399082)
unknown function (ip: 0x7fd2fb3be84b)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
unknown function (ip: 0x7fd2fb3c9df8)
#skeleton#14 at /home/ubuntu/.julia/packages/CausalInference/fsCr2/src/skeleton.jl:42
unknown function (ip: 0x7fd2fb3c9df8)
skeleton at /home/ubuntu/.julia/packages/CausalInference/fsCr2/src/skeleton.jl:26
unknown function (ip: 0x7fd2fb3d175b)
unknown function (ip: 0x7fd2fb3d1389)
unknown function (ip: 0x7fd2fb3d18f0)
unknown function (ip: 0x7fd2fb3d29c8)
unknown function (ip: 0x7fd2fb3d3616)
unknown function (ip: 0x7fd2fb3ebe08)
unknown function (ip: 0x7fd2fb3ec3c8)
jl_toplevel_eval_in at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
eval at ./boot.jl:331
eval_user_input at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
macro expansion at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:118 [inlined]
#26 at ./task.jl:358
unknown function (ip: 0x7fd2fb3d6cbb)
unknown function (ip: (nil))
Allocations: 26262904 (Pool: 26256341; Big: 6563); GC: 24
Aborted (core dumped)

Versioninfo

Julia Version 1.4.1
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel Xeon Processor (Cascadelake)
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
  JULIA_PKG_SERVER = https://mirrors.bfsu.edu.cn/julia/static
mschauer commented 1 year ago

Seems like we temporarily triggered a Julia bug. Reopen if necessary.