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

Note#

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

See Also#

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

Level#

developer

Location#

src/vec/vec/interface/rvector.c


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