On Mon, Jan 25, 2010 at 5:40 PM, Don Pellegrino <span dir="ltr">&lt;<a href="mailto:don@drexel.edu">don@drexel.edu</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Mon, Jan 25, 2010 at 12:25 PM, Matthew Knepley &lt;<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>&gt; wrote:<br>
&gt; I think you want to Viewer technology.<br>
<br>
Thanks for pointing me at the PetscViewer functions.  I wrote a quick<br>
test case to write a sparse matrix to an HDF5 file<br>
[<a href="http://cluster.ischool.drexel.edu/%7Est96wym4/flumap/cgit/cgit.cgi/exp007/tree/src/assign/assign_blast_scores.c?id=899b82178d3bcc365b07447a5686635c5856c39e" target="_blank">http://cluster.ischool.drexel.edu/~st96wym4/flumap/cgit/cgit.cgi/exp007/tree/src/assign/assign_blast_scores.c?id=899b82178d3bcc365b07447a5686635c5856c39e</a>].<br>

 Unfortunately I receive the following run-time error:<br></blockquote><div><br>Yes, so far people have just been saving Vecs (fields).<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

[0]PETSC ERROR: --------------------- Error Message<br>
------------------------------------<br>
[0]PETSC ERROR: No support for this operation for this object type!<br>
[0]PETSC ERROR: Viewer type hdf5 not supported by SeqAIJ matrices!<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Release Version 3.0.0, Patch 10, Tue Nov 24<br>
16:38:09 CST 2009<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: ./updator on a linux-gnu named coffee by don Mon Jan<br>
25 18:28:31 2010<br>
[0]PETSC ERROR: Libraries linked from<br>
/home/don/Apps/Installers/petsc-3.0.0-p10/linux-gnu-c-debug/lib<br>
[0]PETSC ERROR: Configure run at Mon Jan 25 17:57:35 2010<br>
[0]PETSC ERROR: Configure options --with-hdf5=1 --with-hdf5-dir=/usr<br>
--with-shared<br>
[0]PETSC ERROR:<br>
------------------------------------------------------------------------<br>
[0]PETSC ERROR: MatView_SeqAIJ() line 625 in src/mat/impls/aij/seq/aij.c<br>
[0]PETSC ERROR: MatView() line 643 in src/mat/interface/matrix.c<br>
<br>
So it seems that writing sparse matrices to HDF5 is not yet<br>
implemented.  I suppose such an implementation should be possible.<br>
For now I&#39;ll try a binary viewer as suggested by Barry Smith.<br>
<br>
If I were to implement the writer using HDF5 where should I start in<br>
the PETSc source?<br>
</blockquote></div><br>I would look at the binary viewer.<br><br clear="all">   Matt<br><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>