It's simply for visualization purposes. I wasn't sure if HDF5 would perform 
better than binary, and what specific functions are needed to load the PETSc 
vectors/matrices, so wanted to ask for some advice here. Since Matt mentioned 
it's not likely to be much faster than binary, I guess there is no need to make 
the change?

So running h5read will load the vector from the hdf5 file directly to a Matlab 
vector? And similarly so for matrices?

Thanks,
Yuyun

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: petsc-users <[email protected]> on behalf of zakaryah via 
petsc-users <[email protected]>
Sent: Tuesday, March 19, 2019 11:54:02 AM
To: [email protected]
Subject: Re: [petsc-users] Saving Vecs/Mats in HDF5 and visualizing in Matlab

Hi Yuyun,

I'm not sure exactly what you want to do but I use Matlab to work with and 
visualize HDF5 files from PETSc all the time.  Matlab has h5info and h5read 
routines, then I visualize with my own routines.  Is there something specific 
you need from Matlab?

On Tue, Mar 19, 2019 at 1:18 PM Yuyun Yang via petsc-users 
<[email protected]<mailto:[email protected]>> wrote:
Got it, thanks!

From: Matthew Knepley <[email protected]<mailto:[email protected]>>
Sent: Tuesday, March 19, 2019 10:10 AM
To: Yuyun Yang <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [petsc-users] Saving Vecs/Mats in HDF5 and visualizing in Matlab

On Tue, Mar 19, 2019 at 11:58 AM Yuyun Yang via petsc-users 
<[email protected]<mailto:[email protected]>> wrote:
Hello team,

Currently we’re using the PETSc binary file format to save Vecs and Mats and 
visualize them in Matlab. It looks like HDF5 works more efficiently with large 
data sets (faster I/O), and we’re wondering if PETSc Vecs/Mats saved in HDF5 
viewer can be visualized in Matlab as well?

We do not have code for that. I am using Paraview to look at HDF5 since 
everything I do is on 2D and 3D meshes. Note that HDF5 is not likely to have 
faster I/O than the PETSc binary.

  Thanks,

    Matt


Thanks for your help,
Yuyun


--
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/>

Reply via email to