[Trilinos-Users] Epetra:

Heroux, Michael A maherou at sandia.gov
Wed Oct 14 15:35:50 MDT 2009


You are very close to having a working code.  The only change to make is to use Epetra_Export instead of Epetra_Import.  Export is used for the situation where each processor has data that it wants to send to another processor for summation.  In contrast, Epetra_Import is used for the case where data is needed from another processor.  I have attached a modified version of your code that should do what you want.


On 10/14/09 4:14 PM, "David Andrs" <dandrs at unr.edu> wrote:


I'm trying to do the following thing in parallel. I have a distributed
vector, each part is owned by one processor. Entries of this vector are
created either by the processor that owns the part or by another
processor. In the end, I'd like to send these off-processor
contributions to the processor where they belong.

I'm using this code:
bb.Import(b, importer, Add);

where bb is the target vector that will have all the contributions from
other CPUs and b is the "overlapping" vector. I have a simple testing
problem that I run on 2 CPUs. It has a 3-entries vector, the first entry
is contributed by both processors, the second by 1st CPU and the last
one by 2nd CPU. First processor contributes by 2 into the 1st entry and
the second CPU contributes by 3 into the same entry. So, after the
statement above, I'd expect to have 5 in the first entry, but I do not.
Thus I must be doing some wrong.

I attached a minimalistic example that demonstrates my problem.

Thanks for any help,
David Andrs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20091014/bf1a5824/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a1.cpp
Type: application/octet-stream
Size: 1271 bytes
Desc: a1.cpp
Url : https://software.sandia.gov/pipermail/trilinos-users/attachments/20091014/bf1a5824/attachment.obj 

More information about the Trilinos-Users mailing list