[petsc-users] Output portability, binary, HDF5, ascii
Barry Smith
bsmith at mcs.anl.gov
Thu Feb 18 15:10:43 CST 2010
On Feb 18, 2010, at 2:35 PM, Arturo Fountain wrote:
> Greetings:
>
> I've been using the PETSc libraries for a few weeks now and am very
> impressed with the software. Great work folks!
>
> I'm writing with an issue I've been unable to work around. I'd like to
> save output and import it into an external program (hdfview or matlab,
> for example). Vectors are no problem to output but as mentioned at
> https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2010-January/005796.html
> ,
> this is not possible in PETSc for matrices.
This is an indirect way of doing but since PETSc can dump vectors
and sparse matrices in PETSc format rapidly and they can be read into
Matlab rapidly, could you then use Matlab's HDF5 capability to write
then into any HDF5 format you like? I realize this is not ideal, but
it is just a single extra postprocessing step.
You could also write your own PETSc object viewers that wrote to
HDF5, for sparse matrices, but I think it is easy just to dump to
Matlab and have it save it in the format you want.
ASCII is just SO slow for large data sets I think it is
impractical.
Barry
> Furthermore: "It won't buy
> you any speed, disk space, or portability."
>
> Certainly the PETSc binary format works fine for PETSc I/O but I am
> unable to find anything to convert between this format and any other.
> I'm most concerned with portability; I would like to utilize external
> visualization packages. Is it standard practice to simply use ASCII
> output? I can certainly do that but for larger problems size will
> certainly become an impending issue....
>
> Thanks in advance for any help you can offer,
>
> Arturo
More information about the petsc-users
mailing list