Error trapping for multiprocessor systems: A primer
last update: 04/29/2003

Error trapping for multiprocessor systems: A primer
Table of contents

Credits and copyright

Introduction to error trapping

Overview of this primer

Valid IEEE floating-point numbers

Ranges of valid numbers

Types of execution errors

Not a Number (NaN), a representation of a number outside the allowable IEEE range

    Quiet NaN (NAN)

    Signaling NaN (NANS)

Infinity error (INF) representing a number outside the allowable IEEE range

Single-precision and double-precision NaNs and INFs

Sample code for detecting NaNs and INFs

Two ways to handle floating-point exceptions (FPEs)

Using the fp_trap library routine at run time

Using the -qsigtrap and -qflttrap options in compile and load statements

Causes of FPEs

Underflow (UND)

Overflow (OV)

Divide by zero (ZERO)

Invalid operand (INV)

Inexact result (INEX)

Imprecise (IMP)

Enable (EN)

Tracing SIGTRAP events

The -qflttrap option for compile and load statements (SIGFPE)

The -qsigtrap option for compile and load statements (SIGTRAP)

The fp_trap library routine for trapping SIGFPE events at run time

Simple Fortran run script that produces an overflow

Fortran code that produces overflow FPEs

Output sent to stdout

Output displayed by TotalView


Next page | Table of contents - TotalView primer

If you have questions about this document, please contact SCD Customer Support. You can also reach us by telephone 24 hours a day, seven days a week at 303-497-1278. Additional contact methods: consult1@ucar.edu and during business hours in NCAR Mesa Lab Suite 39.

© Copyright 2003. University Corporation for Atmospheric Research (UCAR). All Rights Reserved.

Address of this page: http://www.scd.ucar.edu/docs/trap.error/index.html