Do you have any examples to show how to output the sparsity picture? thanks a lot.<br><br>Yujie<br><br><div><span class="gmail_quote">On 1/23/08, <b class="gmail_sendername">Matthew Knepley</b> <<a href="mailto:knepley@gmail.com">
knepley@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
On Jan 23, 2008 2:18 PM, Yujie <<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>> wrote:<br>> Thank you for your further explanation. I just want to use this data in<br>> other packages. I think that ASCII file is likely better. Because I don't
<br>> know the format of the binary file? how to find it?<br><br>Look at MatView_SeqAIJ_Binary() in src/mat/impls/aij/seq/aij.c. The<br>format is pretty simple.<br><br>> In addition, do you have any better methods to save the sparsity structure
<br>> picture of the matrix? Now, I use "-mat_view_draw" to do this. However, the<br>> speed is very slow and the picture is small. I want to get a big picture and<br>> directly save it to the disk?<br>
> could you give me some advice? thanks a lot.<br><br>We do not have a better way to make the sparsity picture. I assume you could<br>write something that decides how many pixels to use, calculates an average<br>occupancy per pixel, and writes a BMP or something.
<br><br> Matt<br><br>> Regards,<br>> Yujie<br>><br>> On 1/23/08, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a> > wrote:<br>> > On Jan 22, 2008 11:01 PM, Yujie <<a href="mailto:recrusader@gmail.com">
recrusader@gmail.com</a>> wrote:<br>> > > Dear Matt:<br>> > ><br>> > > thank you for your reply. Do you have any method to generate an ascii<br>> file<br>> > > of the huge sparse matrix? thanks
<br>> ><br>> > I think you miss my point. The PETSc function is not a bad way to generate<br>> > ASCII matrices. ASCII matrices make "no sense" for large operators.<br>> ><br>> > Matt
<br>> ><br>> > > Regards,<br>> > > Yujie<br>> > ><br>> > ><br>> > ><br>> > > On 1/23/08, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com
</a>> wrote:<br>> > > > On Jan 22, 2008 8:50 PM, Yujie < <a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>> wrote:<br>> > > > > Hi everyone:<br>> > > > ><br>
> > > > > #include "petsc.h"<br>> > > > > PetscErrorCode PetscViewerASCIIOpen(MPI_Comm comm,const char<br>> > > > > name[],PetscViewer *lab)<br>> > > > >
<br>> > > > > #include "petsc.h"<br>> > > > > PetscErrorCode PetscViewerBinaryOpen(MPI_Comm comm,const char<br>> > > > > name[],PetscFileMode type,PetscViewer *binv)
<br>> > > > ><br>> > > > > if the difference between them is that one for ASCII output and the<br>> > > other<br>> > > > > for Binary output, why are there different parameters?
<br>> > > ><br>> > > > It is historical. If you want to be generic, you should use<br>> > > ><br>> > > > PetscViewerCreate()<br>> > > > PetscViewerSetType()<br>
> > > > PetscViewerFileSetMode()<br>> > > > PetscViewerFileSetName()<br>> > > ><br>> > > > which can create both.<br>> > > ><br>> > > > > The speed to output matrix is very fast when I use
<br>> > > PetscViewerBinaryOpen.<br>> > > > > However, when I use PetscViewerASCIIOpen, I can't get the matrix<br>> output.<br>> > > the<br>> > > > > code always is running and it has taken about one day! what's the
<br>> > > problem?<br>> > > > > thank you.<br>> > > ><br>> > > > ASCII files do not make sense for large matrices. You should use<br>> binary<br>> > > files.<br>
> > > ><br>> > > > Matt<br>> > > ><br>> > > > > Regards,<br>> > > > > Yujie<br>> > > > ><br>> > > > ><br>> > > > >
<br>> > > ><br>> > > ><br>> > > ><br>> > > > --<br>> > > > What most experimenters take for granted before they begin their<br>> > > > experiments is infinitely more interesting than any results to which
<br>> > > > their experiments lead.<br>> > > > -- Norbert Wiener<br>> > > ><br>> > > ><br>> > ><br>> > ><br>> ><br>> ><br>> ><br>> > --
<br>> > What most experimenters take for granted before they begin their<br>> > experiments is infinitely more interesting than any results to which<br>> > their experiments lead.<br>> > -- Norbert Wiener
<br>> ><br>> ><br>><br>><br><br><br><br>--<br>What most experimenters take for granted before they begin their<br>experiments is infinitely more interesting than any results to which<br>their experiments lead.
<br>-- Norbert Wiener<br><br></blockquote></div><br>