Oh, duh, I put the name on the viewer and not the vector. On Fri, Jun 12, 2015 at 8:54 AM, Mark Adams <[email protected]> wrote:
> I do this: > > call > VecCreateSeqWithArray(PETSC_COMM_SELF,ione,n64,phi,vec,ierr);CHKERRQ(ierr) > call PetscViewerASCIIOpen(PETSC_COMM_SELF, file_name, > viewer,ierr);CHKERRQ(ierr) > call > PetscViewerSetFormat(viewer,PETSC_VIEWER_ASCII_MATLAB,ierr);CHKERRQ(ierr) > call PetscObjectSetName(viewer,vec_name,ierr);CHKERRQ(ierr) > call VecView(vec,viewer,ierr);CHKERRQ(ierr) > > But I still get this: > > 05:51 nid02816 new_em *= ~/epsi/XGC-1_examples/em_tearing$ head xgc_lhs.m > %Vec Object: 1 MPI processes > % type: seq > Vec_0xc4000009_0 = [ > -0.0000000000000000e+00 > 5.6929682630215887e-16 > > Am I missing something? I want Vec_0xc4000009_0 to be 'vec_name' > > Mark > > > On Thu, Jun 11, 2015 at 8:06 PM, Jed Brown <[email protected]> wrote: > >> Mark Adams <[email protected]> writes: >> >> > I am printing matlab vectors and I have a matlab script to read these >> > files, take differences, etc. PETSc name the vectors >> > (eg, Vec_0xc4000009_0) in a non-deterministic way as far as I can >> > tell. >> >> PetscObjectSetName() >> > >
