- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

I use MKL 10.1 to solve sparse linear system. System is symmetric and positive definite but during phase 22 PARDISO fails with error code -1 and message is

*'Error in PARDISO: zero or negative pivot, A is not SPD-matrix'*

Can anyone help me to find the reason for this error? I have attached a part of code from my software and some statistical information printed by PARDISO. Please see the attachment. Please find the sparse matrix at the end of this mail.

Thanks,

Ashish

rowIndex

1

6

11

16

22

26

32

38

43

47

52

56

58

60

61

columns

1 2 3 4 6

2 4 5 6 7

3 4 5 6 8

4 5 6 7 8 10

5 7 8 10

6 7 8 9 10 11

7 8 9 10 11 12

8 9 10 11 13

9 11 12 13

10 11 12 13 14

11 12 13 14

12 14

13 14

14

values

4.564348 0.000000 0.000000 -3.042424 -1.521924

7.606774 -6.087562 0.000000 1.521212 -3.040423

7.606775 -6.088180 0.000000 1.521212 -3.039807

27.400923 -9.137043 -4.569465 -0.001010 -0.000393 1.525154

10.656405 1.522569 1.522878 -4.564809

2010.166597 -2000.278354 -2000.278046 -4.559016 1994.953937 3.043848

2010.168623 1994.954803 1.520567 -2000.279206 -1.525441 -3.042126

2010.168624 1.520258 -2000.279515 -1.526058 -3.042745

10.643689 -9.125497 0.000000 0.000000

2010.168919 -3.041526 1.520062 1.520062 -1.523076

27.376694 -6.081257 -6.080639 -3.040123

7.603322 0.000000

7.603322 0.000000

4.563199

Link Copied

7 Replies

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

By adapting the MKL example

*pardiso_sym_c.c*, with data from your input matrix, I found that Pardiso handles the matrix without error, and that the matrix is positive definite.

The modified file is attached.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Thanks for reply.

I switched matrix checker on but I do not see output of this check. Where can I get output from matrix checker?

Thanks,

Ashish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

You will see output from the matrix checker only if there are errors. To test this, present the first row of the matrix in unsorted order, i.e., instead of

1,2,3,4,6,

give

1,2,3,6,4,

and you will see

*** Error in PARDISO (incorrect input matrix ) error_num= 24

*** Input check: j=4, ja(j)=6, ja(j+1)=4 are incompatible

ERROR during symbolic factorization: -1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

**Thanks for quick reply.**

That means sparse matrix structure is correct. I too solved this matrix by modifying MKL sample program. Its strange that it did not give any such error and easily factorised the matrix in phase 22. After you pointed out, I made sure that all the data and data type are same in both MKL sample program and my software.

As a matter of fact, I have been using this code for solving sparse system for quite some time. Recently, I made changes to add few more terms in coefficient matrix. Since, then I have been getting such error.

Can you suggest some way to get more information on what is going wrong?

Thanks,

Ashish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

*>Can you suggest some way to get more information on what is going wrong?*

Begin by giving a complete, compilable, example where you expect a solution but experience a failure. The code fragment that you provided earlier is not enough.

Note that changing the value of even one element of a positive definite matrix can make the resulting matrix indefinite.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

I found that there was a problem while assembling the matrix which made it indefinite. I had a print statement in my code to output content which was truncating the double till 6 digit places after decimal. And this made matrix look like positive definite. I printed some more decimal places in matrix and found that it is not positive definite.

Here is content

{4.564347977772266, 0.000000000000000, 0.000000000000000, -3.042423867081960, -1.521924110690306, 7.606773629731492, -6.087562211441041, 0.000000000000000, 1.521211933540980, -3.040423351831432, 7.606774711348293, -6.088179968041103, 0.000000000000000, 1.521211933540980, -3.039806676848170, 27.400923272820172, -9.137043110816320, -4.569465236748068, -0.001010321139017, -0.000392564538955, 1.525154006986292, 10.656404978781763, 1.522569172179540, 1.522878050479571, -4.564809090624554, 2010.166596681374100, -2000.278354385391800, -2000.278045507091700, -4.559016394738700, 1994.953937031492400, 3.043848054711660, 2010.168622855250500, 1994.954802754721400, 1.520566788717270, -2000.279206463460500, -1.525440582246566, -3.042126466799454, 2010.168624264110300, 1.520257910417239, -2000.279515341760500, -1.526058338846628, -3.042744550642403, 10.643689148584869, -9.125497452980678, 0.000000000000000, 0.000000000000000, 2010.168918568560700, -3.041526141973496, 1.520061628147761, 1.520061628147761, -1.523075825515666, 27.376693628491292, -6.081256833730062, -6.080639077130000, -3.040123256295522, 7.603321672381755, 0.000000000000000, 7.603321999624642, 0.000000000000000, 4.563199081811187}

Thanks for all your help,

Ashish

Topic Options

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