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
- use of CGS in PARDISO

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

gregfi04

Beginner

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

07-08-2011
12:46 PM

176 Views

use of CGS in PARDISO

Hi,

I have a sparse, structurally-symmetric matrix.
The solution of this matrix is part of a larger iterative solver, so the
matrix needs to be solved many times. The values in the matrix will
modestly change between iterations, but the sparsity pattern will remain the
same.

Based on my reading of the PARDISO documentation, it sounds
like this situation argues strongly for the implementation of the CGS iterative
scheme. It sounds
like PARDISO needs to be called once with *phase=11*, and then
subsequently called with *phase=23* and *iparm(4)=31*. Is this
correct? I havent been able to get this to work. I get the following errors:

*** Error in PARDISO ( numerical_factorization) error_num= -3

*** Error in PARDISO: cgs error iparam(20) -22

Are there any public examples that would be useful? Any other thoughts?

Are there any public examples that would be useful? Any other thoughts?

Thanks,

Greg

1 Solution

Alexander_K_Intel2

Employee

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

07-13-2011
12:50 AM

176 Views

I've attached my modification of pardiso_unsym_c.c, its return correct output. Could you modificate it and attach here to reproduce your issue?

With best regards,

Alexander Kalinkin

Link Copied

10 Replies

Alexander_K_Intel2

Employee

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

07-08-2011
09:18 PM

176 Views

Am I right that you use mtype=1 or 3? Could you change it on 11 and 13 correspondantly and check the output? In any case could you send small testcase with compiling line to reproduce this issue on our side?

With best regards,

Alexander Kalinkin

gregfi04

Beginner

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

07-11-2011
07:58 AM

176 Views

Thanks for looking into this. You are correct that I was previously using mtype=1. Using mtype=11 appears to produce the same errors.

A test case is attached. I suspect that there may be something basic wrong with my input. Please let me know what you find.

Best Regards,

Greg

Alexander_K_Intel2

Employee

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

07-11-2011
08:36 PM

176 Views

I've include your data ( values got from sparse_values(1) ) in example named pardiso_unsym_c in example folder and can't reproduce your issue :( Maybe there are some problems with rhs or other parameters that you didn't provide... Could you provide small example with errors you mentioned and send it to me?

With best regards,

Alexander Kalinkin

gregfi04

Beginner

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

07-12-2011
08:38 AM

176 Views

I've re-attached the file to this posting, updated with the values of the RHS that I'm using. (The same RHS is used for each matrix.)

However, I suspect the problem I'm having is related to how I'm calling the subroutine. I have no problem using the "default"

Based on my reading of the documentation, my best guess as to how this is supposed to work is as follows (example in abbreviated Fortran):

do ...

sparse_values = ...

At what point in the pardiso_unsym_c are you modifying iparm(3)?

Thanks,

Greg

iteration = iteration + 1

sparse_values = ...

if(iteration == 1) then

phase=13

iparm(4) = 0

call pardiso(...)

phase=13

iparm(4) = 0

call pardiso(...)

else

phase=23

iparm(4)=31

call pardiso(...)

endif

enddo

When I attempt this, I get the following:

phase=23

iparm(4)=31

call pardiso(...)

endif

enddo

When I attempt this, I get the following:

Percentage of computed non-zeros for LL^T factorization

1 % 3 % 6 % 9 % 12 % 15 % 18 % 20 % 22 % 24 % 27 % 31 % 34 % 36 % 40 % 45 % 55 % 99 % 100 %

*** Error in PARDISO ( numerical_factorization) error_num= -3

*** Error in PARDISO: cgs error iparam(20) -22

================ PARDISO: solving a real struct. sym. system ================

Summary PARDISO: ( factorize to solve )

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

Times:

======

Time spent in copying matrix to internal data structure(A to LU): 0.000000 s

Time spent in factorization step(numfct) : 0.000123 s

Time spent in iterative solver a solve step(cgs) : 0.000000 s cgx iterations -22

At what point in the pardiso_unsym_c are you modifying iparm(3)?

Thanks,

Greg

Alexander_K_Intel2

Employee

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

07-13-2011
12:50 AM

177 Views

I've attached my modification of pardiso_unsym_c.c, its return correct output. Could you modificate it and attach here to reproduce your issue?

With best regards,

Alexander Kalinkin

gregfi04

Beginner

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

07-13-2011
01:19 PM

176 Views

I found the problem. Thank you!

After eliminating every other possibility,I noticed that I was using single-precision arrays whereas your code was using double-precision arrays. When I switched my arrays to double-preicision, the problem went away.

Since the matrices aren't going to be horribly large, I suppose we can use double-preicision arrays, but is there some reason single-precision isn't working? Could it be made to work?

Thanks again!

After eliminating every other possibility,I noticed that I was using single-precision arrays whereas your code was using double-precision arrays. When I switched my arrays to double-preicision, the problem went away.

Since the matrices aren't going to be horribly large, I suppose we can use double-preicision arrays, but is there some reason single-precision isn't working? Could it be made to work?

Thanks again!

Greg

Alexander_K_Intel2

Employee

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

07-13-2011
07:28 PM

176 Views

The situation is strange... On my side example that I send to you work with single precision. Have you switched iparm[27] from 0 to 1?

With best regards,

Alexander Kalinkin

Gennady_F_Intel

Moderator

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

07-13-2011
09:13 PM

176 Views

--Gennady

gregfi04

Beginner

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

07-14-2011
07:08 AM

176 Views

*** Error in PARDISO ( numerical_factorization) error_num= -3

*** Error in PARDISO: cgs error iparam(20) -58

If Line 6 is commented out, Line 7 in un-commented, and Line 50 is commented out, the program will execute correctly. I'm using 12.0.3.

Greg

If Line 6 is commented out, Line 7 in un-commented, and Line 50 is commented out, the program will execute correctly. I'm using 12.0.3.

Greg

Alexander_K_Intel2

Employee

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

07-14-2011
07:44 AM

176 Views

I've reproduced your issue: this error mean that iterative algorithm made maximal number of iteration (150) and didn't achive good residual.

With best regards,

Alexander Kalinkin

- 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.