MatMPIAIJCheckCOONonzeroState#
Checks that the COO maps built by MatSetPreallocationCOO() can still be used by MatSetValuesCOO() on a MATMPIAIJ matrix
Synopsis#
#include "petscmat.h"
PetscErrorCode MatMPIAIJCheckCOONonzeroState(Mat mat)
Not Collective
Input Parameter#
mat - the
MATMPIAIJmatrix
Notes#
The maps address the nonzeros of the diagonal and off-diagonal blocks by position, so they are only valid while the blocks keep
the nonzero patterns built by MatSetPreallocationCOO(). Any change to them, for example a new nonzero inserted with
MatSetValues(), would make MatSetValuesCOO() write values into the wrong locations, so this routine generates an error
instead. It also generates an error when MatSetPreallocationCOO() has not been called.
The check is local to each MPI process, so only the processes whose blocks changed generate the error.
The MatSetValuesCOO() implementations of MATMPIAIJ and its device subtypes call this routine before using the maps.
See Also#
Matrices, Mat, MATMPIAIJ, MatSetPreallocationCOO(), MatSetValuesCOO(), MatSeqAIJCheckCOONonzeroState()
Level#
developer
Location#
src/mat/impls/aij/mpi/mpiaij.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages