(j3.2006) (SC22WG5.3667) [ukfortran] N1755: Request for new features from MPI Forum

N.M. Maclaren nmm1
Wed Nov 12 04:13:49 EST 2008


On Nov 12 2008, Aleksandar Donev wrote:
>
>> Pretty much
>> completely incompatible with the implications of volatile.
>
> What implications are those exactly. Please be specific. The VOLATILE 
> attribute applies if the object is referenced by means outside of the 
> program. It does not have to be changed (defined). Why is that 
> incompatible with INTENT(IN).

Aargh!  No!  C 'const'!  It has NOT been a success - in fact, to describe
it as a paving slab on the road to hell would be fair. [ Yes, I am referring
to the saying that the road to hell is paved with good intentions. ]

In Fortran, as in traditional languages, the purpose of constraints is so
that the processor AND programmer can rely on certain guarantees.  Such as,
when debugging, I know that an INTENT(IN) variable cannot change unless I
also have a much more serious error that trashes memory.

One of the reasons that the volatile concept in all of its incarnations is
such a problem that it means that such constraints still bind the programmer
but do not provide the guarantees any longer.

>And more importantly, why is ASYNCHRONOUS different.

Because ASYNCHRONOUS never allows the value to change from one defined
value to another defined value without the programmer explicitly doing it.

> Similar stuff for the VALUE attribute. The VALUE attribute and VOLATILE 
> together make perfect sense, if the volatility is restricted only to 
> inside the routine. The volatility applies to the anonymous copy of the 
> actual, once the routine finishes, the changes are thrown out. What is 
> wrong with that?

Nothing. If that were what Fortran specified. But it isn't. I can't see 
much point in replacing one simple constraint by a much more complicated 
one, in order to provide a feature that few people will ever want to use! 
But I was not involved in the decision, so that is a personal view.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1 at cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679




More information about the J3 mailing list