[Trilinos-Users] CrsMatrix with col map is broken

Jonathan Guyer jonathan.guyer at nist.gov
Mon Mar 28 07:34:19 MDT 2011


On Mar 26, 2011, at 1:26 PM, Matt G wrote:

>    I had some trouble with this a year ago or so.  The solution I came across was to instantiate the matrix with a RowMap, do the filling, then when calling fill complete, pass the same row map, as well as the column map.  If you don't pass the column map during the fillComplete, things get very confused, as I recall it assumes a square matrix, but does not prune values outside the bounds there of.  As a result, many operations will run, but give confusing/wrong results, like when you use the print method, it will reports it is a (N x N) with row-col-value tuples outside that range.  

OK, thanks. It still seems like I have to keep more track of whether I'm building part of the matrix or all of it than I want to, but it hadn't occurred to me to build square and then fill rectangular.


> You can find this code in my GitHub Repo, somewhere around line 422 the matrices are fill-completed, the the AztecOO solving setup starts around 604.      It is python, but the calls are basically the same, so I suspect it will still be helpful.

Actually, python is just what I want. Thanks!

>  One of the other things I did not appreciate at first is that almost all of the Trilinos methods you use give integer return codes, if any of these are non-zero, something is probably not happening how you expect it to later.  

We're definitely not checking return values as much as we should.

> I hope some of this is helpful!

Very, thanks.





More information about the Trilinos-Users mailing list