[MPI3 Fortran] Effect of volatile

N.M. Maclaren nmm1 at cam.ac.uk
Thu Jan 8 10:03:24 CST 2009


On Dec 23 2008, Bill Long wrote:
>
>Interesting idea.  I'm a bit concerned about the last sentence above.  
>Buf is not (declared to be) volatile at the point of the x = buf(1) 
>statement.  Are you suggesting that the volatility specified in the 
>BLOCK "leaks" out to subsequent statements?  If so, how far does the 
>leakage extend?  To the end of the program unit?  If so, you may have 
>lost some of the performance you were hoping to keep.   Actually,  I 
>would expect that the volatility of buf is only inside the block, and 
>there is no leakage outside the block.  While this might work as a 
>practical matter, I don't think the language semantics requires that.  
>The construct also fails to meet the goal of avoiding user source code 
>changes, though I see that as a secondary issue.

I have requested an interpretation on this aspect.  The fundamental
problem is that allowing the VOLATILE attribute to be set differently
in different scopes is incompatible with using Fortran association!
This could be fixed in several ways, but all of them would need fairly
major changes to VOLATILE.

That's one of the reasons that I regard VOLATILE as pure poison.


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 mpiwg-fortran mailing list