rcpparrayfire
rcpparrayfire copied to clipboard
libmkl_core.so: cannot open shared object file: No such file or directory
I installed ArrayFire via ArrayFire-v3.6.4_Linux_x86_64.sh script downloaded from the ArrayFire site. Then, I have tried to pass through RcppArrayFire installation procedure. Unfortunately, it fails with the following communicate:
** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘RcppArrayFire’ in dyn.load(file, DLLpath = DLLpath, ...): cannot open shared object file '/home/krzysztof/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-RcppArrayFire/00new/RcppArrayFire/libs/RcppArrayFire.so': libmkl_core.so: cannot open shared object file: No such file or directory
I saw a previous issue which seemed to be similar at glance, but it did't give my relevant answer to my question.
The environment I use looks like this:
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS
Matrix products: default
BLAS: /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=pl_PL.UTF-8 LC_NUMERIC=C LC_TIME=pl_PL.UTF-8 LC_COLLATE=pl_PL.UTF-8
[5] LC_MONETARY=pl_PL.UTF-8 LC_MESSAGES=pl_PL.UTF-8 LC_PAPER=pl_PL.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=pl_PL.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] drat_0.1.5 compiler_3.6.1 tools_3.6.1
I hope I'll be able to install this great project on my machine :sunglasses:
This sounds a lot like https://github.com/arrayfire/arrayfire/issues/2372. Does it help to add the LD_PRELOAD statement from the last comment? I generally use ArrayFire compiled from source, which removes this issue with linking to MKL.
The error messages are different, though. What is the output of these commands?
ldconfig --print-cache | grep libaf
ldconfig --print-cache | grep libmkl
ldd </path/to/libaf.so>
Thank you for quick answers! I installed ArrayFire from source too.
Commands
ldconfig --print-cache | grep libaf
ldconfig --print-cache | grep libmkl
print nothing.
The last one, i.e:
ldd /usr/local/lib64/libaf.so
gives me following output:
linux-vdso.so.1 (0x00007fff450f7000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f84125c2000) libmkl_core.so => not found libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f84123a3000) libmkl_intel_lp64.so => not found libmkl_gnu_thread.so => not found libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f8412174000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8411dd6000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8411bbe000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f84117cd000) /lib64/ld-linux-x86-64.so.2 (0x00007f8412dbf000)
I installed ArrayFire from source too.
Originally you mentioned ArrayFire-v3.6.4_Linux_x86_64.sh, which installs a pre-compiled binary. Are you still using that?
Anyway, ldconfig not knowing about libaf is bad. Please have a look at this SO answer. Does that help?