[Trilinos-Users] CrsMatrix with col map is broken

Williams, Alan B william at sandia.gov
Sat Mar 26 09:04:08 MDT 2011


Jonathan,
I agree that the error message from Aztec is not meaningful to most users.
Basically, Aztec is picky about which order elements are stored in, and it is quite difficult to get it right in parallel. When Epetra generates the column map internally, it solves that problem, relieving you of needing to know the internal requirements of Aztec.
In almost every case, it is advisable to construct epetra matrices with only a row-map and allow the column-map to be generated internally. Especially if you have a rectangular matrix, which is even trickier to get correct.
There are only a few cases where extreme power users should explicitly create the column-map in parallel.

Sorry that is not documented sufficiently.
Alan


> -----Original Message-----
> From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-
> users-bounces at software.sandia.gov] On Behalf Of Jonathan Guyer
> Sent: Friday, March 25, 2011 2:12 PM
> To: Trilinos Mailing List
> Subject: [Trilinos-Users] CrsMatrix with col map is broken
> 
> I asked about this a week ago and haven't seen a reply, so I'm trying
> again with a more antagonistic subject.
> 
> If I declare an Epetra.CrsMatrix with both a row map and a col map, I
> can do matvec operations with it, but I cannot build an AztecOO with
> it. Am I doing something wrong?
> 
> Details below.
> 
> 
> On Mar 17, 2011, at 9:24 AM, I wrote:
> 
> > In the course of trying to sort out a use case where sometimes I want
> to build part of a system of equations and calculate its residual and
> other times I want to build the entire set and solve it, I've run into
> an issue that I don't understand. At first I thought this was some
> issue with rectangular matrices, but I see the same issues with square
> matrices.
> >
> > I found a presentation by Mike Heroux at
> http://www.hpcsw.org/presentations/workshops/scalable_tools/heroux_101.
> pdf that seems to cover the situations I'm interested in and I've
> attempted to replicate his Case 1, Case 2: Twist 1 and Case 2: Twist 2
> with PyTrilinos at http://matforge.org/fipy/wiki/TrilinosMapPuzzle, and
> I get the same errors.
> >
> > I am able to do the matvec operation to calculate the residual, but
> unless I instantiate the `CrsMatrix` with only a row map, `AztecOO`
> aborts with inexplicable things like "Received elements must be stored
> after all 1 local elements". Um... OK... I see where that error is
> generated in `az_comm.c`, but what does it mean?
> >
> > It seems like the only reason the `CrsMatrix`-with-row-map-only case
> works at all is because `InsertValues()` magically ignores the fact
> that the columns overlap other nodes when `Graph_.HaveColMap()` is
> false. Otherwise, without an overlapping column map, I can't build the
> matrix properly, but if I use an overlapping column map, I can't solve
> the thing, no matter what I tell it about its domain and range maps.
> I've also tried `ReplaceColMap()` to no avail.
> >
> > What am I missing?
> >
> > I'm using:
> >
> > PyTrilinos 10.2.0
> > OpenMPI 1.4.1
> > Apple System Python 2.6.1
> > Snow Leopard 10.6.6
> >
> >
> >
> > --
> > Jonathan E. Guyer, PhD
> > Metallurgy Division
> > National Institute of Standards and Technology
> > <http://www.nist.gov/msel/metallurgy>
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Trilinos-Users mailing list
> > Trilinos-Users at software.sandia.gov
> > http://software.sandia.gov/mailman/listinfo/trilinos-users
> >
> 
> 
> 
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users




More information about the Trilinos-Users mailing list