Hi, I've been using dlasrt2 with the API
void dlasrt2 (char *id , MKL_INT *n , double *d , MKL_INT *key , MKL_INT *info );
however i wonder if we can link directly to fortran counterpart to have int keys or if there is a way to feed (4byte) integer variables to this function as keys, the issue is that right now MKL_INT is a (long long) which takes huge amount of memory for the case i'm running where n=1e10. However i need MKL_INT to be ilp64 because of other calls (dgemm with huge matrix size).
The problem is, if you write these two functions into one source code, even you redefine MKL_INT to size_t that use int for ?lasrt, and use long long for ?gemm, you must link lp64 or ilp64 translating source code as binary to execute. How could you set some part to use 32bits but the other part to use 64bits within one binary file? Once you compile with 64bits, the INT type will be actually translated into int64, and it could not support for 32bit compiling & translation.
You could only separate these two function into two source files, one is compiled with lp64 to generate 32bit binary & the other one is compiled with ilp64 to generate 64bit binary. And execute two binary files.
Thanks for your thorough explanation. In the 64bit program I was hoping to just use regular int variable which is still 4bytes in the 64bit code and link to scalapack with lp64 for the ?lasrt2 , and for ?gemm use long long and link to mkl_intel_ilp64, as i thought the difference would be just how the mkl (lp64) interprets integer argument it won't be an issue because those arguments would already be defined using 4byte integers.