Awesome! That is fantastic. :-)<div><br></div><div>Thanks Barry for your prompt response. </div><div>Mohamad</div><div><br><br><div class="gmail_quote">On Mon, Oct 10, 2011 at 5:45 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
On Oct 10, 2011, at 7:41 PM, Mohamad M. Nasr-Azadani wrote:<br>
<br>
> Thanks Barry,<br>
><br>
> I am still not 100% sure if I can do this.<br>
> Say I have save the global vector obtained by a DA (3D) that is shared amongst 16 processors. :.<br>
> Can I load that data into a vector obtained from a DA (3D, same size obviously) that is shared on 1 processor?<br>
<br>
</div> ABSOLUTELY. Or a DA on 2 processes etc.<br>
<font color="#888888"><br>
Barry<br>
</font><div><div></div><div class="h5"><br>
><br>
> Thanks,<br>
> Best,<br>
> Mohamad<br>
><br>
><br>
> On Mon, Oct 10, 2011 at 5:36 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
><br>
> On Oct 10, 2011, at 7:31 PM, Mohamad M. Nasr-Azadani wrote:<br>
><br>
> > Hi<br>
> > I was wondering if it would be possible if I write a global vector (associated with a certain 3D distributed array) to file<br>
> > via:<br>
> ><br>
> > ierr = PetscViewerBinaryOpen(PCW1, filename, FILE_MODE_WRITE, &writer);<br>
> > ierr = VecView(vec_data, writer);<br>
> > ierr = PetscViewerDestroy(writer);<br>
> ><br>
> > And then load the data into a global vector which is not created using the same parallel layout?<br>
> > A simple example for this case would be to write the runtime data (parallel vector) to file and then just load the saved vector to do some simple SERIAL post processing.<br>
><br>
> YES.<br>
><br>
> The vector is saved to the file in the "natural ordering" that is starting with the logically 0,0,0 coordinate then increasing through the x axis, then the y axis then the z axis. To load back in in parallel you need to pass to VecLoad() a vector obtained with the appropriate DMCreateGlobalVector().<br>
><br>
><br>
> Barry<br>
><br>
> ><br>
> > Thanks in advance,<br>
> > Best<br>
> > Mohamad<br>
> ><br>
> ><br>
> ><br>
> ><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>