Dear all,
I'm struggling with the Julia C-API. I've installed the last version of the
Intel Composer on my Mac (MKL & C++ compiler).
I thought I could call MKL directly from Julia with the C-API as explained
in the doc, using MKL Single Dynamic Library
<https://registrationcenter.intel.com/irc_nas/2690/mkl_userguide_mac.pdf>(SDL)
model.
I've tried to wrap the asum for double (inspired by the Base.LinAlg.BLAS
source code) :
function myasum(n::Integer, X::Vector{Float64}, incx::Integer)
ccall((:cblas_dasum, "/opt/intel/mkl/lib/libmkl_rt"),
Float64,
(Ptr{Int64}, Ptr{Float64}, Ptr{Int64}),
&n, X, &incx)
end
X = Float64[1,2,3]
myasum(3,X,1)
It seems the dylib is reached and the "cblas_dasum" is the right name to
call (otherwidse I get some errors about that).
But now my Julia gets into this error :
Intel MKL FATAL ERROR:
Cannot load libmkl_intel_thread.dylib.
I've tried to add /opt/intel/mkl/lib and /opt/intel/lib directories to my
PATH, but I still get the same error ...
Do you have any though how I can make it work ??
Thank you for helping,
Lionel