[julia-users] Re: Why does QR beat LU for sparse, square matrices?

2016-04-26 Thread Jonas Kersulis
Thanks for the tip! I'll try this out. On Tuesday, April 26, 2016 at 10:30:10 AM UTC-4, Miles Lubin wrote: > > Hey Jonas, > > I don't have an answer to this, but if you're looking for state-of-the-art > performance for sparse linear algebra, I'd recommend using a proprietary > library like

[julia-users] Re: Why does QR beat LU for sparse, square matrices?

2016-04-26 Thread Jonas Kersulis
Good point. The matrices I actually want to factorize are about 1% nonzeros. I changed the nonzero parameter to that value and re-ran the experiment. Now LU beats QR.

[julia-users] Re: Why does QR beat LU for sparse, square matrices?

2016-04-26 Thread Steven G. Johnson
I should also mention that the timings can be quite different (probably worse) for an sprand matrix than for a matrix that comes from discretizing a mesh, even with the same number of nonzeros.How well sparse-direct algorithms work depends a lot on the structure of the sparsity pattern.

[julia-users] Re: Why does QR beat LU for sparse, square matrices?

2016-04-26 Thread Kristoffer Carlsson
For completeness, cholesky factorization takes about 0.7 seconds. On Tuesday, April 26, 2016 at 6:40:50 PM UTC+2, Kristoffer Carlsson wrote: > > For a 200 x 200 grid with a 2D elasticity PDE problem I get 2.4 seconds > for lufact and 8.2 seconds from qr. The resulting stiffness matrix has a >

[julia-users] Re: Why does QR beat LU for sparse, square matrices?

2016-04-26 Thread Kristoffer Carlsson
For a 200 x 200 grid with a 2D elasticity PDE problem I get 2.4 seconds for lufact and 8.2 seconds from qr. The resulting stiffness matrix has a density of ~ 0.00022. On Monday, April 25, 2016 at 10:49:40 PM UTC+2, Jonas Kersulis wrote: > > Can someone explain why qrfact is faster and

[julia-users] Re: Why does QR beat LU for sparse, square matrices?

2016-04-26 Thread Steven G. Johnson
On Tuesday, April 26, 2016 at 12:05:00 PM UTC-4, Steven G. Johnson wrote: > > A more realistic application of sparse matrices would be something like > discretizing a PDE on a 2d mesh. A 100x100 grid with nearest-neighbor > interactions is a 1x1 matrix, with about 5*1 nonzero

[julia-users] Re: Why does QR beat LU for sparse, square matrices?

2016-04-26 Thread Steven G. Johnson
On Monday, April 25, 2016 at 4:49:40 PM UTC-4, Jonas Kersulis wrote: > > Can someone explain why qrfact is faster and requires less memory than > lufact for square, sparse matrices? LU is less computationally complex than > QR, and with decent pivoting LU should be able to preserve sparsity

[julia-users] Re: Why does QR beat LU for sparse, square matrices?

2016-04-26 Thread Miles Lubin
Hey Jonas, I don't have an answer to this, but if you're looking for state-of-the-art performance for sparse linear algebra, I'd recommend using a proprietary library like PARDISO . Miles On Monday, April 25, 2016 at 4:49:40 PM UTC-4, Jonas Kersulis