<div dir="ltr">Oh, duh, I put the name on the viewer and not the vector.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 12, 2015 at 8:54 AM, Mark Adams <span dir="ltr"><<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I do this:<div><br></div><div><div> call VecCreateSeqWithArray(PETSC_COMM_SELF,ione,n64,phi,vec,ierr);CHKERRQ(ierr)</div><div> call PetscViewerASCIIOpen(PETSC_COMM_SELF, file_name, viewer,ierr);CHKERRQ(ierr)</div><div> call PetscViewerSetFormat(viewer,PETSC_VIEWER_ASCII_MATLAB,ierr);CHKERRQ(ierr)</div><div> call PetscObjectSetName(viewer,vec_name,ierr);CHKERRQ(ierr)</div><div> call VecView(vec,viewer,ierr);CHKERRQ(ierr)</div></div><div><br></div><div>But I still get this:</div><div><br></div><div><div>05:51 nid02816 new_em *= ~/epsi/XGC-1_examples/em_tearing$ head xgc_lhs.m</div><div>%Vec Object: 1 MPI processes</div><div>% type: seq</div><div>Vec_0xc4000009_0 = [</div><div>-0.0000000000000000e+00</div><div>5.6929682630215887e-16</div></div><div><br></div><div>Am I missing something? I want Vec_0xc4000009_0 to be 'vec_name'</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Mark</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 11, 2015 at 8:06 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> writes:<br>
<br>
> I am printing matlab vectors and I have a matlab script to read these<br>
> files, take differences, etc. PETSc name the vectors<br>
> (eg, Vec_0xc4000009_0) in a non-deterministic way as far as I can<br>
> tell.<br>
<br>
</span>PetscObjectSetName()<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>