[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::fortran

Title:Digital Fortran
Notice:Read notes 1.* for important information
Moderator:QUARK::LIONEL
Created:Thu Jun 01 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1333
Total number of notes:6734

1247.0. "CHECK=OVERFLOW OVMS difference" by SWETSC::EKLUND (On a clear day you can see forever) Tue Apr 01 1997 09:22

    Hi,
    
    There is a difference regarding the default values of CHECK on 
    AVMS and VVMS. Overflow is not the default on AVMS. So far so good. 
    I have a customer who is porting their application and insists of 
    knowing why this was changed. 
    
    I've searched through the conferences and found only #1950 in the 
    old DEC_FORTRAN_ALHPA conference that discusses this fact. But, it 
    does not say why this was changed. Why was it ?
    
    Johan
T.RTitleUserPersonal
Name
DateLines
1247.1VAX made it appear freeWIBBIN::NOYCEPulling weeds, pickin' stonesTue Apr 01 1997 12:2224
It was changed because we were greedy for performance.

On VAX, integer overflow checking for a routine is enabled
simply by setting a bit in the routine's "entry mask", and
the hardware does all the rest.  On Alpha, most integer overflow
checking is performed simply by using slightly different
instructions (ADDL/V instead of ADDL, for example), but
occasionally it requires more code.  For example, if you don't
care about overflow you can compute 4*I with a simple shift
instruction, but to check for overflow you need a slower
sequence, such as a MULL/V instruction.

Enabling integer overflow checking on Alpha may reduce performance
very slightly -- if your customer tries to, they may be able to
measure the difference.  But if they feel more comfortable with
integer overflow checking enabled, then by all means encourage them
to use it.

Floating-point overflow is a whole different story.  By default,
DEC FORTRAN reports an exception for floating overflow on both VAX
and Alpha.  If you compile with /IEEE=UNDERFLOW or /IEEE=DENORM
on Alpha, then floating overflow produces an infinity result, as
specified by the IEEE floating-point standard.  /CHECK=OVERFLOW
has no effect on floating overflow, on VAX or Alpha.
1247.2use OPTIONS statement to make source the sameGIDDAY::GILLINGSa crucible of informative mistakesTue Apr 01 1997 22:4311
  Johan,
    If the customer is concerned about this difference, they can use the 
  OPTIONS statement to ensure that the source code behaves the same on both
  platforms, without needing to change the CHECK qualifier on compilation.
  Just add the line:

	OPTIONS /CHECK=OVERFLOW

  to the top of the source module.

						John Gillings, Sydney CSC
1247.3ThanksSWETSC::EKLUNDOn a clear day you can see foreverWed Apr 02 1997 03:159
    Thank you both for your replies. 
    
    The real problem is that the customer is quite tense now. The are 
    porting this big horse-gambling application to Alpha. And now, 
    12 days before they are supposed to go live on Alpha they start to 
    find out several 'things' which makes them very nervous. One of these 
    'things' was the overflow difference. 
    
    -Johan