[Paraview] xdmf with field data in multiple files

Peter Brady ptb at lanl.gov
Fri Nov 20 11:31:24 EST 2015


Thanks for the reply.

According to the hdf5 website 
https://www.hdfgroup.org/hdf5-quest.html#p5comp, it is not currently 
possible to do parallel io with compression so I won't be able to go 
that route.

I also just recently abandoned using xdmf functions to build a vector 
from 3 scalar datasets because it didn't seem well parallelized (i.e. 
the pvserver crashed when doing largish distributed rendering which I'm 
assuming is caused by loading all the data in the root process and then 
applying the function and then distributing).

Can anyone clarify the level of parallelization in using xdmf functions?




On 11/19/2015 03:43 PM, Ken Sheldon wrote:
> Peter,
> Can you define a single geometry (128x64x64 in your example)
> Then, use the XDMF JOIN function to concatenate the individual small data items into one larger data item?
>
> Example:
>
>      <DataItem ItemType="Function" Function="JOIN($0 ; $1)">
>          <DataItem DataType="Float" Precision="8" Dimensions="64 64 64" Format="Binary">G.1.bin</DataItem>
>          <DataItem DataType="Float" Precision="8" Dimensions="64 64 64" Format="Binary">G.2.bin</DataItem>
>      </DataItem>
>
>
> Depending on the amount of entropy in your data, you might also see significant improvements in file writing if you use HDF5 with compression enabled.  If that provides sufficient improvement, you might not need to split the data into separate files.
>
>
> Date: Tue, 17 Nov 2015 15:46:54 -0700
> From: Peter Brady <ptb at lanl.gov>
> To: paraview at paraview.org
> Subject: Re: [Paraview] xdmf with field data in multiple files
> Message-ID: <564BAE5E.9080803 at lanl.gov>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> So it seems that this can be achieved using spatial grid collections.
> Here's what I have now:
>
> <?xml version="1.0" encoding="utf-8"?><!DOCTYPE Xdmf SYSTEM "Xdmf.dtd">
> <Xdmf Version="2.0">
>     <Domain>
>       <Topology TopologyType="3DCoRectMesh" Dimensions="64 64 64"/>
>       <Topology TopologyType="3DCoRectMesh" Dimensions="64 64 64"/>
>
>       <Geometry GeometryType="Origin_DxDyDz">
>         <DataItem Format="XML" NumberType="Float" Dimensions="3">
>          -1.000000 -0.500000 -0.500000
>         </DataItem>
>         <DataItem Format="XML" NumberType="Float" Dimensions="3">
>           0.01574803 0.01587301 0.01587301
>         </DataItem>
>       </Geometry>
>
>       <Geometry GeometryType="Origin_DxDyDz">
>         <DataItem Format="XML" NumberType="Float" Dimensions="3">
>           0.007874 -0.500000 -0.500000
>         </DataItem>
>         <DataItem Format="XML" NumberType="Float" Dimensions="3">
>           0.01574803 0.01587301 0.01587301
>         </DataItem>
>       </Geometry>
>
>       <Grid Name="TimeSeries" GridType="Collection"
> CollectionType="Temporal">
>         <Time TimeType="List">
>           <DataItem Format="XML" NumberType="Float" Dimensions="1">
>            0.00000E+00
>           </DataItem>
>         </Time>
>         <Grid Name="0" GridType="Collection" CollectionType="Spatial">
>           <Grid Name="Section 1" GridType="Uniform">
>             <Topology Reference="/Xdmf/Domain/Topology[1]"/>
>             <Geometry Reference="/Xdmf/Domain/Geometry[1]"/>
>             <Attribute Name="G" Type="Scalar" Center="Node">
>               <DataItem DataType="Float" Precision="8" Dimensions="64 64
> 64" Format="Binary">
>                 G.1.bin
>               </DataItem>
>             </Attribute>
>           </Grid>
>
>           <Grid Name="Section 2" GridType="Uniform">
>             <Topology Reference="/Xdmf/Domain/Topology[2]"/>
>             <Geometry Reference="/Xdmf/Domain/Geometry[2]"/>
>             <Attribute Name="G" Type="Scalar" Center="Node">
>               <DataItem DataType="Float" Precision="8" Dimensions="64 64
> 64" Format="Binary">
>                 G.2.bin
>               </DataItem>
>             </Attribute>
>           </Grid>
>
>         </Grid> <!-- End of Spatial Collection 0 -->
>       </Grid> <!-- End of Temporal Collection -->
>     </Domain>
> </Xdmf>
>
> This works decently well but there is a gap of one grid cell between my
> grid sections.  I can make this go away by having each section extend
> their dimensions by 1 in the appropriate directions but is there a
> better way?  Specifically I would like to know if there is a way to
> specify the connectivity between the grids in my collection or if
> something like Subsets are the way to go.
>
> Thanks,
> Peter.
>
> On 11/17/2015 01:09 PM, Peter Brady wrote:
>> I've been using an xdmf file like the following:
>>
>> <?xml version="1.0" encoding="utf-8"?><!DOCTYPE Xdmf SYSTEM "Xdmf.dtd">
>> <Xdmf Version="2.0">
>>    <Domain>
>>      <Topology TopologyType="2DCoRectMesh" Dimensions="256 512"/>
>>      <Geometry GeometryType="Origin_DxDy">
>>        <DataItem Format="XML" NumberType="Float" Dimensions="2">
>>         0.00000E+00 0.00000E+00
>>        </DataItem>
>>        <DataItem Format="XML" NumberType="Float" Dimensions="2">
>>         1.22718E-02 1.22959E-02
>>        </DataItem>
>>      </Geometry>
>>      <Grid Name="TimeSeries" GridType="Collection"
>> CollectionType="Temporal">
>>        <Time TimeType="List">
>>          <DataItem Format="XML" NumberType="Float" Dimensions="2">
>>           0.00000E+00 1.00399E-01
>>          </DataItem>
>>        </Time>
>>        <Grid Name="0" GridType="Uniform">
>>          <Topology Reference="/Xdmf/Domain/Topology[1]"/>
>>          <Geometry Reference="/Xdmf/Domain/Geometry[1]"/>
>>          <Attribute Name="density" Type="Scalar" Center="Node">
>>            <DataItem DataType="Float" Precision="8" Dimensions="256
>> 512" Format="Binary" Seek="224">
>>             rstrt.0000.bin
>>            </DataItem>
>>          </Attribute>
>>          <Attribute Name="temperature" Type="Scalar" Center="Node">
>>            <DataItem DataType="Float" Precision="8" Dimensions="256
>> 512" Format="Binary" Seek="0">
>>             rstrt.0000.6.bin
>>            </DataItem>
>>          </Attribute>
>>          ...
>>        </Grid>
>> ...
>> </Xdmf>
>>
>> However, as the simulations have gotten larger, the time to write a
>> single file like "rstrt.0000.bin" in parallel has become obscene. My
>> plan is to have groups of processors write different files where the
>> extents written will be a continuous slab of ijk coordinates. I've
>> looked at the documentation for hyperslabs in xdmf but can't quite see
>> what changes I would need to make to make to my xdmf file.  For
>> example, do I only need to change the innermost "DataItem" or do the
>> changes need to be made higher up?
>>
>> Some guidance on how to modify my xdmf file would be greatly appreciated.
>>
>> Thanks,
>> Peter.
>>



More information about the ParaView mailing list