- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
void* pt[64] = {};
int mtype = 11;
int iparm[64] = {};
iparm[0] = 1;
iparm[1] = 2;
iparm[2] = 0;
iparm[3] = 0;
iparm[4] = 0;
iparm[5] = 0;
iparm[6] = 0;
iparm[7] = 2;
iparm[8] = 0;
iparm[9] = 13;
iparm[10] = 1;
iparm[11] = 0;
iparm[12] = 1;
iparm[13] = 0;
iparm[14] = 0;
iparm[15] = 0;
iparm[16] = 0;
iparm[17] = -1;
iparm[18] = -1;
iparm[19] = 0;
iparm[20] = 0;
iparm[26] = 1;
iparm[27] = 0;
iparm[34] = 1;
iparm[36] = 0;
iparm[59] = 0;
int maxfct = 1, mnum = 1;
const int n = 1;
double a[n] = {1};
int ia[n + 1] = {0, 1};
int ja[n] = {0};
int perm[n];
const int nrhs = 1;
int msglvl = 1;
double b[n * nrhs] = {3};
double x[n * nrhs];
int error;
int phase = 13;
pardiso(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, perm, &nrhs,
iparm, &msglvl, b, x, &error);
std::cout << error << std::endl;
Hello. I'm new to pardiso. This example always give me -1. What would be the error?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kwon,
Thanks for reaching out to us.
I tried executing the provided code (please see the attached VS project file) both in Windows and Linux environments and could see that the error value is '0'.
Maybe you can give us the complete project file (if the code that you have provided is missing something) so that we can test that as well.
In general, if you see pardiso returns an error value of -1 it means that the input is inconsistent. Here is the link from where you can get to know more about the error values and what they mean.
>>I'm new to pardiso
You can always refer to the mkl examples that come with the installation under the below paths
"C:\Program Files (x86)\Intel\oneAPI\mkl\latest\examples\examples_dpcpp\dpcpp" for Windows
"/opt/intel/oneapi/mkl/latest/examples/dpcpp" for linux
Please get back to us if you face any issues.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. I have a fix.
target_compile_options(pardisotest PUBLIC ${MKL_C_COPT})
Changing to this line made it work. I am not using DPCPP, just CPP. MKLConfig.cmake lacks compiler options for CXX, which leaves MKL_ILP64 undefined, breaking mkl.
What would be the correct solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kwon,
Thanks for providing the details.
Please find the attached file which contains the sample CMakeLists.txt which was taken from the mkl developer guide https://www.intel.com/content/www/us/en/develop/documentation/onemkl-windows-developer-guide/top/getting-started/cmake-config-for-onemkl.html and the pardiso_sym.c file from samples in mkl examples folder.
Steps followed
>> cmake .. -G Ninja -DCMAKE_C_COMPILER=icl/icx
>> cmake --build .
>> *.exe
After doing the above steps we can now see the output with out any errors.
Regarding the compiler options, I would advise you to go through the Readme file under C:\Program Files (x86)\Intel\oneAPI\mkl\2022.2.1\examples location which gives information about all the supported compiler options.
Also please note that the oneMKL library provides Fortran and C programming language interfaces. oneMKL C language interfaces can be called from applications written in either C or C++, as well as in any other language that can reference a C interface.
Reference link: https://www.intel.com/content/www/us/en/develop/documentation/onemkl-windows-developer-guide/top.html
Please try the attached CMakeLists file and do let us know if you have any concerns.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kwon,
As we haven't heard back from you, could you please provide us with an update regarding this issue? Please get back to us if you have any queries.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kwon,
As we haven't heard back from you, we are closing this thread. Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.
Regards,
Vidya.
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page