Community
cancel
Showing results for 
Search instead for 
Did you mean: 
aurora
Beginner
77 Views

Cannot load libmkl_def.so (Linux in C++ and Fortran)

Hi,
This message is being shown during the execution of my application.
I have a copy of libmkl_def.so in the same directory of the executable and the LD_LIBRARY_PATH variable pointing to the same folder. I've also tried to EXPORT LD_LIBRARY_PATH to the ...../mkl/lib/intel64 directory where all the mkl libs are.
There is only one version of mkl in the computer and only one Intel Compiler
The version of the icpc compiler is
$ ifort -v
ifort version 12.1.0
$ icpc -v
icpc version 12.1.0 (gcc version 4.1.2 compatibility)
Thanks in advance!
0 Kudos
7 Replies
mecej4
Black Belt
77 Views

Check the file permissions on the shared library. If they are OK, you will need to provide more details on your OS, machine details, etc.
hydroxyprolin
Beginner
77 Views

To add a directory to the search path for dynamic libraries, do this as root user:

  1. add the line '/XYZ/mkl/lib/intel64' to the file '/etc/ld.so.conf'
    (replace XYZ with path to mkl lib)
  2. run ldconfig
aurora
Beginner
77 Views

Permissions are OK, and the ld.conf solution didnt work :( Some additional info:

$ cat /etc/issue
CentOS release 5.6 (Final)

$ cat /proc/version
Linux version 2.6.18-238.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011

$ uname -a
Linux desktop 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/cpuinfo
....
model : 75
model name : AMD Athlon 64 X2 Dual Core Processor 4200+
stepping : 2
cpu MHz : 2211.343
cache size : 512 KB
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy

mecej4
Black Belt
77 Views

What is the output of the shell command

$ ls -l $LD_LIBRARY_PATH

?
aurora
Beginner
77 Views

$ echo $LD_LIBRARY_PATH
/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/:/home/aurora/Desktop/installs/full

The second one is the path of my executable

The first one contains:

total 665232
-r-xr-xr-x 1 root root 27557743 oct 3 18:50 libmkl_avx.so
-r--r--r-- 1 root root 1190192 oct 3 18:56 libmkl_blacs_ilp64.a
-r--r--r-- 1 root root 1191464 oct 3 18:55 libmkl_blacs_intelmpi_ilp64.a
-r-xr-xr-x 1 root root 497597 oct 3 18:55 libmkl_blacs_intelmpi_ilp64.so
-r--r--r-- 1 root root 676174 oct 3 18:52 libmkl_blacs_intelmpi_lp64.a
-r-xr-xr-x 1 root root 266978 oct 3 18:52 libmkl_blacs_intelmpi_lp64.so
-r--r--r-- 1 root root 674894 oct 3 18:52 libmkl_blacs_lp64.a
-r--r--r-- 1 root root 1218258 oct 3 18:57 libmkl_blacs_openmpi_ilp64.a
-r--r--r-- 1 root root 703010 oct 3 18:53 libmkl_blacs_openmpi_lp64.a
-r--r--r-- 1 root root 1191120 oct 3 18:58 libmkl_blacs_sgimpt_ilp64.a
-r--r--r-- 1 root root 675822 oct 3 18:54 libmkl_blacs_sgimpt_lp64.a
-r--r--r-- 1 root root 425802 oct 3 18:18 libmkl_blas95_ilp64.a
-r--r--r-- 1 root root 421410 oct 3 18:18 libmkl_blas95_lp64.a
-r--r--r-- 1 root root 144770 oct 3 18:58 libmkl_cdft_core.a
-r-xr-xr-x 1 root root 115684 oct 3 18:58 libmkl_cdft_core.so
-r--r--r-- 1 root root 235702018 oct 3 18:42 libmkl_core.a
-r-xr-xr-x 1 root root 16740950 oct 3 18:49 libmkl_core.so
-r-xr-xr-x 1 root root 21582649 oct 3 18:49 libmkl_def.so
-r--r--r-- 1 root root 14983692 oct 3 18:41 libmkl_gf_ilp64.a
-r-xr-xr-x 1 root root 7013718 oct 3 18:49 libmkl_gf_ilp64.so
-r--r--r-- 1 root root 15150468 oct 3 18:41 libmkl_gf_lp64.a
-r-xr-xr-x 1 root root 7058914 oct 3 18:49 libmkl_gf_lp64.so
-r--r--r-- 1 root root 16315738 oct 3 18:42 libmkl_gnu_thread.a
-r-xr-xr-x 1 root root 9724625 oct 3 18:50 libmkl_gnu_thread.so
-r--r--r-- 1 root root 14977248 oct 3 18:41 libmkl_intel_ilp64.a
-r-xr-xr-x 1 root root 7009162 oct 3 18:48 libmkl_intel_ilp64.so
-r--r--r-- 1 root root 15143876 oct 3 18:41 libmkl_intel_lp64.a
-r-xr-xr-x 1 root root 7058382 oct 3 18:48 libmkl_intel_lp64.so
-r--r--r-- 1 root root 2472940 oct 3 18:42 libmkl_intel_sp2dp.a
-r-xr-xr-x 1 root root 1191479 oct 3 18:51 libmkl_intel_sp2dp.so
-r--r--r-- 1 root root 27166142 oct 3 18:42 libmkl_intel_thread.a
-r-xr-xr-x 1 root root 17160874 oct 3 18:50 libmkl_intel_thread.so
-r--r--r-- 1 root root 5348420 oct 3 18:17 libmkl_lapack95_ilp64.a
-r--r--r-- 1 root root 5410628 oct 3 18:16 libmkl_lapack95_lp64.a
-r-xr-xr-x 1 root root 30512153 oct 3 18:50 libmkl_mc3.so
-r-xr-xr-x 1 root root 26419461 oct 3 18:49 libmkl_mc.so
-r-xr-xr-x 1 root root 22977975 oct 3 18:49 libmkl_p4n.so
-r--r--r-- 1 root root 18978606 oct 3 18:42 libmkl_pgi_thread.a
-r-xr-xr-x 1 root root 12096564 oct 3 18:50 libmkl_pgi_thread.so
-r-xr-xr-x 1 root root 4988614 oct 3 18:51 libmkl_rt.so
-r--r--r-- 1 root root 10367718 oct 3 19:06 libmkl_scalapack_ilp64.a
-r-xr-xr-x 1 root root 6575009 oct 3 19:06 libmkl_scalapack_ilp64.so
-r--r--r-- 1 root root 10288808 oct 3 19:02 libmkl_scalapack_lp64.a
-r-xr-xr-x 1 root root 6448577 oct 3 19:06 libmkl_scalapack_lp64.so
-r--r--r-- 1 root root 9873642 oct 3 18:42 libmkl_sequential.a
-r-xr-xr-x 1 root root 5864567 oct 3 18:50 libmkl_sequential.so
-r--r--r-- 1 root root 1048 oct 3 17:17 libmkl_solver_ilp64.a
-r--r--r-- 1 root root 1048 oct 3 17:17 libmkl_solver_ilp64_sequential.a
-r--r--r-- 1 root root 1048 oct 3 17:17 libmkl_solver_lp64.a
-r--r--r-- 1 root root 1048 oct 3 17:17 libmkl_solver_lp64_sequential.a
-r-xr-xr-x 1 root root 6707898 oct 3 18:45 libmkl_vml_avx.so
-r-xr-xr-x 1 root root 2791832 oct 3 18:43 libmkl_vml_def.so
-r-xr-xr-x 1 root root 5474772 oct 3 18:44 libmkl_vml_mc2.so
-r-xr-xr-x 1 root root 5774726 oct 3 18:44 libmkl_vml_mc3.so
-r-xr-xr-x 1 root root 5378513 oct 3 18:44 libmkl_vml_mc.so
-r-xr-xr-x 1 root root 4227747 oct 3 18:43 libmkl_vml_p4n.so
drwxr-xr-x 4 root root 4096 dic 14 14:54 locale



hydroxyprolin
Beginner
77 Views

What is the output of 'ldd FILE' (replace FILE with your application binary)?

aurora
Beginner
77 Views

Hi,
I think that disabling SELINUX all is working already... It is normal that SELINUX blocks dynamic libraries loaded at runtime?
Thanks!
Reply