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

Can I use mkl lp64 vs ilp64 together in a singe program?

志强_赵_
Beginner
490 Views

In my program, it has used my other libraries.

I want to use some blas rountines with integer in 64bit. But I don't want to change the other parts of the program.

So, I have to use blas in 64version and 32 version.

 

Is it possible? How can I do.

0 Kudos
1 Solution
mecej4
Honored Contributor III
490 Views

The LP64 and ILP64 libraries contain routine names (e.g., sdot) that are the same, one for one. There is nothing in the name to indicate whether integer arguments are 4 or 8 bytes long. If the linker is presented with both sets of libraries, it has no basis for selecting one from each pair of routines. So, no, what you want is not possible given the present structure of the MKL libraries. You can, however, build your own custom library using the desired .OBJ files extracted from the MKL libraries, and specify to the linker that this library should be searched first.

View solution in original post

0 Kudos
3 Replies
mecej4
Honored Contributor III
491 Views

The LP64 and ILP64 libraries contain routine names (e.g., sdot) that are the same, one for one. There is nothing in the name to indicate whether integer arguments are 4 or 8 bytes long. If the linker is presented with both sets of libraries, it has no basis for selecting one from each pair of routines. So, no, what you want is not possible given the present structure of the MKL libraries. You can, however, build your own custom library using the desired .OBJ files extracted from the MKL libraries, and specify to the linker that this library should be searched first.

0 Kudos
志强_赵_
Beginner
490 Views

 

Thanks a lot, I'm trying it

mecej4 wrote:

The LP64 and ILP64 libraries contain routine names (e.g., sdot) that are the same, one for one. There is nothing in the name to indicate whether integer arguments are 4 or 8 bytes long. If the linker is presented with both sets of libraries, it has no basis for selecting one from each pair of routines. So, no, what you want is not possible given the present structure of the MKL libraries. You can, however, build your own custom library using the desired .OBJ files extracted from the MKL libraries, and specify to the linker that this library should be searched first.

0 Kudos
志强_赵_
Beginner
490 Views

 

Thanks a lot, I'm trying it

mecej4 wrote:

The LP64 and ILP64 libraries contain routine names (e.g., sdot) that are the same, one for one. There is nothing in the name to indicate whether integer arguments are 4 or 8 bytes long. If the linker is presented with both sets of libraries, it has no basis for selecting one from each pair of routines. So, no, what you want is not possible given the present structure of the MKL libraries. You can, however, build your own custom library using the desired .OBJ files extracted from the MKL libraries, and specify to the linker that this library should be searched first.

0 Kudos
Reply