#include "petscsys.h" PetscErrorCode PetscFPTrapPush(PetscFPTrap trap)Not Collective
trap | - PETSC_FP_TRAP_ON or PETSC_FP_TRAP_OFF |
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