I am relatively new to julia, but already managed to speed up a piece of code by factors of 2 to 5 compared to my numpy version. Now i need to deploy this code as a shared library on a cluster in a corporate environment without julia installation. I looked into PackageCompiler first, but did not like the mandatory package creation and overhead. It seems extremely messy. A much cleaner solution seems to be StaticCompiler. I got enthusiastic when I managed to run the corresponding example from the docs, but trying to use my own code fails already at the most trivial of lines:
function my_example(a::RefValue{MallocMatrix{Float64}},
b::RefValue{MallocMatrix{Float64}},
c::RefValue{MallocVector{ComplexF64}})
@inbounds for ib in 1:size(b[],1)
c[][ib] = unsafe_trunc(exp(-2. *pi*im*(a[][1,1]*b[][ib,1] + a[][1,2]*b[][ib,2])))
end
end
This will compile, but crash when trying to load the so-file in python with ctypes. The error message is “undefined symbol: ijl_apply_generic”. It will not crash if i do something even simpler, like writing some elements of b into c.
I understand that this kind of error occurs when you use “runtime” features like exceptions. However i have no idea what “apply_generic” might be and how to avoid it.
I would be thankful on any help about how to debug this kind of problem in general, and about the nature of my specific problem.