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

Input error in Pardiso error_num= 15

Baorui_C_
Beginner
1,287 Views

Hi!


I am a new user. When I try to compile my fortran code in Pardiso. I got some errors.


 *** Error in Pardiso < sequence_ido,parameters> error_num= 15


*** Input check: matrix_type_new 0 <out of bounds>


*** Input parameters: inconsistent error= 15 max_fac_store_in:1


     matrix_number_in: 1 matrix_type_in: 0


     ido_in                   : 33 neqns_in       : 10000


     ia<neqns_in+1>-1: 0 nb_in              : 1

 

SOLVE COMPLETED ...

 
 
My CSR fie is 1-based format and my sparse matrix is a complex structurally symmetrical matrix.
I have print my CSR and carefully check. I believe there is nothing wrong.
I do not set any IPARM parameters and just use the pardisoinit and pardiso subroutine.
 
Here is my part of the code and parameters.
 	MTYPE     =  3  ! COMPLEX STRUCTUALLY SYMMETRIC
        SOLVER    =  0  ! USE SPARSE DIRECT METHOD
       
      CALL PARDISOINIT(PT, MTYPE, SOLVER, IPARM, DPARM, ERROR)
        IF (ERROR .NE. 0) THEN
        IF (ERROR.EQ.-10 ) WRITE(*,*) 'NO LICENSE FILE FOUND'
        IF (ERROR.EQ.-11 ) WRITE(*,*) 'LICENSE IS EXPIRED'
        IF (ERROR.EQ.-12 ) WRITE(*,*) 'WRONG USERNAME OR HOSTNAME'
        STOP
      ELSE
        WRITE(*,*) '[PARDISO]: LICENSE CHECK WAS SUCCESSFUL ... '
      END IF
    
        MAXFCT    =  1
        MNUM      =  1
        PHASE     =  33
        MSGLVL    =  1
        NRHS      =  1
        
      CALL PARDISO (PT, MAXFCT, MNUM, MTYPE, PHASE, 10000, A1, A3, A2,&
                    PERM, NRHS, IPARM, MSGLVL, S, X, ERROR, DPARM)
      WRITE(*,*) 'SOLVE COMPLETED ... '

 

Could you give me some suggestion and help? Thanks for your time and attention!
 
Sincerely,
Baorui
0 Kudos
13 Replies
Alexander_K_Intel2
1,287 Views

Hi,

Looks like your A1 array is a bit incorrect. Could you provide A1(10001) value?

Thanks,

Alex

0 Kudos
Baorui_C_
Beginner
1,287 Views

Thanks for your reply.

A1 is the non-zero items in this sparse matrix.

0 Kudos
Alexander_K_Intel2
1,287 Views

Sorry for mistake, I've asked about ia - A3 in your term

Thanks

Alex

0 Kudos
Baorui_C_
Beginner
1,287 Views

Here is my ia part- A3. I add another column to indicate the number of row. I also attached A2 and right hand part S here.

A1-A

A2-JA

A3-IA

S- Right hand part

0 Kudos
Alexander_K_Intel2
1,287 Views

Ok, the solution is more simple - you need to call reorder and factorization steps before 33 phase, so change ido=33 to ido=13

Thanks,

Alex

0 Kudos
Baorui_C_
Beginner
1,287 Views

Hi Alex,

I change PHASE= 33 TO PHASE=13, but got the same result. Could you provide more detail information?

I also had a try to call pardiso twice. Just like:

CALL Pardisoinit(...)

PHASE=13

CALL Pardiso(....)

PHASE=33

CALL Pardiso(...)

However, I still got the same errors.

Thanks a lot!
 

Baorui

0 Kudos
Alexander_K_Intel2
1,287 Views

Hi,

Am i correct that you use UB PARDISO but not MKL? I ask because I checked you issue on MKL version of PARDISO and it work correctly after switching ido from 33 to 13.

Thanks,

Alex

0 Kudos
Baorui_C_
Beginner
1,287 Views

Alex,

Thanks for your reply and remind.

Right now I could run it but not get the results under MKL Pardiso. However I have some new problems. I have been stuck here a few days.

Here is my present code:

      MTYPE     =  13
      SOLVER    =  0
      MAXFCT    =  1
      MNUM      =  1
      MSGLVL    =  0
      NRHS      =  1
      MSGLVL    =  0
   
      CALL PARDISOINIT(PT, MTYPE, SOLVER, IPARM, DPARM, ERROR)
    
      WRITE(*,*) 'PARDISOINIT WAS SUCCESSFUL ... '
   
      PHASE     =  13

      CALL PARDISO (PT, MAXFCT, MNUM, MTYPE, PHASE, TD**2, A1, A3, A2,&
                    PERM, NRHS, IPARM, MSGLVL, S, X, ERROR, DPARM)
  
      WRITE(*,*) 'CALCULATION COMPLETED ... '

      PHASE     = -1        ! RELEASE INTERNAL MEMORY
      CALL PARDISO (PT, MAXFCT, MNUM, MTYPE, PHASE, TD**2, A1, A3, A2,&
                    PERM, NRHS, IPARM, MSGLVL, S, X, ERROR, DPARM)

It looks working well. But when I set the break point. I found it seems that the subroutine does not get the values. Most of local variables are undefined address.

Here I also add my first a few lines and declarations.

INCLUDE 'MKL_PARDISO.F90'
PROGRAM FMODELING
IMPLICIT NONE

REAL*8,PARAMETER      :: PI=3.1415926
INTEGER*8,PARAMETER :: BD=9,TD=100,V=3000,H=10              
INTEGER*8  N1,N2,I,J,CPML,IDUM
INTEGER*8  IPARM(64),PERM(TD**2),PT(64),ERROR,MAXFCT,MNUM,MTYPE,PHASE,NRHS,MSGLVL,SOLVER                        
REAL*8     DFUNCTION,A2(9*TD**2-12*TD+4),A3(TD**2+1),DPARM(64),DDUM           
COMPLEX*8  WB,A1(9*TD**2-12*TD+4),S(TD**2,1),X(TD**2,1)
REAL*8     B1,C,D1,W,WM

 Maybe my problem  is a small and simple. But I hope it will be helpful for the other guys.

Thanks again and have a great day!

Baorui

 

 

0 Kudos
Alexander_K_Intel2
1,287 Views

Hi Baorui,

MKL PARDISO and UB pardiso have a bit different interface, for example MKL pardiso have not support dparm parameter - please details here https://software.intel.com/en-us/articles/intel-math-kernel-library-documentation

Thanks,

Alex

 

0 Kudos
Baorui_C_
Beginner
1,287 Views

Hi Alex,

 

Thanks a lot for your attention.

 

I confused with MKL Pardiso and UB Pardiso. Right now I change my code to MKL Pardiso and it gives me some responses.

 

I also found small mistakes in my input file. Could you give me some tips about the following results please? Because all my results are 0.

 

*** Error in PARDISO  (        reordering_phase) error_num= -180

*** error PARDISO: reordering, symbolic factorization

 

=== PARDISO: solving a complex nonsymetric system ===

The local (internal) PARDISO version is                          : 103911000

Matrix checker is turned ON

PARDISO double precision computation is turned ON

User provided fill-in reducing permutation is turned ON

 

 

Summary: ( starting phase is reordering, ending phase is solution )

================

 

Times:

======

Time spent in calculations of symmetric matrix portrait (fulladj): 0.001174 s

Time spent in reordering of the initial matrix (reorder)         : 0.000010 s

Time spent in symbolic factorization (symbfct)                   : 0.000833 s

Time spent in allocation of internal data structures (malloc)    : 0.001455 s

Time spent in additional calculations                            : 0.000875 s

Total time spent                                                 : 0.004347 s

 

Statistics:

===========

< Parallel Direct Factorization with number of processors: > 2

< Numerical Factorization with BLAS3 and O(n) synchronization >

 

< Linear system Ax = b >

             number of equations:           10000

             number of non-zeros in A:      88805

             number of non-zeros in A (): 0.088805

 

             number of right-hand sides:    1

 

< Factors L and U >

< Preprocessing with multiple minimum degree, tree height >

< Reduction for efficient parallel factorization >

             number of columns for each panel: 96

             number of independent subgraphs:  0

< Preprocessing with input permutation >

             number of supernodes:                    10000

             size of largest supernode:               1

             number of non-zeros in L:                14999

             number of non-zeros in U:                4999

             number of non-zeros in L+U:              19998

             gflop   for the numerical factorization: 0.000000

 

My call-subroutine code and parameters:

     MTYPE     =  13


      SOLVER    =  0

      MAXFCT    =  1

      MNUM      =  1

      MSGLVL    =  1

      NRHS      =  1

      PHASE     =  13

      ERROR = 0 ! INITIALIZE ERROR FLAG

     

      DO I = 1, 64

         IPARM(I) = 0

      END DO

     

      IPARM(1) = 1 ! NO SOLVER DEFAULT

      IPARM(2) = 2 ! FILL-IN REORDERING FROM METIS

      IPARM(3) = 1 ! NUMBERS OF PROCESSORS, VALUE OF OMP_NUM_THREADS

      IPARM(4) = 0 ! NO ITERATIVE-DIRECT ALGORITHM

      IPARM(5) = 0 ! NO USER FILL-IN REDUCING PERMUTATION

      IPARM(6) = 0 ! =0 SOLUTION ON THE FIRST N COMPOMENTS OF X

      IPARM(7) = 0 ! NOT IN USE

      IPARM(8) = 2 ! NUMBERS OF ITERATIVE REFINEMENT STEPS

      IPARM(9) = 0 ! NOT IN USE

      IPARM(10) = 13 ! PERTURBE THE PIVOT ELEMENTS WITH 1E-13

      IPARM(11) = 1 ! USE NONSYMMETRIC PERMUTATION AND SCALING MPS

      IPARM(12) = 0 ! NOT IN USE

      IPARM(13) = 1 ! MAXIMUM WEIGHTED MATCHING ALGORITHM IS SWITCHED-ON (DEFAULT FOR NON-SYMMETRIC).

      IPARM(14) = 0 ! OUTPUT: NUMBER OF PERTURBED PIVOTS

      IPARM(15) = 0 ! NOT IN USE

      IPARM(16) = 0 ! NOT IN USE

      IPARM(17) = 0 ! NOT IN USE

      IPARM(18) = -1 ! OUTPUT: NUMBER OF NONZEROS IN THE FACTOR LU

      IPARM(19) = -1 ! OUTPUT: MFLOPS FOR LU FACTORIZATION

      IPARM(20) = 0 ! OUTPUT: NUMBERS OF CG ITERATIONS

      IPARM(27) = 1 !MATRIX CHECKER!

     

      !IPARM(15) = 1 !MEMEORY CHECKER!

      !IPARM(60) = 2

     

      CALL PARDISO (PT,MAXFCT,MNUM,MTYPE,PHASE,TD**2,A1,A3,A2,PERM,NRHS,IPARM,MSGLVL,S,X,ERROR)




      PHASE     = -1        ! RELEASE INTERNAL MEMORY

      CALL PARDISO (PT,MAXFCT,MNUM,MTYPE,PHASE,TD**2,A1,A3,A2,PERM,NRHS,IPARM,MSGLVL,S,X,ERROR)

Sincerely,

Baorui

0 Kudos
Alexander_K_Intel2
1,287 Views

Hi,

look's like it is time to check issue on my side - could you prepare example that read you data from file (A1, A2, A3, TD etc) and sent it to me?

Thanks,

Alex

0 Kudos
Baorui_C_
Beginner
1,287 Views

Alex,

Alex,

Thanks a lot.

I have found the errors and fixed them. Now it works well.

I checked it clearly again and found that I should make sure the type, kind and rank of the functions or subroutine are totally same with the requirements. For example, if the user guide indicates us to use integer, we can not use integer*8.

Thanks again!

Baorui

0 Kudos
Alexander_K_Intel2
1,287 Views

Hi Baorui,

Nice to hear this, hope that MKL PARDISO will help you in your further research!

Thanks,

Alex

0 Kudos
Reply