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

Error in simmetric sparse matrix analysis step

Paul_O_
Beginner
532 Views

I am a new user of a MKL, so question will be silly.
I am trying to use pardiso_64 function to solve a system with symmetric sparse matrix.
IDE is MS VS 2013, language is C++. Matrix size in test case is relatively small (about 4000 of rows).

Here is an error i am getting.



I read documentation about pardiso solvers, and as fas as i see, error -8 is an 32-bit integer overflow, but that doesn't make sense in my case.
What are the possible reasons and where should i start to locate an error?


Source code attached.


Thanks in advance.

0 Kudos
7 Replies
Gennady_F_Intel
Moderator
532 Views

Have you set all integer inputs as 64-bit ?

0 Kudos
Paul_O_
Beginner
532 Views

Gennady Fedorov (Intel) wrote:

Have you set all integer inputs as 64-bit ?



I use double for floating point inputs and MKL_INT for integers.
MKL_INT is defined as __int64 in mkl_types.h.

0 Kudos
mecej4
Honored Contributor III
532 Views

what are the contents of include file "solver.h"? We need that file in order to compile solver.cpp.

0 Kudos
Paul_O_
Beginner
532 Views

mecej4 wrote:

what are the contents of include file "solver.h"? We need that file in order to compile solver.cpp.



Here it is.

UPDATE:
Correct header uploaded, name differs because of upload system, i guess.

0 Kudos
Ying_H_Intel
Employee
532 Views

Hi Paul, 

For the error message, it seems you get -1 -1: Input inconsistency at first phase, phase = 11;  

ia[neqns]-1=2220 , neqns=3369.   is neqns the equation number?  is the matrix  MKL_INT mtype = 2; // 2        real and symmetric positive definite

And how do you link MKL, is it X64 project, then IPL64 + MKL option is on. 

As your test matrix is not bigger, have you tried to use pardiso ( X64 project + MKL option)? 

Best Regards,

Ying 

0 Kudos
Ying_H_Intel
Employee
532 Views

Hi Paul, 

I happened to see the same issue in https://software.intel.com/en-us/forums/topic/489205  ( in Quota 7& 25) 

 The discussion thread  is long, but there are two key points with the errors ( other is about the  Jacobin matrix has the zero rows)

1. zero based CSR format    

( you set iparm[34] = 1; /* = 1 for zero-based indexing; = 0 for one-based indexing */1,  // PARDISO: use C-style indexing for ia and ja arrays.)

The basic rule is that Last element of ia is equal to number of nonzero elements in case of zero based numbering and number of nonzero elements + 1 in case of 1 based format.

For example, in 489205, it has 459 equation, and  4746 nonzero elements, so the ia[459]=4746, not 4747.  so with his ia.txt and phase 11 pardiso, he will get the error . 

val: 0.020833
ia: 4739 /t ia[n+1]: 4747
*** Error in PARDISO  (incorrect input matrix  ) error_num= 22
*** Input check: i=4746, ja=-33686019, neqns=458 are incompatible

 

If change the ia[459] = 4746, the phase 11 will pass. . 

2. ignore the phase steps..  (the last steps). 

For example, if jared just call Phase 331 no Phase 1 and Phase 2.  He will get the error as your. 

val: 0.020833
ia: 4739 /t ia[n+1]: 4747
*** Error in PARDISO  ( sequence_ido,parameters) error_num= 8
*** Input check: ia[neqns]_new -1 _old -1 are incompatible
*** Input parameters: inconsistent error= 8 max_fac_store_in: 1
          matrix_number_in: 1 matrix_type_in: 11
          ido_in          : 331 neqns_in      : 459
          ia[neqns_in]-1  : -1 nb_in         : 1

• Phase 1: Fill-reduction analysis and symbolic factorization

Sparse Solver Routines8
2351
• Phase 2: Numerical factorization
• Phase 3: Forward and Backward solve including optional iterative
refinement
This phase can be divided into two or three separate substitutions:
forward, backward, and diagonal (see Separate Forward and Backward
Substitution).
• Memory release phase (phase= 0 or phase= -1)
 

So please pay attention the two places and let us know if any news. 

Best Regards,

Ying 

0 Kudos
Paul_O_
Beginner
532 Views

Ying H (Intel) wrote:

Hi Paul, 

I happened to see the same issue in https://software.intel.com/en-us/forums/topic/489205  ( in Quota 7& 25) 

 The discussion thread  is long, but there are two key points with the errors ( other is about the  Jacobin matrix has the zero rows)

1. zero based CSR format    

...

2. ignore the phase steps..  (the last steps). 

 


Hi, mr. Ying!

Thanks you very much for your attention!
Your advices were very useful - in my case error was a result of incorrect ia and ja arrays. As you said, I checked last index in ia array.
Base on indexing was correct, error was completely on my side: ia and ja arrays were swapped in input parameters.
After fixing it pardiso worked just fine.

Best regards, Paul.

 

0 Kudos
Reply