On Thu, Sep 22, 2016 at 5:42 AM, Florian Lindner <mailingli...@xgm.de>
> I want to write a MATSBAIJ to a file in binary, so that I can load it
> later using MatLoad.
> However, I keep getting the error:
> PETSC ERROR: No support for this operation for this object type!
> PETSC ERROR: Cannot get subcomm viewer for binary files or sockets
> unless SubViewer contains the rank 0 process
> PETSC ERROR: PetscViewerGetSubViewer_Binary() line 46 in
Do not truncate the stack.
Run under valgrind.
> The rank 0 is included, as you can see below, I use PETSC_COMM_WORLD and
> the matrix is also created like that.
> The code looks like:
> PetscErrorCode ierr = 0;
> PetscViewer viewer;
> PetscViewerBinaryOpen(PETSC_COMM_WORLD, filename.c_str(),
> FILE_MODE_WRITE, &viewer); CHKERRV(ierr);
> MatView(matrix, viewer); CHKERRV(ierr);
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
-- Norbert Wiener