On Thu, Jun 9, 2011 at 5:05 PM, Li, Zhisong (lizs) <span dir="ltr"><<a href="mailto:lizs@mail.uc.edu">lizs@mail.uc.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi, Petsc Team,<br>
<br>
<br>
I know that we can write multiple vectors or matrices into one binary file by doing<br>
<br>
PetscViewerBinaryOpen(COMM, "./vector.dat", FILE_MODE_WRITE, &viewer1); <br>
VecView(a, viewer1); <br>
PetscViewerBinaryOpen(COMM, "./vector.dat", FILE_MODE_APPEND, &viewer1);<br>
VecView(b, viewer1);<br></div></div></blockquote><div><br></div><div>Just call VecView twice without reopening the file.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<br>
But if we want to read from "./vector.dat" and distribute the respective values to vector a and b, how to realize that? What I previously knew is "one file for one vector only" when reading.
<br></div></div></blockquote><div><br></div><div>Just call VecLoad twice.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
Another question is about the HDF5 format. I've included "petscsys.h" at the code header. But when I complied (make file) the code, the error message indicated "undefined reference to PetscViewerHDF5Open". The error also happens to the example codes for
this function. What's wrong with is? Is it no more supported? <br></div></div></blockquote><div><br></div><div>Did you configure with support for HDF5, --with-hdf5?</div><div><br></div><div> Thanks,</div><div><br>
</div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<br>
Thank you.<br>
<br>
<br>
<br>
Zhisong Li<br>
</div>
</div>
</blockquote></div><br><br clear="all"><br>-- <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<br>