Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6592 Discussions

Run pasrdisosolver. CPP to call pardisoinit(pt, &mtype, iparm); Throws an exception after a function

MRSPai
Beginner
586 Views

the error is:0x00000001801151D8 (libpardiso600-WIN-X86-64.dll)处(位于 Surface_Mesh.exe 中)引发的异常: 0xC0000005: 写入位置 0x00007FF92CCD098D 时发生访问冲突。

 

void PardisoSolver::pardiso_init()
{
mtype = -2;
max_fct = 1;
mnum = 1;

msglvl = 0;
error = 0;
if (mtype == -1)
throw std::runtime_error("Pardiso mtype not set.");

 

for (i = 0; i < 64; i++)
{
pt[i] = 0;
}

 

result.clear();
result.resize(num, 0);

nrhs = 1;
error = 0;
solver = 0;/* use sparse direct solver */

 

pardisoinit(pt, &mtype, iparm);

 

 

for (i = 0; i < num + 1; i++) {   //This is where the exception is flagged
ia[i] += 1;

}
for (i = 0; i < nnz; i++) {
ja[i] += 1;
}

phase = 11;

pardiso(pt, &max_fct, &mnum, &mtype, &phase,
&num, a.data(), ia.data(), ja.data(), &idum, &nrhs,
iparm, &msglvl, &ddum, &ddum, &error);       

//And when I comment out the first one, it's going to report an error here again

 

if (error != 0) {
printf("\nERROR during symbolic factorization: %d", error);
exit(1);
}
}

 

 

I don't know if it's mKL_pardiso.h or something else, is it related to the MKL version? My version is compilers_and_libraries_2017.1.143

 

Labels (1)
0 Kudos
6 Replies
mecej4
Black Belt
571 Views

You appear to be mixing calls to the Pardiso routines in MKL with calls to the Basel-Lugano version of Pardiso (www.pardiso-project.org). Although the two versions have common origins, they are not mutually interchangeable.

MRSPai
Beginner
562 Views

Maybe you're right, but the pardisoSolver.h 

#include <vector>
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include "mkl_pardiso.h"
#include "mkl_types.h"
#include"mkl.h"

Need mkl_pardiso.h.I don't know where to find this header except Intel MKL

mecej4
Black Belt
552 Views

I concluded that you used the Basel-Lugano Pardiso since the reported error message refers to libpardiso600-WIN-X86-64.dll. That DLL is definitely not part of MKL.

MKL comes with several examples of calling MKL-Pardiso from C and Fortran. The MKL documentation of calls to MKL routines indicates which MKL header files are associated with each MKL routine, including pardisoinit() and pardiso().

MRSPai
Beginner
542 Views

I see what you mean. Thank you very much. I'll give it a try

MRSPai
Beginner
497 Views

I tried as hard as I could, and that's exactly what you said, but if I delete the libpardiso600-WIN-X86-64.dll, the program will report a missing error, but if it's there, I can't fix it. How do I make it exist in the project but not call it in the function?Is there any way you can tell me?

mecej4
Black Belt
495 Views

Please make up your mind as to whether you wish to use either the MKL version or the Basel-Lugano version of Pardiso. Once you select one of the two, build and run your program using that version, and only that version. The details of how to do build and run depend on whether you use the command line or Visual Studio, but the basic rules are straightforward.

In short, for each external routine that your program calls, there should be only one library that provides that routine.

Reply