[petsc-users] A few questions about hdf5 viewer

Matthew Knepley knepley at gmail.com
Thu Jan 19 18:49:59 CST 2012


On Thu, Jan 19, 2012 at 6:44 PM, Mohamad M. Nasr-Azadani
<mmnasr at gmail.com>wrote:

> You should just create a parallel Vec to hold the 1D data.
> DAGetLocalInfo() tells you all the local sizes.
>
> Thanks Matt. But I am not sure how this would help since PETSC_COMM_WORLD
> includes all the processors and in all three directions whereas the 1-D
> data is only the size of Nx points.
> This vector is not big at all, I could even create is on one processor.
> The only concern that I have is
> can I create an *.h5 file using PETSC_COMM_WORLD, dump the data, close the
> file and then, re-open the file (append mode) with a different viewer
> created via PETSC_COMM_SELF, and dump the coordinates vector to the end of
> it? Of course, I only call PETSC_COMM_SELF on processor zero.
>

Then give 0 sizes on everything but 0.

  Matt


> Thanks,
> M
>
>
> On Thu, Jan 19, 2012 at 4:33 PM, Matthew Knepley <knepley at gmail.com>wrote:
>
>> On Thu, Jan 19, 2012 at 6:08 PM, Mohamad M. Nasr-Azadani <
>> mmnasr at gmail.com> wrote:
>>
>>> Thanks Jed.
>>> My solution to that was to create a 1D vector local to for instance
>>> processor zero that holds all the coordinates. Then after I dumped all the
>>> parallel data to the *.h5 file, I create another viewer on processor zero
>>> or PETSC_COMM_SELF and dump that new vector including tHe coordinates to
>>> the end of the existing file.
>>> Do you think that should be possible?
>>>
>>
>> You should just create a parallel Vec to hold the 1D data.
>> DAGetLocalInfo() tells you all the local sizes.
>>
>>    Matt
>>
>>
>>> Thanks,
>>> Mohamad
>>>
>>>
>>>
>>>
>>> On Thu, Jan 19, 2012 at 4:02 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>>>
>>>> On Thu, Jan 19, 2012 at 18:00, Mohamad M. Nasr-Azadani <
>>>> mmnasr at gmail.com> wrote:
>>>>
>>>>> What I need is just to add 3 1-D arrays of (x[Nx]+y[Ny]+z[Nz])
>>>>> including the grid coordinates to the end of the *.h5 file and then later
>>>>> on, I can use any visualization software to load the data using those
>>>>> coordinates. I am using orthogonal grid, that's why I don't need  all the
>>>>> (x,y,z) coordinates for each cell.
>>>>
>>>>
>>>> If you want this special case, you have to manage it by hand.
>>>>
>>>
>>>
>>
>>
>> --
>> 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
>>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120119/ee1a6f18/attachment-0001.htm>


More information about the petsc-users mailing list