Skip to content

TrilinosMapPuzzle

Jonathan Guyer edited this page Sep 26, 2014 · 1 revision

In the course of trying out 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 that seems to cover the situations I'm interested in and I've attempted to replicate his [#Case1], [#Case2:Twist1] and [#Case2:Twist2] with !PyTrilinos 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

First we'll calculate A= ||2||-1||0|| ||-1||2||-1|| ||0||-1||2|| times x= ||2|| ||3|| ||6|| to obtain y= ||y,,0,,|| ||y,,1,,|| ||y,,2,,|| then we'll backsolve with A and y for x= ||x,,0,,|| ||x,,1,,|| ||x,,2,,||

Table of Contents

Case 1

gives, as desired,

Case 2: Twist 1

aborts with

so y is calculated correctly, but the `AztecOO` constructor aborts.

Case 2: Twist 2

does not even calculate y correctly, before it aborts

The matvec is wrong because cell (1,1) is occupied on both processors and the matvec uses both, even though I call `A.FillComplete(domainMap, rangeMap)` with non-overlapping domain and range maps.

Case 1: Explicit

I find that I cannot even make [#Case1] work if I spell all the maps out explicitly:

where the matvec is right, but `AztecOO` again fails

Clone this wiki locally