On 20111111@22:29, Alexander Barth wrote:
> >
> > hello, octave-forge :)
> > created main/sparsersb, in order to host files for the "sparsersb" oct-file 
> > package; that is, an Octave function to have an additional Octave type for 
> > using the sparse matrix implementation given by the "librsb" library.
> >
> > ------------------------------------------------------------------------
> >
> > I confirm I'm able to commit -- thanks!
> >
> > ------------------------------------------------------------------------------
> 
> Dear Michele,
> 
> Thank you for making your work available! I'm very interested in using
> a library able to do sparse matrix operations in parallel!
> 
> However, I have some problems when I want to use the sparsersb type to
> solve a linear system:
> 
> % C is 900x900 sparse matrix (octave-type) and b a vector 900x1
> load icovar.mat C b
> x = C \ b; % works
> 
> S =  sparsersb(full(C));
> x = S \ b; % fails
> ERROR 0xffffffe0 : The user supplied some corrupt data as argument
> 
> Is the backslash operator implemented for sparsersb?
> 
> The file icovar.mat is available here:
> http://modb.oce.ulg.ac.be/mediawiki/upload/Alex/icovar.mat
> 
> Thanks again and best regards,
> Alex

Dear Alex,

First of all, I'm very happy that you tried (that is: built and tested)
the whole thing.

I was about to write more librsb/sparersb build documentation, so every
bit of of your feedback may be useful for improving it, especially to
allow other Octave devels to try/check the sparsersb package.

Also error reporting is an important thing: that error message is not
very informative: I'll it to a more reasonable one in the next commits.
The \ operator, for now, performs tringular solution by a vector or
multivector.

librsb is not a solver library: we (me and Salvatore and Alfredo) plan
another contribution for that in the future (interfacing to the PSBLAS
solver library).

However, we may discuss anddecide for the most reasonable semantics
for sparsersb's operators.
When it comes to '\', as far as i know (I've read David Bateman's
article about Octave sparse internals and '\'), a "polyalgorithm" is
involved; that is, a number of methods are considered following a tree of
decisions (e.g.: matrix factorizations using UMFPACK, for instance).

Since "sparsersb" doesn't have the ambition of solving linear systems by
itself, I would say that a good default, in perspective, may be:

 - if the matric is NOT triangular switch to sparse (or dense) in a
   temporary copy; then perform Octave's '\' 
 - if it's triangular perform triangular solution

So for now, '\' is legal for 'sparsersb' as far as the matrix is
triangular (tril or triu):

load icovar.mat C b
x = C \ b;
(tril(C)\b)-(sparsersb(tril(C))\b)


Cheers,
 Michele

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to