[petsc-users] Vector layout in PetscBinaryRead.m
Matthew Knepley
knepley at gmail.com
Wed May 1 17:03:10 CDT 2019
On Wed, May 1, 2019 at 5:57 PM zakaryah via petsc-users <
petsc-users at mcs.anl.gov> wrote:
> Thanks Matt. I have had problems getting HDF5 to work when I run my
> solver in parallel. Can you link me to an example which writes a vector as
> HDF5 that will work in parallel? To be clear - I don't care if the I/O is
> in serial, I just need the VecView to not crash with multiple processors.
>
Any crash is a bug. Here is generic code:
ierr = VecViewFromOptions(v, NULL, "-my_vec_view");CHKERRQ(ierr);
and then run with
./myprog -my_vec_view hdf5:v.h5
Thanks,
Matt
> On Wed, May 1, 2019 at 5:51 PM Matthew Knepley <knepley at gmail.com> wrote:
>
>> On Wed, May 1, 2019 at 5:44 PM zakaryah via petsc-users <
>> petsc-users at mcs.anl.gov> wrote:
>>
>>> I'm using PETSc to solve some equations, outputting the results using
>>> PetscViewerBinaryOpen and VecView, then loading the vector files into
>>> Matlab using PetscBinaryRead.m. The vectors are global vectors created
>>> from a 3D DMDA. Is there a way to extract the layout from the binary file,
>>> so that I can visualize the vectors on a 3D grid?
>>>
>>
>> No, we do not preserve that information in the PETSc binary format. We
>> have richer output that does, like HDF5.
>>
>> Thanks,
>>
>> Matt
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which their
>> experiments lead.
>> -- Norbert Wiener
>>
>> https://www.cse.buffalo.edu/~knepley/
>> <http://www.cse.buffalo.edu/~knepley/>
>>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190501/ac8dd4dc/attachment-0001.html>
More information about the petsc-users
mailing list