<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta content="text/html; charset=utf-8">
</head>
<body>
<div id="compose-container" itemscope="" itemtype="https://schema.org/EmailMessage" style="direction:ltr">
<span itemprop="creator" itemscope="" itemtype="https://schema.org/Organization"><span itemprop="name"></span></span>
<div>
<div style="direction:ltr">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?</div>
<div><br>
</div>
<div style="direction:ltr">So running h5read will load the vector from the hdf5 file directly to a Matlab vector? And similarly so for matrices?</div>
<div><br>
</div>
<div style="direction:ltr">Thanks,</div>
<div style="direction:ltr">Yuyun</div>
<div><br>
</div>
<div class="acompli_signature">Get <a href="https://aka.ms/o0ukef">Outlook for iOS</a></div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> petsc-users <petsc-users-bounces@mcs.anl.gov> on behalf of zakaryah via petsc-users <petsc-users@mcs.anl.gov><br>
<b>Sent:</b> Tuesday, March 19, 2019 11:54:02 AM<br>
<b>To:</b> petsc-users@mcs.anl.gov<br>
<b>Subject:</b> Re: [petsc-users] Saving Vecs/Mats in HDF5 and visualizing in Matlab</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-size:small">Hi Yuyun,</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">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?</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Mar 19, 2019 at 1:18 PM Yuyun Yang via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-style:solid; border-left-color:rgb(204,204,204); padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-1611002607329925695WordSection1">
<p class="MsoNormal">Got it, thanks!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>
<br>
<b>Sent:</b> Tuesday, March 19, 2019 10:10 AM<br>
<b>To:</b> Yuyun Yang <<a href="mailto:yyang85@stanford.edu" target="_blank">yyang85@stanford.edu</a>><br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [petsc-users] Saving Vecs/Mats in HDF5 and visualizing in Matlab<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Tue, Mar 19, 2019 at 11:58 AM Yuyun Yang via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<u></u><u></u></p>
</div>
<div>
<blockquote style="border-style:none none none solid; border-left-width:1pt; border-left-color:rgb(204,204,204); padding:0in 0in 0in 6pt; margin-left:4.8pt; margin-right:0in">
<div>
<div>
<p class="MsoNormal">Hello team,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">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?<u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">  Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">    Matt<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid; border-left-width:1pt; border-left-color:rgb(204,204,204); padding:0in 0in 0in 6pt; margin-left:4.8pt; margin-right:0in">
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks for your help,<u></u><u></u></p>
<p class="MsoNormal">Yuyun<u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>