[Trilinos-Users] How to broad case a EpetraSerialVector to all the cpus.
Heroux, Michael A
maherou at sandia.gov
Mon Jun 19 18:05:42 EDT 2017
There is no direct function to perform this operation, but you should be able to complete the operation with these steps:
?
Epetra_SerialVector vector(length); // length is an integer you previously defined, create on each MPI rank
if (comm.MyPID()?==0) {
// fill vector on PE 0 with values
}
comm.Broadcast(vector.Values(), vector.Length(), 0); // Broadcast from PE 0 to all others.
?Note: The "comm" object is an Epetra_MpiComm object (perhaps accessed via the Epetra_Comm base class. If you do not have direct access to a comm object, you can access one from any of the distributed data objects, for example an Epetra_Map.
________________________________
From: Trilinos-Users <trilinos-users-bounces at trilinos.org> on behalf of ztdepyahoo at gmail.com <ztdepyahoo at gmail.com>
Sent: Sunday, June 18, 2017 10:36 AM
To: trilinos-users
Subject: [EXTERNAL] [Trilinos-Users] How to broad case a EpetraSerialVector to all the cpus.
Dear professor:
Does Epetra support to broadcase a EpetraSerialVector to all the oter cpus.
Regards
________________________________
ztdepyahoo at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20170619/6ea976c9/attachment.html>
More information about the Trilinos-Users
mailing list