PetscCallExternalAbort#

Calls an external library routine that returns an error code after pushing the name of the routine on the stack. If the external library function return code indicates an error, this prints the error and aborts

Input Parameters#

  • func - name of the routine

  • args - arguments to the routine

Notes#

This is intended for external package routines that return error codes. Use PetscStackCallExternalVoid() for those that do not.

In debug mode this also checks the memory for corruption at the end of the function call.

Assumes the error return code of the function is an integer and that a value of 0 indicates success

Developer Note#

This is so that when an external package routine results in a crash or corrupts memory, they get blamed instead of PETSc.

See Also#

PetscCall(), PetscStackPushNoCheck(), PetscStackPush(), PetscStackCallExternalVoid(), PetscCallExternal()

Level#

developer

Location#

include/petscerror.h


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