Always always always check the return codes for each call (you can<br>use the CHKERRQ macro). Otherwise, you have no idea whether an<br>error occurred during the call.<br><br> Matt<br><br><div class="gmail_quote">On Mon, Feb 16, 2009 at 7:05 PM, Yixun Liu <span dir="ltr"><<a href="mailto:enjoywm@cs.wm.edu">enjoywm@cs.wm.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
I want to output matrix and vector into matlab.<br>
// output a vector,<br>
PetscViewer bviewer;<br>
PetscViewerCreate(PETSC_COMM_WORLD, &bviewer);<br>
PetscViewerSetType(bviewer, PETSC_VIEWER_ASCII);<br>
PetscViewerSetFormat(bviewer, PETSC_VIEWER_ASCII_MATLAB);<br>
PetscViewerFileSetName(bviewer, bname);<br>
VecView(externalForcesVector, bviewer);//externalForcesVector is a<br>
parallel vector.<br>
<br>
However, the output file contains nothing.<br>
<br>
Thanks.<br>
<font color="#888888"><br>
Yixun<br>
<br>
<br>
</font></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>