<div dir="ltr">On Thu, Apr 18, 2013 at 8:26 AM, Alexei Matveev <span dir="ltr"><<a href="mailto:alexei.matveev+petsc@gmail.com" target="_blank">alexei.matveev+petsc@gmail.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Do I understand it correctly that there is no way currently to load a distributed<br>Vec from the file without knowing and setting its dimensions first?<br></blockquote><div><br></div></div><div>I am not sure what you mean here. The point is that prescribing the layout of a Vec</div>
<div>in a file is clearly wrong. We would like to be able to save from one parallel configuration</div><div>and load on another (maybe serial). Thus, the loader prescribes the layout.</div><br></div></div></div></blockquote>
</div><br>I see. You understood me correctly. I used that feature to to quickly load<br>a Vec from a file and dump it in ACSII or to do simple arithmetics. Admittedly<br>that was usually done in serial runs.<br><br>So the comment here is actually wrong, since you say it is not going to be<br>
supported by any viewer/loader pair?<br></blockquote><div><br></div><div style>No, I have to be more specific. PETSc saves the Vec in a uniform format, but</div><div style>also saves information "out of band" in a .info file. If the input Vec has not been</div>
<div style>already partitioned, the plan was to use the .info file to recreate the original</div><div style>layout.</div><div style><br></div><div style> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
/* This one is supposed to save enough meta-info (such as distribution<br> pattern, dimensions) to recover the vector from scratch: */<br>void vec_save (const char file[], const Vec vec)<br>
{<br> PetscViewer viewer;<br><br> PetscViewerBinaryOpen (PETSC_COMM_WORLD, file, FILE_MODE_WRITE, &viewer);<br> VecView (vec, viewer);<br> PetscViewerDestroy (viewer);<br>}<br><br>Sorry for spamming the channel,<br>
<br>Alexei.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>