<div dir="ltr">Hi, I hope everyone is well.<br><br>I have a MPI vector, I selected some elements of this vector and for some processes there is not selected elements (I stored the indices elements into an array). So, I wan to to create a MPI vector using these selected elements, the selected elements must be fully distributed in a MPI vector, but I do not figure out how to do it properly. <br><br>If I use VecGetSubVector, it creates a MPI vector, but in those processes where there is not selected elements, the subvector portion is empty, this means that the resultant vector is unbalanced.<br><br>If I use:<br><br>VecScatterCreate(Vec x,IS ix,Vec y,IS iy,VecScatter *ctx);<br>VecScatterBegin(VecScatter ctx,Vec x,Vec y,INSERT VALUES,SCATTER FORWARD);<br>VecScatterEnd(VecScatter ctx,Vec x,Vec y,INSERT VALUES,SCATTER FORWARD);<br><br>The vector is still unbalanced.<br><br>Any suggestion?<br><br>Kind regards.</div>