- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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'
/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.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page