- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Ihaven't been able to find a way toget really small numbers to become output zeros. Rather, they just mess up my output with the overflow/underflow asterisks.
It's a 100% IVF 10.1.013 (QuickWin) program, no optimizations (so that I can use walkbacks to find where my users screw up their data sets), and /fpe:0 which is supposed to kill me on everything but underflows. I've tried "Flush Denormal Results to Zero", but it has made no difference.
Computing is done with default Real(8) to help smooth out a lot of small-number decision-making, but very small numbers are meaningless in my final results. To keep from taking a lot of screen space, I've restricted output formats to single-digit exponents-- for example,E10.4E1. The WRITE statement says WRITE (6,9914) real (VDMAX(IS)*ft32vol,4), where both vdmax and ft32vol are default Real(8). Whenever the result absolute value comes to less than 1E-9, the output field is filled withasterisks, when I would really like to have it just tell me 0.0000E+0.
CommandLine: /nologo /Zi /Od /include:"Debug/" /fpscomp:filesfromcmd
/fpscomp:ioformat /fpscomp:logicals /fpscomp:general /error_limit:10
/warn:errors /warn:unused /warn:interfaces /real_size:64 /Qsave
/align:rec8byte /align:dcommons /assume:dummy_aliases /Qzero
/fpe:0 /iface:cvf /module:"Debug/" /object:"Debug/" /traceback
/check:bounds /check:format /libs:qwin /c
Surely there must be some switch or Format designator that would keep me from having to put
IF(variable.LT.1.d-9)variable = 0.d0
in front of every potential output underflow.
Any help would be very much appreciated.
Thanks and God bless!
Jack- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
What I suggest is writing a small function that does the "flush".
Something like this:
real(8) function zflush (val)
real(8), intent(in) :: val
zflush = val
if (abs(val) < 1.0D-9) zflush = 0.0D0
return
end function zflush
Then use zflush(val) instead of val in your output list.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Steve,
Thanks ever so much for your as-usual excellent and quick response.
Happy New Year and Happy Whatever Else You Want to Celebrate!
God bless!
jack

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable