Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- floating point exception solving a non-symmetric matrix

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

xian-zhong_guous_cd-

Beginner

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

08-24-2015
03:38 PM

36 Views

floating point exception solving a non-symmetric matrix

The floating point exception occurs when solving the attached non-symmetric matrix.

1 line: n

2nd line: index base (i.e. 0 based)

3rd line: nz

followed by all nonzeros in coordinate (i.e. triplet) format

Major version: 11

Minor version: 1

Update version: 1

Product status: Product

Build: n20131010

Processor optimization: Intel(R) Advanced Vector Extensions (Intel(R) AVX) Enabled Processor

linux

Thanks,

Sam

Link Copied

6 Replies

mecej4

Black Belt

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

08-25-2015
07:56 AM

36 Views

I don't know what you mean by 'solving the matrix', and a floating point exception (FPE) can be caused by errors in your code or in the MKL library routines. If you show the code and other necessary details, we can attempt to help.

The example code pardiso_unsym_f.f that comes with MKL can be easily modified to solve the linear equation set A.x = b, with A as given by you and b = a vector with all elements = 1.0. The modified code is attached. It reads your data file, forming the matrix in COO format, and converts the matrix to CSR format before calling Pardiso to solve the linear equation set.

The code ran without any errors with IFort 15.0.4 in Windows-32, but you should probably check the solution before accepting it as correct. That the code ran without any FPEs indicates to me that the problem that you reported probably originated in your code rather than in the MKL library. A definite answer can only be given if you describe/show how you performed the calculation that resulted in a FPE.

xian-zhong_guous_cd-

Beginner

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

09-11-2015
06:22 PM

36 Views

I think I have a matrix to reproduce the floating point exception. Load PARDISO_matrix_7370.txt:

line 1 n

line 2 index base (0 based in this case)

line 3 nz

followed by coordinate format (i,j,a)

I solve it as general with b=0 yet solution is Nan and floating point exception occurs.

Major version: 11

Minor version: 1

Update version: 1

Product status: Product

Build: n20131010

linux

Thanks

mecej4

Black Belt

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

09-11-2015
07:47 PM

36 Views

You say that the array indices are 0-based, yet the data file in #3 contains row numbers from 1 to n=7370. If you had, in fact, 0-based indices, row numbers should have ranged from 0 to n-1.

The result of this inconsistent numbering is that the first row of the matrix is taken to be zero, which would make the matrix singular. In that case, a floating point exception should be expected.

You should probably specify that 1-based indices are used, and enable checking of input matrix arrays, by setting iparm(27)=1.

xian-zhong_guous_cd-

Beginner

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

09-12-2015
09:52 AM

36 Views

Gennady_F_Intel

Moderator

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

10-10-2015
11:47 AM

36 Views

When the matrix checker is enabled, then pardiso returns the input inconsistency ( -1) . You may try to get more details with sparse_matrix_checker routine.

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

*** Input check: i=62239, ja(i)=7371, neqns=7370 are incompatible

mecej4

Black Belt

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

10-10-2015
03:16 PM

36 Views

xian-zhong.guous.cd-adapco.com wrote:

...Floating point exception occurs after solving for the rhs.

Solving for the rhs? Do you mean unknowns?

In that case, there is no problem that concerns us, is there? The part of the program that uses MKL is done when the solution of the sparse matrix linear equations is obtained. If a floating point exception occurs subsequently, it is up to you to debug the part of your program where that happened.

That a floating point exception occurs is not an unusual or highly significant event. It can be caused by passing incorrect arguments to the solver, or it can occur if the matrix is singular. Its occurrence is just a sign that there is some error in your program that you have to track down and correct.

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

For more complete information about compiler optimizations, see our Optimization Notice.