I know, it is getting very confusing. But this sounds very simple but got this complicated so far. <div>I think you have seen my emails yesterday. </div><div>I want to write a vector (3D DMDA, structured) at each time to an hdf5 file. </div>
<div>But, I want to also add the coodinates to the same *.h5 file as well. </div><div>The grid is structured, so I only need 3 1-D arrays representing the coordinates (and not 1D*1D*1D coordinates cell coordinates). </div>
<div>How would you go about it? </div><div><br></div><div>I thought about creating a "parallel" vector which has the size of 0 on all processors and N on processor zero and then dump the coordinates into that vector and into the same hdf5 file. No luck, since hdf5 writer does not like zero-sized local vectors (if I could have done this, then I could use the same hdf5 viewer and not close the file). But now, I am stuck. </div>
<div>I think about closing the hdf5 viewer after I dumped the field data, create a vector using PETSC_COMM_SELF including the coordinates on all processor and then add that vector to the end of same hdf5 file (that's why I need to open it and use append mode). Of course, I would do the writing only on processor zero. </div>
<div><br></div><div>I hope I did not confuse you. </div><div>Thanks, </div><div>Mohamad</div><div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Fri, Jan 20, 2012 at 1:37 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><div class="gmail_quote">On Fri, Jan 20, 2012 at 15:33, Mohamad M. Nasr-Azadani <span dir="ltr"><<a href="mailto:mmnasr@gmail.com" target="_blank">mmnasr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>At this point, I can't since the first time the viewer is created via PETSC_COMM_WORLD and the second time, PETSC_COMM_SELF. <div>(I am not even 100% sure if that could cause any troubles with the hdf5 file?)</div>
</div></blockquote></div><br></div><div>Well this sounds pretty confusing. What are you actually trying to do?</div>
</blockquote></div><br></div>