<div dir="ltr">Hi,<div><br></div><div>I modify the example , and the code works with certain number of processor, but fails with certain number of processor.</div><div>The error message is</div><div><br></div><div>Local size xxxxxx not compatible with block size 3</div><div><br></div><div>I set the block size to 1 though</div><div><br></div><div><br></div><div>Thanks,</div><div>Yu-Sheng</div><div><br></div><div><br></div><div> </div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> 於 2018年12月4日 週二 下午6:44寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">We have example code that writes and loads from HDF5. If you can't modify that, send a simple<div>sample code that fails.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 4, 2018 at 5:53 PM Josh L via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>> 於 2018年12月4日 週二 下午4:43寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Dec 4, 2018, at 4:09 PM, Josh L <<a href="mailto:ysjosh.lo@gmail.com" target="_blank">ysjosh.lo@gmail.com</a>> wrote:<br>
> <br>
> I haven't figured out what causes it. I just use binaryopen instead of HDF5, and everything works fine.<br>
<br>
Did you originally save the data into the file with HDF5 format?<br></blockquote><div><br></div><div>Yes, by </div><div> Set Vec name, and block size</div><div> PetscViewerHDF5Open(write) </div><div> VecView(vec,viewer)</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> <br>
> <br>
> <br>
> Josh L <<a href="mailto:ysjosh.lo@gmail.com" target="_blank">ysjosh.lo@gmail.com</a>> 於 2018年12月4日 週二 下午2:55寫道:<br>
> The first error comes from<br>
> PetscStackCallHDF5Return(group,H5Gcreate2,(file_id, groupName, 0, H5P_DEFAULT, H5P_DEFAULT));<br>
> #000: H5G.c line 314 in H5Gcreate2(): unable to create group<br>
> major: Symbol table<br>
> minor: Unable to initialize object<br>
> <br>
> <br>
> Josh L <<a href="mailto:ysjosh.lo@gmail.com" target="_blank">ysjosh.lo@gmail.com</a>> 於 2018年12月4日 週二 下午2:38寫道:<br>
> I set the name of 2 vectors to be the same, but still get the same error.<br>
> <br>
> <br>
> <br>
> Josh L <<a href="mailto:ysjosh.lo@gmail.com" target="_blank">ysjosh.lo@gmail.com</a>> 於 2018年12月4日 週二 下午2:06寫道:<br>
> I just found out that I missed that note in VecLoad manual page, and I am trying it now.<br>
> Thanks.<br>
> <br>
> <br>
> <br>
> Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>> 於 2018年12月4日 週二 下午2:00寫道:<br>
> <br>
> Hmm, this is a guess. HDF5 files read in objects based on their names. Are you sure that the vector you saved and the vector you later try to read in have the same name? You can set the name of the loaded vector with PetscObjectSetName((PetscObject)nv,"name") after you create it to match the name you used to save the vector.<br>
> <br>
> Barry<br>
> <br>
> <br>
> > On Dec 4, 2018, at 1:42 PM, Josh L via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
> > <br>
> > Hi,<br>
> > <br>
> > I have a vec.h5 that generated serially by<br>
> > gv is a sequential vec<br>
> > VecSetblockSize(gv,3)<br>
> > PetscViewerHDF5Open(vec,h5,write)<br>
> > VecView(gv)<br>
> > <br>
> > and I want to read in with different number of processor by <br>
> > DMGetGlobalVector(dm,nv)<br>
> > PetscViewerHDF5Open(write)<br>
> > VecLoad(nv)<br>
> > <br>
> > nv has bs=3, and I have set bs for gv as 3.<br>
> > <br>
> > I get the following error. any hint to solve it ? thanks<br>
> > <br>
> > Error in HDF5 call H5Gcreate2() Status -1<br>
> > #000: H5G.c line 314 in H5Gcreate2(): unable to create group<br>
> > major: Symbol table<br>
> > minor: Unable to initialize object<br>
> > #001: H5Gint.c line 194 in H5G__create_named(): unable to create and link to group<br>
> > major: Symbol table<br>
> > minor: Unable to initialize object<br>
> > #002: H5L.c line 1638 in H5L_link_object(): unable to create new link to object<br>
> > major: Links<br>
> > minor: Unable to initialize object<br>
> > #003: H5L.c line 1882 in H5L_create_real(): can't insert link<br>
> > major: Symbol table<br>
> > minor: Unable to insert object<br>
> > #004: H5Gtraverse.c line 861 in H5G_traverse(): internal path traversal failed<br>
> > major: Symbol table<br>
> > minor: Object not found<br>
> > #005: H5Gtraverse.c line 641 in H5G_traverse_real(): traversal operator failed<br>
> > major: Symbol table<br>
> > minor: Callback failed<br>
> > #006: H5L.c line 1685 in H5L_link_cb(): unable to create object<br>
> > major: Object header<br>
> > minor: Unable to initialize object<br>
> > #007: H5O.c line 3016 in H5O_obj_create(): unable to open object<br>
> > major: Object header<br>
> > minor: Can't open object<br>
> > #008: H5Goh.c line 268 in H5O_group_create(): unable to create group<br>
> > major: Symbol table<br>
> > minor: Unable to initialize object<br>
> > #009: H5Gint.c line 245 in H5G__create(): unable to create group object header<br>
> > major: Symbol table<br>
> > minor: Unable to initialize object<br>
> > #010: H5Gobj.c line 163 in H5G__obj_create(): unable to create group<br>
> > major: Symbol table<br>
> > minor: Unable to create file<br>
> > #011: H5Gobj.c line 206 in H5G__obj_create_real(): no write intent on file<br>
> > major: Object cache<br>
> > minor: Bad value<br>
> > <br>
> > <br>
> > <br>
> <br>
<br>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_1971619882506026310gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div>
</blockquote></div>