[Trilinos-Users] How to exchange the Epetra_Vector ghost values between two processors.

Heroux, Mike MHeroux at CSBSJU.EDU
Sat Jun 10 10:50:01 EDT 2017


Epetra provides two related classes for exchanging ghost values.  One is called Epetra_Import, the other Epetra_Export.

The Import class is used when each process knows the global IDs that it wants to receive from other processors.  This situation is common, for example, when using a row-based partitioning for sparse MV, y = Ax.  While Epetra supports a more sophisticated partitioning, it is common for a process to be assigned a group of matrix rows and the corresponding elements of x and y.  To computing the sparse MV, each process needs to gather elements of x for column IDs that are not associated with its rows.

In this case, you construct an Epetra_Import object that can then be used to complete the import of these x elements when needed.

Epetra_Export is a companion class that can be used when the process knows what it needs to send to another process.

Note that it is often the case that an Epetra_Import object can be used to perform an export, and the other way around.  Which one you use is your choice, based on the above descriptions.

The documentation for these classes gives example and details.

Mike

On Jun 8, 2017, at 7:42 PM, "ztdepyahoo at gmail.com<mailto:ztdepyahoo at gmail.com>" <ztdepyahoo at gmail.com<mailto:ztdepyahoo at gmail.com>> wrote:

Dear friends:
   In Epetra_Vector example 9, we create a vector with the following map

  if( Comm.MyPID() == 0 ) {
    NumMyElements = 3;
    MyGlobalElements.Size(NumMyElements);
    MyGlobalElements[0] = 0;
    MyGlobalElements[1] = 1;
    MyGlobalElements[2] = 2;
  } else {
    NumMyElements = 3;
    MyGlobalElements.Size(NumMyElements);
    MyGlobalElements[0] = 1;
    MyGlobalElements[1] = 2;
    MyGlobalElements[2] = 3;
  }

  I want to exchange the ghost values with global id 1 and 2 between these two processors.
   Could you please tell me how to resolve this problems.
Regards
_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at trilinos.org<mailto:Trilinos-Users at trilinos.org>
https://trilinos.org/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20170610/d077c3ed/attachment.html>


More information about the Trilinos-Users mailing list