[petsc-users] VecView() comparison: BINARY vs HDF5

Barry Smith bsmith at mcs.anl.gov
Tue Jan 31 16:39:41 CST 2012


On Jan 31, 2012, at 4:34 PM, Mohamad M. Nasr-Azadani wrote:

> Hi all, 
> 
> I was using VecView() to write the data to file (a vector of total size 50*20*10 (3D DMDA)). 
> I compared the times for two cases: PETSc's binary and also HDF5. 
> I get an enormous difference between the times I get for these two cases (this test is done using only one processor)
> 
> HDF5: 16.2 (sec)
> Binary: 0.33 (sec). 
> 
> I am using HDF5 VecView() as a magic black box writer to dump the field quantities. And I am not an expert on it but this order of magnitude seems a bit strange to me. 

   I am not surprised at all.  Just because HDF5 is a "defacto standard" and "supposedly" a good thing to use doesn't mean it will be faster than something else. 

   I would only use HDF5 when the resulting file needs to be HDF5 for some other software, like visualization. If you are just using the file with PETSc then use PETSc's binary.

    Barry


> 
> Any inputs are appreciated! 
> Best, 
> Mohamad
> 
> 
> 



More information about the petsc-users mailing list