- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using pardiso solver in c++ under visual studio 2012 (x64). What should be the proper type of pt (int or long int). I cam currently using it as void *. Also I am linking with interface layer lp64. Should I be using ilp64?
When I used it as long int, my run would crash in Release mode, but not in debug mode. However it seems to run fine if I use void *
Thanks
Dinesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The datatype of pt is actually not about lp64 or ilp64, it only about program on which platform. If your program is build with x86, the void* is 4 bytes, if your problem is build with x64 platform, the void* is 8 bytes. According to your problem, void* would be the best solution. If you insist to use integer datatype to define pt, please write your code like below in windows:
#if defined (_WIN64) #define INTEGER long long int #elif defined (_WIN32) #define INTEGER int #endif .... INTEGER pt[64]; ....
If your program is for 64bit integer which means all integer data are saved and calculated as 64bits, then you could use MKL_INT and call 64bits interface pardiso_64 and link with ilp64, otherwise, please use lp64 library.
Best regards,
Fiona
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/* Internal solver memory pointer pt, */
/* 32-bit: int pt[64]; 64-bit: long int pt[64] */
/* or void *pt[64] should be OK on both architectures */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In x86 platform, the size of void* 4 bytes, but in x64 platform is 8 bytes. In windows, for x86, int is same as long(4 bytes); for x64 platform/ 64bits integer(ilp64), please use long long int(8 bytes). But in Linux, long is 8 bytes in x64.
I recommend to use MKL_INT, it's 4 bytes for x86/x64 with lp64; and 8 bytes for x86/x64 with ilp64.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply.
Just to confirm, do you recommend, on Windows x64, link against ilp64 (not lp64), and use MKL_INT as data type for the internal data array (pt) ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The datatype of pt is actually not about lp64 or ilp64, it only about program on which platform. If your program is build with x86, the void* is 4 bytes, if your problem is build with x64 platform, the void* is 8 bytes. According to your problem, void* would be the best solution. If you insist to use integer datatype to define pt, please write your code like below in windows:
#if defined (_WIN64) #define INTEGER long long int #elif defined (_WIN32) #define INTEGER int #endif .... INTEGER pt[64]; ....
If your program is for 64bit integer which means all integer data are saved and calculated as 64bits, then you could use MKL_INT and call 64bits interface pardiso_64 and link with ilp64, otherwise, please use lp64 library.
Best regards,
Fiona

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