Hello,

You don't need to synchronize anything the function has an MPI_Barrier. 
This is the reason for the comment. If one processor call the function but 
the others don't, the code will hang.

Best,

Bruno


On Thursday, February 17, 2022 at 4:01:32 AM UTC-5 uclu...@gmail.com wrote:

> Dear all, 
>
> I am copying a distributed vector using the following function:
>
> Vector <https://www.dealii.org/current/doxygen/deal.II/classVector.html>
> <Number>& Vector 
> <https://www.dealii.org/current/doxygen/deal.II/classVector.html>< Number 
> >::operator=(const PETScWrappers::VectorBase 
> <https://www.dealii.org/current/doxygen/deal.II/classPETScWrappers_1_1VectorBase.html>
>  & v)
>
> In the documentation it is written:
> "*Note that due to the communication model used in MPI, this operation 
> can only succeed if all processes do it at the same time when v is a 
> distributed vector: It is not possible for only one process to obtain a 
> copy of a parallel vector while the other jobs do something else."*
>
>  I would like to ask how can I synchronize all the processes to call the 
> function operator() at the same time. Is there a barrier function or 
> similar?
>
> Thank you
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/aaacd433-702e-46b6-9e46-0f2d8ecd0845n%40googlegroups.com.

Reply via email to