[petsc-users] vtk output ASCII or binary

Matthew Knepley knepley at gmail.com
Tue Mar 4 15:49:24 CST 2014


On Tue, Mar 4, 2014 at 3:43 PM, Xiangdong <epscodes at gmail.com> wrote:

> If I use VecView and write the vector into vtk file, is this done in
> parallel or serial? Does  each processor send the data to processor 0 and
> let it write to the disk?
>
> Is it possible to let each processor write its own portion and merge them
> together later?
>

I urge you strongly to avoid premature optimization and worrying.

If you want to discuss details that is fine, but I do not think the fears
expressed
above are grounded in reality. Network bandwidth is at least as good as
memory
bandwidth, so sending to proc 0 is not a problem below 10,000 procs or so.
You
might think serializing the disk writes would be, but its very likely your
machine
is doing that anyway by having a small number (usually 1) of I/O nodes. For
high
core counts we can use MPI I/O which you can turn on with a command line
argument.

   Matt


> Thank you.
>
> Xiangdong
>
>
> On Tue, Mar 4, 2014 at 2:06 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
>> On Tue, Mar 4, 2014 at 12:58 PM, Xiangdong <epscodes at gmail.com> wrote:
>>
>>> Thanks, Matt.
>>>
>>> Given that the FILE_MODE_APPEND is not supported for VTK format, is it
>>> possible to write two vectors into the same VTK data file?
>>>
>>
>> Yes, just call VecView() twice.
>>
>>    Matt
>>
>>
>>> Thank you.
>>>
>>> Xiangdong
>>>
>>>
>>> On Tue, Mar 4, 2014 at 1:52 PM, Matthew Knepley <knepley at gmail.com>wrote:
>>>
>>>> On Tue, Mar 4, 2014 at 12:31 PM, Xiangdong <epscodes at gmail.com> wrote:
>>>>
>>>>> What is the difference between PetscViewerSetType and
>>>>> PetscViewerSetFormat? It seems that the first one take argument like
>>>>> PETSCVIEWERVTK, while the second one takes PETSC_VIEWER_VTK_VTS.
>>>>>
>>>>
>>>> A viewer type is the object type, just like other PETSc object, e.g.
>>>> KSP. The format is a particular version
>>>> of that output. For example, ASCII viewer is a type, whereas Matlab is
>>>> a format.
>>>>
>>>>
>>>>> By the way, how can I find a full list of formats? Clearly,
>>>>> PETSC_VIEWER_VTK_VTS is not listed in online documentation for
>>>>> PetscViewerSetFormat
>>>>>
>>>>> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Viewer/PetscViewerSetFormat.html
>>>>>
>>>>
>>>> It is listed in the complete list:
>>>>
>>>>
>>>> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Viewer/PetscViewerFormat.html
>>>>
>>>>     Matt
>>>>
>>>>
>>>>>  Thank you.
>>>>>
>>>>> Xiangdong
>>>>>
>>>>>
>>>>> On Tue, Mar 4, 2014 at 1:02 PM, Matthew Knepley <knepley at gmail.com>wrote:
>>>>>
>>>>>> On Tue, Mar 4, 2014 at 11:44 AM, Xiangdong <epscodes at gmail.com>wrote:
>>>>>>
>>>>>>> Hello everyone,
>>>>>>>
>>>>>>> When I use PetsViewerVTKOpen to output vec in vtk format, is it in
>>>>>>> ASCII format or binary format? Are there any options to choose between them?
>>>>>>>
>>>>>>
>>>>>> It is determined by the format, e.g. PETSC_VIEWER_VTK_VTU.
>>>>>>
>>>>>>    Matt
>>>>>>
>>>>>>
>>>>>>> Thank you.
>>>>>>>
>>>>>>> Xiangdong
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> 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
>>>>
>>>
>>>
>>
>>
>> --
>> 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/20140304/cd4725dd/attachment-0001.html>


More information about the petsc-users mailing list