floating point exception

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Apr 3 18:44:00 GMT 2015


On Fri, Apr 03, 2015 at 03:03:22PM +0000, Frankenstein, Susan ERDC-RDE-CRREL-NH wrote:

(snip)
 
> If I use the following compiler options:
> 
> FFLAGS1 = -std=f2003 -ffree-form -fdefault-real-8 -fdefault-double-8
> -Ofast -fall-intrinsics -fcheck=all -m64 -fno-trapping-math -c
> -ffpe-trap=invalid,zero,overflow,underflow,precision,denormal ?Wall
> 
> The program stops executing after the first write statement. If I use
> instead:
> 
> FFLAGS1 = -std=f2003 -ffree-form -fdefault-real-8 -fdefault-double-8
> -Ofast -fall-intrinsics -fcheck=all -m64 -fno-trapping-math -c
> 

(snip)

> I?m at a loss as to what to do. Suggestions?

Is this a rhetorical question?  Use the 2nd set of options, of course!

I do recommend that one should not use the -fdefault-real-8
and -fdefault-double-8 options, ever.  These options may not
(and probably do not) do what you think they do.  If you
absolutely think that you need these options, then use
-freal-4-real-8 (might be misspelled as I'm too lazy to look
at the gfortran document for you).  Of course, the best
option is to write Fortran code that does not require any
of these options.

-- 
steve
Steve



More information about the Fortran mailing list