Trying to call a fortran function. The fortran library is qrupdate. The fortran files were compiled with flags
-fimplicit-none -O3 -funroll-loops -fPIC
using gfortran
.
My julia command looks like
ccall(("sqrinr_","qrupdate-1.1.2/libqrupdate"), Int32, (Int64, Int64, Array{Float64, 2}, Int64, Array{Float64, 2}, Int64, Int64, Array{Float64, 1}, Array{Float64, 1}), n, q, Q, n+1, R, n+1, n, xp, w)
and I get a segfault
signal (11): Segmentation fault
while loading no file, in expression starting on line 0
sqrinr_ at qrupdate-1.1.2/libqrupdate.so (unknown line)
anonymous at ./<missing> (unknown line)
unknown function (ip: 0x7f084dec901f)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined]
jl_toplevel_eval_flex at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:569 [inlined]
jl_toplevel_eval at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:580
jl_toplevel_eval_in_warn at /home/centos/buildbot/slave/package_tarball64/build/src/builtins.c:590
eval at ./boot.jl:234
unknown function (ip: 0x7f0a58ebf4df)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942
eval_user_input at ./REPL.jl:64
unknown function (ip: 0x7f084de9a0a6)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942
macro expansion at ./REPL.jl:95 [inlined]
#3 at ./event.jl:68
unknown function (ip: 0x7f084de971cf)
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1942
jl_apply at /home/centos/buildbot/slave/package_tarball64/build/src/julia.h:1392 [inlined]
start_task at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:253
unknown function (ip: 0xffffffffffffffff)
Allocations: 6546676 (Pool: 6544886; Big: 1790); GC: 10
Segmentation fault
I have no idea how to approach the problem, can someone point me in right direction?