Cannot load mkl libraries ( libmkl_mc3.so, libmkl_def.so )

1,064 views
Skip to first unread message

J Kokotinis

unread,
Jul 15, 2019, 10:13:57 AM7/15/19
to kaldi-help
I tried to upgrade the kaldi in an already running environment.

When I try to run the decoding scripts I get the error below:

Intel MKL FATAL ERROR: Cannot load libmkl_mc3.so or libmkl_def.so.


MKL is installed through the tools/extras/install_mkl.sh script.


export LD_PRELOAD=/opt/intel/mkl/lib/intel64/libmkl_core.so:/opt/intel/mkl/lib/intel64/libmkl_sequential.so:/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so:/opt/intel/mkl/lib/intel64/libiomp5.so:/opt/intel/mkl/lib/intel64/libmkl_mc3.so:/opt/intel/mkl/lib/intel64/libmkl_def.so


Anybody else got this problem? Is there any way to fix it, or should I downgrade kaldi?

Thanks!

Jan Trmal

unread,
Jul 15, 2019, 10:44:10 AM7/15/19
to kaldi-help
I'm vague on using LD_PRELOAD, I don't think it does what you think it does (but I might be mistaken), but I would suggest setting export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/mkl/lib/intel64/
y.

--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
To post to this group, send email to kaldi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/02e09cbb-319a-4e60-b579-e5e648f50c75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Povey

unread,
Jul 15, 2019, 1:52:17 PM7/15/19
to kaldi-help
I'm wondering why this  happened in the first place.. it should just work, by design.  Perhaps they introduced new libraries
and we need to change the configure script?  Try to find where those missing libraries are located, and do `ldd some-kaldi-binary` to
see where Kaldi is getting the libraries from.


J Kokotinis

unread,
Jul 16, 2019, 2:14:15 AM7/16/19
to kaldi-help
Thanks for the reply,

Unfortunately this didn't resolve my issue.
It is a bit weird, since in another system I have the same kaldi build and the same decoding code the export LD_PRELOAD solved the issue. So I guess it is something missing from the system?

Τη Δευτέρα, 15 Ιουλίου 2019 - 5:44:10 μ.μ. UTC+3, ο χρήστης Yenda έγραψε:
I'm vague on using LD_PRELOAD, I don't think it does what you think it does (but I might be mistaken), but I would suggest setting export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/mkl/lib/intel64/
y.

On Mon, Jul 15, 2019 at 10:14 AM J Kokotinis <jkoko...@gmail.com> wrote:
I tried to upgrade the kaldi in an already running environment.

When I try to run the decoding scripts I get the error below:

Intel MKL FATAL ERROR: Cannot load libmkl_mc3.so or libmkl_def.so.


MKL is installed through the tools/extras/install_mkl.sh script.


export LD_PRELOAD=/opt/intel/mkl/lib/intel64/libmkl_core.so:/opt/intel/mkl/lib/intel64/libmkl_sequential.so:/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so:/opt/intel/mkl/lib/intel64/libiomp5.so:/opt/intel/mkl/lib/intel64/libmkl_mc3.so:/opt/intel/mkl/lib/intel64/libmkl_def.so


Anybody else got this problem? Is there any way to fix it, or should I downgrade kaldi?

Thanks!

--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi...@googlegroups.com.

J Kokotinis

unread,
Jul 16, 2019, 2:16:34 AM7/16/19
to kaldi-help
Thanks for the reply,

I am using the onlinegmmdecodefaster for my decoding process

ldd /root/kaldi/kaldi/src/onlinebin/online-gmm-decode-faster
        linux
-vdso.so.1 =>  (0x00007ffc191ea000)
        libkaldi
-online.so => /root/kaldi/kaldi/src/lib/libkaldi-online.so (0x00007f88b0a30000)
        libkaldi
-decoder.so => /root/kaldi/kaldi/src/lib/libkaldi-decoder.so (0x00007f88b0660000)
        libkaldi
-hmm.so => /root/kaldi/kaldi/src/lib/libkaldi-hmm.so (0x00007f88b0390000)
        libkaldi
-feat.so => /root/kaldi/kaldi/src/lib/libkaldi-feat.so (0x00007f88b0160000)
        libkaldi
-gmm.so => /root/kaldi/kaldi/src/lib/libkaldi-gmm.so (0x00007f88aff24000)
        libkaldi
-util.so => /root/kaldi/kaldi/src/lib/libkaldi-util.so (0x00007f88afce9000)
        libkaldi
-matrix.so => /root/kaldi/kaldi/src/lib/libkaldi-matrix.so (0x00007f88afa4c000)
        libkaldi
-base.so => /root/kaldi/kaldi/src/lib/libkaldi-base.so (0x00007f88af83f000)
        libfst
.so.10 => /root/kaldi/kaldi/tools/openfst-1.6.7/lib/libfst.so.10 (0x00007f88af046000)
        libstdc
++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f88aecc4000)
        libgcc_s
.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f88aeaae000)
        libc
.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f88ae6e4000)
        librt
.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f88ae4dc000)
        libpthread
.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f88ae2bf000)
        libm
.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f88adfb6000)
        libkaldi
-lat.so => /root/kaldi/kaldi/src/lib/libkaldi-lat.so (0x00007f88adbb7000)
        libkaldi
-fstext.so => /root/kaldi/kaldi/src/lib/libkaldi-fstext.so (0x00007f88ad983000)
        libkaldi
-tree.so => /root/kaldi/kaldi/src/lib/libkaldi-tree.so (0x00007f88ad72f000)
        libkaldi
-transform.so => /root/kaldi/kaldi/src/lib/libkaldi-transform.so (0x00007f88ad4f4000)
        libmkl_intel_lp64
.so => /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007f88ac9a6000)
        libmkl_core
.so => /opt/intel/mkl/lib/intel64/libmkl_core.so (0x00007f88a881a000)
        libmkl_sequential
.so => /opt/intel/mkl/lib/intel64/libmkl_sequential.so (0x00007f88a726e000)
        libdl
.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f88a706a000)
       
/lib64/ld-linux-x86-64.so.2 (0x00007f88b0c88000)



Τη Δευτέρα, 15 Ιουλίου 2019 - 8:52:17 μ.μ. UTC+3, ο χρήστης Dan Povey έγραψε:
I'm wondering why this  happened in the first place.. it should just work, by design.  Perhaps they introduced new libraries
and we need to change the configure script?  Try to find where those missing libraries are located, and do `ldd some-kaldi-binary` to
see where Kaldi is getting the libraries from.


On Mon, Jul 15, 2019 at 7:44 AM Jan Trmal <jtr...@gmail.com> wrote:
I'm vague on using LD_PRELOAD, I don't think it does what you think it does (but I might be mistaken), but I would suggest setting export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/mkl/lib/intel64/
y.

On Mon, Jul 15, 2019 at 10:14 AM J Kokotinis <jkoko...@gmail.com> wrote:
I tried to upgrade the kaldi in an already running environment.

When I try to run the decoding scripts I get the error below:

Intel MKL FATAL ERROR: Cannot load libmkl_mc3.so or libmkl_def.so.


MKL is installed through the tools/extras/install_mkl.sh script.


export LD_PRELOAD=/opt/intel/mkl/lib/intel64/libmkl_core.so:/opt/intel/mkl/lib/intel64/libmkl_sequential.so:/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so:/opt/intel/mkl/lib/intel64/libiomp5.so:/opt/intel/mkl/lib/intel64/libmkl_mc3.so:/opt/intel/mkl/lib/intel64/libmkl_def.so


Anybody else got this problem? Is there any way to fix it, or should I downgrade kaldi?

Thanks!

--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi...@googlegroups.com.

To post to this group, send email to kaldi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/02e09cbb-319a-4e60-b579-e5e648f50c75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Go to http://kaldi-asr.org/forums.html find out how to join
---
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi...@googlegroups.com.

Daniel Povey

unread,
Jul 16, 2019, 2:09:32 PM7/16/19
to kaldi-help
I notice that in makefiles/linux_x86_64_mkl.mk we have the following:

## Use the following for DYNAMIC LINKING of the SEQUENTIAL version of MKL
MKL_DYN_SEQ = -L$(MKLLIB) -lmkl_solver_lp64_sequential -Wl,--start-group \
        -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread

## Use the following for DYNAMIC LINKING of the MULTI-THREADED version of MKL
MKL_DYN_MUL = -L$(MKLLIB) -lmkl_solver_lp64 -Wl,--start-group -lmkl_intel_lp64 \
        -lmkl_intel_thread -lmkl_core -Wl,--end-group -liomp5 -lpthread

Those will get passed through to kaldi.mk when we configure with MKL.

We probably got these from some kind of mkl-configurator thing, like this
 I think they must have added more libraries since we created that.  
Could you please try to figure out from that web page what extra things we might need
to add to that link line?  We might have to add a dependency on the MKL version or something like that.

Dan


To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.

To post to this group, send email to kaldi...@googlegroups.com.

J Kokotinis

unread,
Jul 22, 2019, 6:49:34 AM7/22/19
to kaldi-help
Unfortunately I could not solve the issue.

Downgraded to a previous build of Kaldi without the mlk libs and it worked.

The system I had the issue on:

OS: Ubuntu 16.04.6 LTS
Architecture: x86_64
CPU: Intel(R) Xeon(R) CPU X5650 @2.67GHz
GPU: ATI ES1000

Daniel Povey

unread,
Jul 22, 2019, 2:55:54 PM7/22/19
to kaldi-help
You didn't need to downgrade Kaldi, the 'configure' script supports options to use different libraries.
Anyway, if /opt/intel/mkl/lib/intel64 (or whatever the install directory was) was on your LD_LIBRARY_PATH, it should
just have worked.  Maybe you had a broken or mismatching MKL installation.  That directory should contain libmkl_mc.so and libmkl_mc3.so. I think they may be loaded dynamically based on the instruction set that's detected, they are for
different versions of the SSE instruction set or something like that.



Dan

To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kaldi-help/bd22ffa0-c332-4425-9385-c06b1b739c81%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages