Hello, broadcast returns the updated value. tt is unchanged. See the documentation here <https://dealii.org/current/doxygen/deal.II/namespaceUtilities_1_1MPI.html#a06acbd699ce4258b971783db29e1c6e8>
Best, Bruno On Thursday, November 2, 2023 at 10:26:46 AM UTC-4 [email protected] wrote: > I tried to sent a double vector with size of 5 to all other cpus. > but it seems no values have been broadcase out. > only the root has values in tt vector. all other cpus only have zero > values in tt. > Could you please help me out. > > vector<double> tt(5); > if(Utilities::MPI::this_mpi_process(mpi_communicator)==0) { > for(int i=0;i<tt.size();i++) tt[i]=1.0*i;} > Utilities::MPI::broadcast(mpi_communicator,tt); > > > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/9a921ab4-680c-4eec-a93a-983209eb39d5n%40googlegroups.com.
