Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

MKL10 + Amber9 calling sequence problem

Sangamesh_B_
Beginner
661 Views
Hi,

Installed Amber9 on Intel dual core dual processor woodcrest system with the following:

Intel 10 Fortran Compiler + MKL10 + IntelMPI3.

While running a test job, it gave following error:

MKL func load error: /opt/BLAS_LIBS/Intel-MKL10/lib/em64t/libmkl_vml_mc.so: undefined symbol: vmlGetErrorCallBack
./Run.circdna: Program error

By amber forum it is clear that, MKL10 library has released after amber9 release and it is a calling sequence problem.

So is there a flag which can provide backword compatibility?

--Sangamesh


0 Kudos
4 Replies
TimP
Honored Contributor III
661 Views
It looks more likely that you have encountered a linking error. It could be from a mixture of static and dynamic linking (the docs urge you not to use static), or from a mixture of different library versions (take care that no libraries from MKL are over-ridden by older ones from ifort 10.0 or from an earlier build of Amber).
Even if you use all dynamic libraries correctly for linking, if your run time library path points to an older version of the libraries, that could cause this problem. Did you run the mklvars script from the MKL 10 bin directory to set that path before attempting to run?
It's somewhat difficult to get the linking correct with MKL 10; there are several opportunities to go wrong. We can't guess what you have done, unless you provide specifics, for example what comes on the screen when you link with 'ifort -#x ....'
0 Kudos
Sangamesh_B_
Beginner
661 Views
The error is:
ifort -o addles lesmain.o addspace.o readprm.o writprm.o readcrd.o writcrd.o pick.o rline.o nxt.o intgr.o find.o of.o geti.o unit.o getc.o alert.o echo.o get4c.o getd.o wlesprm.o lesprm.o les2prm.o checksz.o ../lib/random.o ../lib/mexit.o ../lib/nxtsec.o -L/opt/BLAS_LIBS/Intel-MKL10/lib/em64t -lvml -lmkl_lapack -lmkl -lpthread
/opt/BLAS_LIBS/Intel-MKL10/lib/em64t/libmkl_intel_thread.so: undefined reference to `omp_in_parallel'

I think this error is due to -openmp flag.

I've set the LD_LIBRARY_PATH to MKL's em64t also. So it cannot be a linking problem. And there is no other/lower version of MKL is installed.

Errors are continued as follows:
..
...
/opt/BLAS_LIBS/Intel-MKL10/lib/em64t/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_8'
/opt/BLAS_LIBS/Intel-MKL10/lib/em64t/libmkl_intel_thread.so: undefined reference to `__kmpc_fork_call'
/opt/BLAS_LIBS/Intel-MKL10/lib/em64t/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8'
/opt/BLAS_LIBS/Intel-MKL10/lib/em64t/libmkl_intel_thread.so: undefined reference to `__kmpc_push_num_threads'
/opt/BLAS_LIBS/Intel-MKL10/lib/em64t/libmkl_intel_thread.so: undefined reference to `__kmpc_global_thread_num'
/opt/BLAS_LIBS/Intel-MKL10/lib/em64t/libmkl_intel_thread.so: undefined reference to `__kmpc_ok_to_fork'
/opt/BLAS_LIBS/Intel-MKL10/lib/em64t/libmkl_intel_thread.so: undefined reference to `omp_get_max_threads'
...

Do you have a solution for MKL 10 library problem or shall I switch to MKL 8. Because the code works fine with MKL 8.

--Sangamesh
0 Kudos
Andrey_G_Intel2
Employee
661 Views

Sangamesh,

you should made corrections to your commend line:

1) remove -lvml becausein MKL 10.0 this library was merged withlibmkl.so

2) add -lguide because you are using threaded libraries whereIntel OMP functions were used

Andrey

0 Kudos
TimP
Honored Contributor III
661 Views
If you use
ifort -openmp
in your link command, you don't need -lpthread -lguide. Perhaps you mean that you used -openmp when compiling your objects; then you should give ifort the same options for linking, so it will request the corresponding libraries.
0 Kudos
Reply