Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jaekyung_S_
Beginner
29 Views

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?

0 Kudos
9 Replies
Vidura_Dhananjaya
New Contributor II
29 Views

I think there's no another format...only CSR
Jaekyung_S_
Beginner
29 Views

  

 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.

 

 

 

29 Views

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

Million_P_
Beginner
29 Views

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/intel/mkl/10.0.3.020/examples/solver/source/dcsrilu0_exampl2.f

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

TimP
Black Belt
29 Views

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.

Bernard
Black Belt
29 Views

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

TimP
Black Belt
29 Views

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.
Bernard
Black Belt
29 Views

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

Ying_H_Intel
Employee
29 Views

Hi Million P.

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

Best Regards,

Ying