[J3] (SC22WG5.6129) [EXTERNAL] Re: [ukfortran] Two things from IFIP WG 2.5 meeting

Van Snyder van.snyder at jpl.nasa.gov
Mon Jul 29 16:59:07 EDT 2019


On Mon, 2019-07-29 at 07:59 +0000, Anton Shterenlikht wrote:
> 
> > On 26 Jul 2019, at 18:20, Van Snyder via J3 <j3 at mailman.j3-fortran.org> wrote:
> > 
> > Some time during the last twenty or thirty years, I proposed a STRICT
> > block, in which calculations would follow strict arithmetic rules.
> > I.e., "turn off goofy standard-violating optimizations here, but go
> > ahead and use them elsewhere."
> 
> This is currently achievable with all processors I know, via separate
> compilation units.
> Indeed, in large projects it's virtually inevitable
> that different parts of the executable
> will be compiled with different optimisation levels.
> This is not different from using different kinds in different procedures.
> I think no additions to the standard are need to address this use case.

Some progress toward strict arithmetic is possible by hiding crucial
parts of a computation in procedures, and then expending some (sometimes
significant) effort to convince the processor not to subvert your
careful work -- which can't always be done.  And, of course, it's
slower, unless the processor inlines the procedure, which then usually
results in subverting your careful work.

It also doesn't solve all problems, not least because the standard
ubiquitously says "processor-dependent approximation."

For example, the KIND argument of the REAL intrinsic with real A
argument is frequently ignored within an expression, no matter what
optimization level is selected.  That was the subject of interp
F03/0121.  No version of this interp has passed.

> Anton
> 



More information about the J3 mailing list