Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
7234 Discussions

static link problem (mkl 6.1, ic 8.1, Itanium)

zok
Beginner
725 Views
I am trying to build astatically linked code using the above to test how it runs on a different machine where ic 8.1 is not available. When linking with
-L/opt/intel/mkl/lib/64 -lmkl_ipf -lmkl_lapack -lguide -lm -lpthread -static -static-libcxa
the compiler retruns me
/opt/intel/mkl/lib/64/libmkl_lapack.a(dgetrf_omp.o): In function `_dgetrf_omp_269__par_loop0':
dgetrf_omp.o(.text+0x1442): undefined reference to `dtrsm'
/opt/intel/mkl/lib/64/libmkl_lapack.a(dgetrf_omp.o): In function `_dgetrf_omp_319__par_loop1':
dgetrf_omp.o(.text+0x2002): undefined reference to `dtrsm'
What's wrong?Where does OpenMP come from?
There isneither -openmp nor -parallel in the command.
Thanks to all in advance.
0 Kudos
3 Replies
TimP
Honored Contributor III
725 Views
Are you raising 3 or more issues here? I don't see any problem demonstrated, other than your backwards order of library references. As I'm sure you read, mkl itself is build with -openmp.
0 Kudos
zok
Beginner
725 Views
> Are you raising 3 or more issues here?

The _only_ issue I have is how to build a statically linked code using IC 8.x and MKL (i.e. independent portable binary) > I don't see any problem demonstrated, other than your > backwards order of library references. Are you suggesting I should be using -static before mkl? Apart from that my order is exactly the same as in MKL 6.1 tech user notes. > As I'm sure you read, mkl itself is build with -openmp So you are saying there are no two MKLs with and without -openmp. There's only one and this is the reason why -lpthread must be _always_ used to link with MKL. Therefore I might havethe stackproblem because of the Linuxthreads limitations. But I still should be able to build statically, shouldn't I?
0 Kudos
Todd_R_Intel
Employee
725 Views

dgetrf is an LAPACK function that calls dtrsm (a function in the BLAS). So you libmkl_ipf should come after libmkl_lapack. If you got this from the tech user notes you should probably submit a bug.

MKL is built with openmp and the function calls generated by this can be resolved in libguide which you already have on your link line.

-Todd

0 Kudos
Reply