PetscSetFPTrap
Enables traps/exceptions on common floating point errors. This option may not work on certain machines.
Synopsis
int PetscSetFPTrap(int flag)
Not Collective
Input Parameters
flag -PETSC_FP_TRAP_ON, PETSC_FP_TRAP_OFF.
Options Database Keys
-fp_trap -Activates floating point trapping
Description
On systems that support it, this routine causes floating point
overflow, divide-by-zero, and invalid-operand (e.g., a NaN) to
cause a message to be printed and the program to exit.
Caution
On certain machines, in particular the IBM rs6000, floating point
trapping is VERY slow!
Keywords
floating point trap, overflow, divide-by-zero, invalid-operand
Level:advanced
Location:src/sys/src/error/fp.c
System Index
Table of Contents