<div dir="ltr">Sorry I took too long. It has been hectic this semester. The logic is somewhat complicated with<div>regard to global and local here, but it is to ensure that boundary values are put in on output. I</div><div>am not sure how to make it more transparent, but I am willing to take suggestions.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 14, 2016 at 9:16 PM, Adrian Croucher <span dir="ltr"><<a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK, I think I've figured out what the problem was here. The 'cell_geometry' vector I wrote to the HDF5 file was actually a local vector (not global). If I first do DMLocalToGlobal on it and then VecView the global vector, it turns up under the 'fields' group, and I can access it for reading back in.<br>
<br>
Cheers, Adrian<span class="im HOEnZb"><br>
<br>
On 12/02/16 18:07, Adrian Croucher wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hi<br>
<br>
I'm having trouble reading in a vector on a DMPlex from an HDF5 file. The attached minimal program (readdmvec2.F90) illustrates the problem.<br>
<br>
What it does is:<br>
- reads in a DMPlex from file (ghotcol.exo) and sets it up (distributes, constructs ghost cells and default section)<br>
- uses DMGetGlobalVector() to get the vector<br>
- sets its object name to 'cell_geometry'<br>
- opens the HDF5 file (hotcol_ss.h5) in a viewer and tries to read the vector using VecLoad()<br>
<br>
The VecLoad() dies, saying "object 'cell_geometry' doesn't exist" in the HDF5 file. (Full error message is below.)<br>
<br>
But it does exist- it shows up as a dataset in the '/' group in h5dump. I can also read it in from a Python script and h5py, e.g.:<br>
<br>
>>> import h5py<br>
>>> f = h5py.File('hotcol_ss.h5')<br>
>>> f['cell_geometry'][:]<br>
<br>
Any idea why VecLoad() can't find it? I get the same error running on any number of processors.<br>
<br>
The program that writes 'cell_geometry' to the HDF5 file also subsequently writes time-dependent simulation results to the same file (that's what the other datasets are in there) using DMSetOutputSequenceNumber() and VecView(). I am wondering if the problem is related to this, because if I just write a simple vector out to the file by itself it seems to read back in ok.<br>
<br>
Cheers, Adrian<br>
<br>
<br>
</blockquote>
<br>
-- <br></span><div class="HOEnZb"><div class="h5">
Dr Adrian Croucher<br>
Senior Research Fellow<br>
Department of Engineering Science<br>
University of Auckland, New Zealand<br>
email: <a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a><br>
tel: +64 (0)9 923 84611<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div>