[Trilinos-Users] CrsMatrix::Multiply error

Heroux, Michael A maherou at sandia.gov
Sun Oct 31 19:58:27 MDT 2010


Neil,

ColMap is an easy argument to misunderstand.

DomainMap is the description of how source vector (or multivector) objects are distributed across the parallel machine.  On each processor, it is the list of global IDs owned by that processor.  This map must have a “one-to-one” property such that, if a global ID is present in the list, it can appear only once across the whole machine.

ColMap is a description of column entries in the matrix.  On each processor ColMap is the list of global IDs for which there is at least one column entry on that processor.  ColMap is typically not one-to-one, but can be for advanced use cases.

ColMap and DomainMap are used together to determine which off-processor elements must be communicated in order to perform operations such as matrix-vector and matrix-transpose-vector multiplication.   RowMap and RangeMap have a similar relationship, but it is often a trivial one since matrix rows typically have the same distribution as the output vector.  But this is not required for Epetra.

For square matrices, RowMap, DomainMap and RangeMap are typically the same, while ColMap is not.

For a more detailed discussion of these concepts, you can look at slides from the 2008 Trilinos User Group meeting, starting on slide 23:

http://trilinos.sandia.gov/events/trilinos_user_group_2008/presentations/HerouxEpetraConcepts.ppt

Best regards,

Mike

On 10/31/10 2:35 PM, "Carlson, Neil N. (LANL)" <nnc at lanl.gov> wrote:

> Hi Mike,
>
> Thanks for the quick response (Sunday even).
>
>>  It looks like your matrix is not square.  In this case, you need to use
>> the
>> version of FillComplete that takes a domainMap and rangeMap argument.  If
>> you pass in cell_map and node_map, respectively, you should be in good
>> shape.
>
> Right, that fixes it!
>
>> Also, I noticed that you are building your graph using a column map
>> argument.  Generally this is not needed, even for a non-square matrix.
>
> No, but if I want to use the "My" versions of the element insertion
> methods then it is required, right?  In my real application I have
> direct access to local indices, and translating these to global is a
> nuisance.  Actually, I guess I had assumed that when I specified the
> column map in the constructor, this was being understood as the
> domain map, but apparently not.
>
> I think I'm missing something important about the distinction
> between the domain and column maps (and range and row maps).
> I'm not sure why they wouldn't always be the same.
>
> Cheers,
>   Neil
>
>> On 10/31/10 12:43 AM, "Neil N. Carlson" <nnc at lanl.gov> wrote:
>>
>>> I'm trying to run some simple CrsMatrix Multiply examples in order to
>>> deduce how it behaves in parallel.  It turns out I can't even get it to
>>> work in serial (well, single-process MPI, anyway).  I've attached my
>>> short
>>> (serial) test code that creates a 2x3 Crs matrix and attempts to do a
>>> matvec with it.  The Multiply method is returning a -3 error code, and
>>> I've been unable to determine what that means.  After looking at the
>>> Multiply code it appears to be coming from the internal
>>> Importer/Exporter
>>> stuff, but I'm hopelessly lost beyond that point.  All the object data
>>> looks good going into the multiply.
>>>
>>> If someone could point out what I'm doing wrong in my test code, I'd be
>>> extremely grateful -- I'm at my wits end.
>>>
>>> Thanks,
>>>   Neil
>>> _______________________________________________
>>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20101031/92ebef68/attachment.html 


More information about the Trilinos-Users mailing list