[Trilinos-Users] Having Different Row maps and A Transposition : What To Do ?
Heroux, Michael A
maherou at sandia.gov
Tue Jun 17 10:34:38 MDT 2008
Davood,
Epetra supports non-transpose and transpose operations fairly well. I have seen the performance of the transpose (which is essentially a sparse column format matvec followed by a gather-sum of the y vector) perform better than non-transpose, but more often the non-transpose is faster, which is why we use the row-oriented data structure by default.
I don't think, in most cases, that storing C transpose explicitly is worth the cost in storage, but that can vary from problem to problem.
Mike
On 6/17/08 11:27 AM, "Davood Ansari" <david.ansari at gmail.com> wrote:
Hi
Thank you so much for going through all those details.
I think, I understand what you mean and that is very much helping.
It seems that Epetra can go far beyond what I'd expected.
BTW, I wonder if not storing the transposed form will affect the matvec's performance ?
Yours
Davood
On Wed, Jun 18, 2008 at 12:17 AM, Heroux, Michael A <maherou at sandia.gov> wrote:
Davood,
I am not sure I understand all the details of your situation, but I will make a few comments in case they help.
The distribution of the entries of your C matrix does not have to match the distributions of your vectors in any way. As long as you call FillComplete using a DomainMap that matches the input vector map and a RangeMap that matches the output vector map, you can construct C in any way you like. You can also compute the transpose of C applied to a vector by simply setting the transpose argument to true. You do not need to store the transpose of C.
As for what is the best distribution of C, it is hard to say up front. If you intend to perform many matvec's, then it is probably best to distribute C using the usual map. However, if not, then use the natural map, making sure you call FillComplete with the right domain and range maps. In either case you don't need to transpose it.
I hope this helps.
Mike
On 6/17/08 2:33 AM, "Davood Ansari" <david.ansari at gmail.com> wrote:
Hi all
Besides assembling my A and B matrices (as in A x = lambda B y for an FE eigen-problem)
a third (constraints) matrix is needed to be assembled (call this one C).
For A and B, I have opted for the usual linearly sliced row map.
For C, the assembling process is much different (kind of recursive) from
ordinary FE matrices. Yet, there is a natural map that can partition C's rows into independent
slices. In the Solver stage, it is needed to multiply the transpose of C many times
(like A and B) with the vectors that are constructed based on the usual row map.
Now, which one is possibly the right way to go:
Option I.
1.Assemble C, using its natural map, thus requiring no off process communications (requires Epetra_Crs_Matrix).
2.Then, transform C into a new matrix which is the transpose of C and complies to the usual map(don't even know how)
Option II.
1.Assemble C, using the usual map, thus requiring off process communications (definitely Epetra_FECrs_Matrix)
2.Then transpose it.
Kindly comment on this
Davood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080617/f1743aea/attachment-0001.html
More information about the Trilinos-Users
mailing list