[petsc-users] Write binary to matrix

2016-09-22 Thread Florian Lindner
Hello, 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: [5]PETSC ERROR: No support for this operation for this object type! [5]PETSC ERROR: Cannot get subcomm viewer for binary files or sockets unless SubViewer

[petsc-users] Write binary to matrix

2016-09-22 Thread Dave May
On Thursday, 22 September 2016, Florian Lindner > wrote: > Hello, > > 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: > > [5]PETSC ERROR:

Re: [petsc-users] Write binary to matrix

2016-09-22 Thread Matthew Knepley
On Thu, Sep 22, 2016 at 5:42 AM, Florian Lindner wrote: > Hello, > > 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: > > [5]PETSC ERROR: No support for this operation for this object type! >

Re: [petsc-users] Write binary to matrix

2016-09-22 Thread Florian Lindner
Hey, this code reproduces the error when run with 2 or more ranks. #include #include int main(int argc, char *argv[]) { PetscInitialize(, , "", NULL); Mat matrix; MatCreate(PETSC_COMM_WORLD, ); MatSetType(matrix, MATSBAIJ); MatSetSizes(matrix, 10, 10, PETSC_DETERMINE,

Re: [petsc-users] Write binary to matrix

2016-09-22 Thread Hong
Florian: Would it work if replacing MATSBAIJ to MATAIJ or MATMPISBAIJ? Hong Hey, > > this code reproduces the error when run with 2 or more ranks. > > #include > #include > > int main(int argc, char *argv[]) > { > PetscInitialize(, , "", NULL); > > Mat matrix; >

Re: [petsc-users] Write binary to matrix

2016-09-22 Thread Florian Lindner
Am 22.09.2016 um 12:53 schrieb Dave May: > > > On Thursday, 22 September 2016, Florian Lindner > wrote: > > Hello, > > I want to write a MATSBAIJ to a file in binary, so that I can load it > later using