On 5/30/08, Gong Ding <gdiso at ustc.edu> wrote: > Hi, > I use MatAssembled to determine if a parallel matrix (MPIAIJ) is assembled. > One processor says 1 and another says 0. (Petsc-2.3.3-p2) > The correct answer should be the same for all the processor I think. > Is it a bug or I forget something?
Are you completelly sure that you collectively called at ALL processes MatAssemblyBegin(A, MAT_FINAL_ASSEMBLY) MatAssemblyEndA, MAT_FINAL_ASSEMBLY) Please, note the MAT_FINAL_ASSEMBLY. If you used MAT_FLUSH_ASSEMBLY at some process, then what you get is expected. > BTW. I think a function as MatAddRowToRow is useful. > I had implemented with MatGetRow and MatSetValues (or use Mat*Mat?). Not sure what you are trying to do, please elaborate a bit more. Why a call like this PetscInt row = ... PetscInt ncols = ... PetscInt *cols_indices = ... PetscScalar *cols_values = ... MatSetValues(A, 1, &row, ncols, cols_indices, cols_values, ADD_VALUES) is not enough for you? -- Lisandro Dalc?n --------------- Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC) Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC) Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET) PTLC - G?emes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594
