Thanks Barry, <div><br></div><div>I am still not 100% sure if I can do this. </div><div>Say I have save the global vector obtained by a DA (3D) that is shared amongst 16 processors. </div><div>Can I load that data into a vector obtained from a DA (3D, same size obviously) that is shared on 1 processor? </div>
<div><br></div><div>Thanks, </div><div>Best, </div><div>Mohamad</div><div><br><br><div class="gmail_quote">On Mon, Oct 10, 2011 at 5:36 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><div></div><div class="h5"><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>
</div></div> 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>
<font color="#888888"><br>
<br>
Barry<br>
</font><div><div></div><div class="h5"><br>
><br>
> Thanks in advance,<br>
> Best<br>
> Mohamad<br>
><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>