Register to reply 
Matrix Condition Number 
Share this thread: 
#1
Jan813, 02:39 PM

P: 4

Hello all,
I am new to this forum but am glad I found it, I have a quick question about condition numbers and order of operations. Given a symmetric positivedefinitive matrix with a initial condition number α, is it possible to improve that condition number with a different access pattern? For example, if I access the matrix within the context of an iterative solver (e.g., Jacobin) in columnmajor order would it improve the condition number over access done in rowmajor order? I am doing some personal research into iterative solvers and convergence rates and I would like to know if the condition number can be improved, thus lower the total number of iterations to converge, significantly with something so small. Thank you. 


#2
Jan913, 10:13 AM

P: 4

Never mind about my initial post, the order of operations as applied to column major versus row major will have no effect on the condition number of the matrix. The access order should not effect the Eigenvalue Spectral Radius.
Does anyone have any clue as to why a iterative algorithm, such as Jacobin, would have less iterations to converge when executed on the GPU versus the CPU? The model and tolerance is exactly the same in both cases, so I cannot understand how the GPU has less iterations using a Krylov search space. I have executed the SAME code for CPU and GPU (except of course the CPU has NO calls to the GPU) on two different sets of CPUs and GPUs (one double precision  Tesla, and one not  Quadro) and get exactly the same result. Any ideas would be great, I think I might have broke one of my neurons on this one. Thanks. 


#3
Jan913, 11:19 AM

Engineering
Sci Advisor
HW Helper
Thanks
P: 6,948

The explanation may be something to do with compiler optimisation, compiler bugs, library routines, different implementations of floating point arithmetic, etc. The only way to nail that is compare your two calculations step by step. If there are differences, they will probably show up (if only in the last decimal place) on small matrices as well as on big ones. 


#4
Jan913, 11:45 AM

P: 4

Matrix Condition Number
You are right  it doesn't make sense to me either. I was just wondering if there was an obvious and therefore easy reason.
Thank you for your help and time. 


#5
Jan1013, 04:41 PM

P: 4

I found the problem.
Turns out that the GPU typically has some roundoff error that will benefit the GPU for iterative solvers such that the higher precision of the CPU will take more iterations to converge. The small inaccuracies of the GPU become magnified when doing large sets of summations  such as those found in the Dotproduct of the iterative solver I am using. It is sneaky and is typically solved by using double precision (CUDA arch. 1.3 or greater) or algorithmically with the Kahan approximation. 


#6
Jan1013, 06:08 PM

Engineering
Sci Advisor
HW Helper
Thanks
P: 6,948

Maybe he gave up trying to sell his CFD software and went into GPU design ... 


Register to reply 
Related Discussions  
Condition number of a matrix is 1 but determinant is almost 0  General Math  2  
Matrix condition number question  Calculus  1  
Condition number of a matrix  Calculus & Beyond Homework  0  
Condition number  Linear & Abstract Algebra  0  
Condition number (or estimate) of a very large matrix  Linear & Abstract Algebra  0 