<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">but when we use vecveiw to veiw the seqx, it gives value only with 1 process<br><br><br><br><br><div></div><div id="divNeteaseMailCard"></div><br>At 2013-08-01 18:36:09,"Dave May" <dave.mayhem23@gmail.com> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr"><div>When you called<br>  VecCreateSeq(PETSC_COMM_SELF,5,&seqx);<br></div>you created a sequential vector on each process - not just on rank 0.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 1 August 2013 12:11, ¶¡ÀÏʦ <span dir="ltr"><<a href="mailto:ztdepyahoo@163.com" target="_blank">ztdepyahoo@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.7;font-size:14px;font-family:arial"><div style="line-height:1.7;font-size:14px;font-family:arial">I create a sequential vec seqx, and i get it value with VecGetArrary, since seqx is created  only in process 0, why every process can output the value of the seqx. <br>
<div style="line-height:1.7;font-size:14px;font-family:arial"><div style="line-height:1.7;font-size:14px;font-family:arial"><div style="line-height:1.7;font-size:14px;font-family:arial"><br><br> VecCreateSeq(PETSC_COMM_SELF,5,&seqx);<br>
<span title="neteasefooter"><span></span></span></div> VecView(seqx,PETSC_VIEWER_STDOUT_WORLD);<br> double *seqarry;<br> VecGetArray(seqx,&seqarry);<br><span title="neteasefooter"><span></span></span></div><br> for(int i=0;i<n;i++)<br>
   cout<<MyRank<<"  seqarry "<<s
 
 eqarry[i]<<endl;<br><span title="neteasefooter"><span></span></span></div><br><br><span title="neteasefooter"><span></span></span></div><br><br><span title="neteasefooter"><span></span></span></div><br><br><span title="neteasefooter"><span></span></span></blockquote>
</div><br></div>
</blockquote></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>