VecLockGetLocation#

Return the source code location where a Vec was most recently read-locked

Synopsis#

#include "petscvec.h"   
PetscErrorCode VecLockGetLocation(Vec x, const char *file[], const char *func[], int *line)

Not Collective

Input Parameter#

  • x - the vector

Output Parameters#

  • file - the source file name of the most recent VecLockReadPush(), or NULL if none is active

  • func - the function name of the most recent VecLockReadPush(), or NULL if none is active

  • line - the source line number of the most recent VecLockReadPush(), or 0 if none is active

Notes#

Only produces meaningful output when PETSc is built with PETSC_USE_DEBUG; otherwise NULL and 0 are returned. Intended to help debug read-lock violations reported by VecGetArray() and similar routines.

If the location was not recorded, the returned strings explain whether the stack exceeded PETSCSTACKSIZE or function markers may be missing or mismatched, and line is 0.

See Also#

Vec, VecLockGet(), VecLockReadPush(), VecLockReadPop(), VecGetArray()

Level#

developer

Location#

src/vec/vec/interface/rvector.c

Examples#

src/vec/vec/tests/ex68.c


Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages