Re: [julia-users] Re: Problems with A\b and BigFloat

2016-08-11 Thread Nicklas Andersen
Hi, this actually helped a lot and made good sense. The differential equation I'm working with do include a set of singular matrices and with the application of a higher order time integration method, I do end up with a matrix A that is badly conditioned. Computing the condition number in Julia

Re: [julia-users] Re: Problems with A\b and BigFloat

2016-08-11 Thread Tamas Papp
I don't know anything about your problem domain, but are you sure that the errors are not a conditioning problem? Increasing precision can mitigate this to a limited extent, but when you increase the dimension you quickly run out of precision, so it is rarely the solution. Have you checked the

[julia-users] Re: Problems with A\b and BigFloat

2016-08-11 Thread Nicklas Andersen
I know I might be contradicting myself by saying *"I would like not to introduce too much error by the use of an iterative solver"* and then going on with propagating errors, direct solvers and a wish for quadruple precision. In theory direct solvers give an exact solution, while iterative

[julia-users] Re: Problems with A\b and BigFloat

2016-08-11 Thread Nicklas Andersen
Hey again. Thank you all for the nice answers. I was in a bit of hurry and didn't have time to go into too much detail, so to clarify: The system I'm trying to solve arises from the space dicretization of a *linear* partial differential algebraic equation. To advance the solution in time I need

[julia-users] Re: Problems with A\b and BigFloat

2016-08-10 Thread Chris Rackauckas
It really depends on what he means by "large" and "sparse". There is no indication from the OP that he specifically is choosing a direct over an iterative method, just that he knows \ is the go-to for solving Ax=b that he tried. It should be mentioned that direct solvers are O(n^3) and

[julia-users] Re: Problems with A\b and BigFloat

2016-08-10 Thread Ralph Smith
The OP wants extremely high precision and indicated that he was willing to factor the matrix. I recommended iterative refinement which converges very quickly, and exploits the state-of-the-art direct solvers. The solvers in IterativeSolvers.jl are for a different domain, where the matrix is

[julia-users] Re: Problems with A\b and BigFloat

2016-08-10 Thread Chris Rackauckas
Yes textbook answer is, why do you want to use `\`? Iterative techniques are likely better suited for the problem. There's no need to roll you own, the package IterativeSolvers.jl has a good number of techniques implemented which are well-suited for the problem since A is a large sparse matrix.

[julia-users] Re: Problems with A\b and BigFloat

2016-08-10 Thread Ralph Smith
Here is a textbook answer. Appropriate choice of n depends on condition of A. """ iterimprove(A,b,n=1,verbose=true) Solve `A x = b` for `x` using iterative improvement """ function iterimprove{T<:AbstractFloat}(A::SparseMatrixCSC{T}, >

[julia-users] Re: Problems with A\b and BigFloat

2016-08-10 Thread Chris Rackauckas
Though I don't know if they have sparse algorithms. But they have a good base something there to help you get started making one... On Wednesday, August 10, 2016 at 2:20:54 PM UTC-7, Chris Rackauckas wrote: > > GenericSVD.jl has linear > solver

[julia-users] Re: Problems with A\b and BigFloat

2016-08-10 Thread Chris Rackauckas
GenericSVD.jl has linear solver routines which work for generic number types (like BigFloat). You can use an SVD to solve the linear system. It's not as fast as other methods, but you may find this useful. On Wednesday, August 10, 2016 at 12:47:10

[julia-users] Re: Problems with A\b and BigFloat

2016-08-10 Thread Kristoffer Carlsson
The sparse solvers use UMFPACK and CHOLMOD which are C-libraries and thus only support the standard number types. You would need a pure julia written solver that could take any number type. The stackoverflow error was fixed here: https://github.com/JuliaLang/julia/pull/14902 On Wednesday,