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

Using combination ILP64 and 32-bit integers

Arthur_M_
Beginner
264 Views

Hello,

I have an application where I want to use both BLAS routines and PARDISO. All integers I pass to the BLAS routines are 32-bit integers. However, because my matrices can be quite large, the calls to PARDISO I want to make with 64-bit integers.

How can I mix these integer definitions within a single application? In other words, if I am compiling/linking with MSVS2008, what files do I include in each part of my application, what #define variables do I use, and what libraries do I link with? I'm hoping that I can mix ILP64 with non-ILP64 code in the same application. Is that the case?

Thanks.

0 Kudos
3 Replies
Alexander_K_Intel3
264 Views
Hi Arthur, Could you please check if the interface pardiso_64 we have in our LP64 library will work for you. By the way, will using of 64bit in your entire application (eq. for BLAS calls as well) also work for you? Or there are some strong reasons to keep everything else in 32bit integers? This feedback is valuable for us to understand how the model we provide fits needs of users. Thank you, Alexander
0 Kudos
Arthur_M_
Beginner
264 Views
Hi Alexander, A few comments/questions: 1) Do I need the ILP64 library to use pardiso_64? Or is this available in the LP64 library? 2) I have been slowly tempted to move to the DSS interface, for one simple reason: it gives me more feedback, such as the determinant, which the standard pardiso interfac edoes not. Is there an equivalent - say, dss_64 - that I can use that would allow me the combination? 3) Finally, the reason we would like to combine 32-bit integers in the BLAS and 64-bit integers in the linear solver is rather simple: the spec for the BLAS is to take 32-bit integers - most of them a stride (usually set to 1) or something very simple. As a result, we already have calls to the BLAS in literally dozens of calls spread throughout our code. Changing the code to use 64-bit integers is rather painful; doable, but painful. For the time being I have managed to quickly change our calls to 64-bit integer BLAS by playing with our header files (I copy all incoming 32-bit integers into a local 64-bit integer before calling the BLAS. But my fear is the following: what we ship is a library of tools which interface to the BLAS. Our users (programmers themselves) may already be using the BLAS in their own application with 32-bit integers. If we tell them to use the ilp64 library to use our tools we will be forcing them to change their application - something they will never do. So I guess this all comes down to the following questions: (a) if pardiso_64 can be linked with the standard lp64 rather than the ilp64 library; (b) is there a way to extract more statistics from the pardiso_64 interface, such as the determinant? Thanks.
0 Kudos
Alexander_K_Intel2
264 Views
Hi, Arthur, I am another Alexander, but will try to answer you question :) > 1) Do I need the ILP64 library to use pardiso_64? Or is this available in the LP64 library? That's what MKL manual wrote about it: pardiso_64 is an alternative ILP64 (64-bit integer) version of the pardiso routine (see Description section for more details). The interface of pardiso_64 is the same as the interface of pardiso, but it accepts and returns all INTEGER data as INTEGER*8. Use pardiso_64 when pardiso for solving large matrices (with the number of non-zero elements on the order of 500 million or more). You can use it together with the usual LP64 interfaces for the rest of Intel MKL functionality. In other words, if you use 64-bit integer version (pardiso_64), you do not need to re-link your applications with ILP64 libraries. Take into account that pardiso_64 may perform slower than regular pardiso on the reordering and symbolic factorization phase. > 2) I have been slowly tempted to move to the DSS interface, for one simple reason: it gives me more feedback, such as the determinant, which the standard pardiso interfac edoes not. Is there an equivalent - say, dss_64 - that I can use that would allow me the combination? Currently MKL doesn't support interface like dss_64 > So I guess this all comes down to the following questions: (a) if pardiso_64 can be linked with the standard lp64 rather than the ilp64 library; (b) is there a way to extract more statistics from the pardiso_64 interface, such as the determinant? The meaning of input/output parameters of pardiso_64 the same with pardiso, so it doesn't return determinant of stiffness matrix. About your testcase in next topic: I've download it and will investigate it in nearest future, feel free to ping me. With best regards, Alexander Kalinkin
0 Kudos
Reply