PetscFPTrapPush#
push a floating point trapping mode, restored using PetscFPTrapPop()
Synopsis#
#include "petscsys.h"
PetscErrorCode PetscFPTrapPush(PetscFPTrap trap)
Not Collective
Input Parameter#
trap -
PETSC_FP_TRAP_ON
orPETSC_FP_TRAP_OFF
or any of the values passable toPetscSetFPTrap()
Notes#
This only changes the trapping if the new mode is different than the current mode.
This routine is called to turn off trapping for certain LAPACK routines that assume that dividing by zero is acceptable. In particular the routine ieeeck().
Most systems by default have all trapping turned off, but certain Fortran compilers have link flags that turn on trapping before the program begins.
gfortran -ffpe-trap=invalid,zero,overflow,underflow,denormal
ifort -fpe0
See Also#
PetscFPTrapPop()
, PetscSetFPTrap()
, PetscDetermineInitialFPTrap()
Level#
advanced
Location#
Examples#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages