Speed of solvers with CSR format

Speed of solvers with CSR format

 

 I have been using MKL in composer 2013. Especially, pardiso and preconditioned conjugate gradient solver with CSR format to solve symmetric matrices

 I wonder that using full element CSR format is much faster than having half CSR format.

 Also, there is a example with jacobi precondition CG in MKL folder.

Are there another preconditioned CG examples?

10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Diko_Dhananjaya's picture

I think there's no another format...only CSR

DikoYow

  

 ex)

           A 2x2 matrix      A =  1  2

                                          2   3

     In pardiso solver( or PCG) I wonder that

     using  a = { 1, 2, 2, 3 }  in mtype 11 is much faster than using mtype 2 with a={1,2,3}

    I Actual matrix size is larger.

 

 

 

Alexander Kalinkin (Intel)'s picture

Hi,

>  I wonder that using full element CSR format is much faster than having half CSR format.

May i ask about time result in for different phase and input parameters? Such fact can be describe, for example, by additional iterative step that have been done for symmetric case because of pivot or 2 level algorithm of factorization that is default for nonsymmetric case and can provide performance improvement for many-core processors. 

 >Also, there is a example with jacobi precondition CG in MKL folder.

>Are there another preconditioned CG examples?

In current version of MKL there is only one preconditioner example that you mentioned that covered main step of CG RCI routines.

 

Thanks,

Alex

Alex,

I'm using this solver to solve a pentadiagonal matrix.

The link to the solver: http://sepwww.stanford.edu/sep/claudio/Research/Prst_ExpRefl/ShtPSPI/int...

However, I realized the solver is selective. I wouldn't know if I'm not setting one of the parameters right. I can solve a  matrix size of 80 X 80. Anything after that, I get the "stack overflow" error message. If I bump it to 256 X 256; it solves it but after that again, it returns an error. If I increase it yet again to 512 X 512, it produces the right result. Is it a memory problem?

I use a core i3, 6G RAM computer.

 

Thanks

It shouldn't be surprising if you need to raise stack settings.  Both the overall shell stack limit (set on Windows by stack reserve and commiit) and the thread stack size (e.g. OMP_STACKSIZE) may be in play.  Intel default for OMP_STACK_SIZE is 4MB in 64-bit mode (2MB for 32-bit mode).  With ifort you also have the option to move some of your dynamic allocation to heap by /heap-arrays.

iliyapolak's picture

As Tim hinted try to change stack settings.Default thread stack size is 1MB.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms686774(v=vs.85).aspx

Iliya is correct that Microsoft used to fix thread stacks at 1 MB but this doesn't apply to mkl. Still it's likely you may need a reasonable increase.

iliyapolak's picture

 >>>can solve a  matrix size of 80 X 80. Anything after that, I get the "stack overflow" error message. If I bump it to 256 X 256; it solves it but after that again, it returns an error. If I increase it yet again to 512 X 512, it produces the right result. Is it a memory problem>>>

Without dump file is hard to find the exact reason for the stack overflow.My assumption is that in some case the allocation is crossing guard page at small stack size and this can be a reason for stack overflow error.

Hi Million P.

Could you please provide us a test case, like 256x256 matrix so we can investigate your problem?

Best Regards,

Ying 

Login to leave a comment.