New error checking to prevent this confusion in the future: https://gitlab.com/petsc/petsc/-/merge_requests/6804
> On Aug 10, 2023, at 6:54 AM, Matthew Knepley <knep...@gmail.com> wrote: > > On Thu, Aug 10, 2023 at 2:30 AM maitri ksh <maitri....@gmail.com > <mailto:maitri....@gmail.com>> wrote: >> I am unable to understand what possibly went wrong with my code, I could >> load a matrix (large sparse matrix) into petsc, write it out and read it >> back into Matlab but when I tried to use MatView to see the matrix-info, it >> produces error of some 'corrupt argument, #valgrind'. Can anyone please help? > > You use > > viewer = PETSC_VIEWER_STDOUT_WORLD > > but then you Destroy() that viewer. You should not since you did not create > it. > > THanks, > > Matt > >> Maitri > > > -- > What most experimenters take for granted before they begin their experiments > is infinitely more interesting than any results to which their experiments > lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>