Read matrix

Tim Kröger tim at cevis.uni-bremen.de
Mon Jul 23 03:08:34 CDT 2007


Dear all,

I am assembling a matrix using several calls to MatSetValues(). 
Then, I call MatAssemblyBegin() and MatAssemblyEnd() as usual.  After 
that, I would like to write the complete matrix into a file (for 
debugging purposes).  My idea was to call MatGetRow() for each matrix 
row and write the values out.  This seems to work in one-processor 
mode, but in parallel, I get

[14]PETSC ERROR: MatGetRow_MPIAIJ() line 1185 in src/mat/impls/aij/mpi/mpiaij.c
[14]PETSC ERROR: Object is in wrong state!
[14]PETSC ERROR: Already active!
[14]PETSC ERROR: MatGetRow() line 106 in src/mat/interface/matrix.c

What did I do wrong?

Best Regards,

Tim

-- 
Dr. Tim Kroeger                            Phone +49-421-218-7710
tim at mevis.de, tim at cevis.uni-bremen.de      Fax   +49-421-218-4236

MeVis Research GmbH, Universitaetsallee 29, D-28359 Bremen, Germany

Amtsgericht Bremen HRB 16222
Geschaeftsfuehrer: Prof. Dr. H.-O. Peitgen




More information about the petsc-users mailing list