Community
cancel
Showing results for 
Search instead for 
Did you mean: 
abhimodak
New Contributor I
94 Views

MKL error

Hi

Can anyone help why the following error happens:-

Intel MKL FATAL ERROR: Error on loading function mkl_blas_avx2_get_kernel_api_version.

This is appearing when running a program that uses intel MKL (to state the obivous). I am guessing that a (specif version of) library is missing. When the exe is built, it uses /Qmkl: parallel and specifies the mkl_blas libraries (blas and lapack) to be used.

Abhijit

 

0 Kudos
5 Replies
Evarist_F_Intel
Employee
94 Views

Could you please specify the version of Intel MKL used, show the full link-line?

Is the application standalone w/o external dependencies or it uses some extra libraries in addition to MKL?

The error is quite strange. It might appear if different versions of MKL are mixed for some reasons. Could you please double check that this is not the case?

abhimodak
New Contributor I
94 Views

Hi Evarist

No, there are not mixed as far as I understand it but I must be wrong. This error is not happening on Linux. The relevant flags and switches used in compile/link are:

(a) For compilation

OPTIONS = -fPIC -O3 -m64 -D_LINUXX8664 -openmp -mkl=parallel

$(OPTIONS) $(myINCLUDEdir) -nofor_main -fpp $(fppMacros) -I$(MKLROOT)/include/intel64/lp64 -I$(MKLROOT)/include

(b) For the link line, the mk libraries for blas and lapack are picked up with

$(myLIBdir)/libmkl_blas95_lp64.a $(myLIBdir)/libmkl_lapack95_lp64.a -lpthread -lm -mkl=parallel.

The myLIBdir is referring to where I put the library generated from my programs and it also houses the mkl blas and lapack.

Abhijit

Evarist_F_Intel
Employee
94 Views

Hi Abhijit,

/Qmkl:parallel

This error is *not* happening on Linux

OPTIONS = -fPIC -O3 -m64 -D_LINUXX8664 -openmp -mkl=parallel

Sorry, I am a little bit confused: you mentioned flags for Windows as well as flags for Linux. Which OS you actually use? :)

If Windows could you please show the link-line and compilation flags you use there?

If Linux is used, could you please try to use static linking (just for checking): for this use '-static-intel' flag.

Please also specify MKL version (for this you may look at $(MKLROOT)/include/mkl_version.h file).

abhimodak
New Contributor I
94 Views

Hi Evarist

Silly mistake on my part... I meant this error IS happening on Linux and NOT on windows. Hence, I gave all the Linux related flags.

Unfortunately, at this point in time, trying -static-intel is not an option. The error happens on customer's computer and we cannot give one-off shared-objects and continue testing like that.

I don't any file named mkl_version.h in the $(MKLROOT)/include folder. We are using Intel Composer 2015 and whatever mkl version that came with it. 

Abhijit

Evarist_F_Intel
Employee
94 Views

Hi Abhijit,

The error is then really weird.

Luckily this is linux -- easy to debug. Could you please try doing the following on customer's computer:

  • use LD_DEBUG=libs to identify the actual path to MKL library used in the user's application
    • $ LD_DEBUG=libs ./a.out 2>&1 | grep libmkl_core.so
    • $ LD_DEBUG=libs ./a.out 2>&1 | grep libmkl_avx2.so
    • the path libmkl_core.so must be the same as the path to libmkl_avx2.so
  • once you get this path please double check that the symbol mkl_blas_avx2_get_kernel_api_version symbol really exists:
    • $ nm -gA ${ld_debug_reported_path_to_mkl}/libmkl_avx2.so | grep mkl_blas_avx2_get_kernel_api_version
  • if the previous step shows that the symbol exists in the library then using LD_DEBUG=all please find the place where dynamic linker would complain on mkl_blas_avx2_get_kernel_api_version symbol

I believe the situation is as follows: mkl_blas_avx2_get_kernel_api_version appeared in MKL 11.2.2 (composer 2015 u2). For some reasons two version of MKL are mixed: user's application starts with MKL 11.2.2+ but then libmkl_avx2.so is taken from MKL 11.2.1 or early. LD_DEBUG will help us to identify if this is the case.

Another possible root cause might be that dynamic linker could not find libmkl_avx2.so and libmkl_def.so...

Reply