[J3] SYSTEM_CLOCK

Malcolm Cohen malcolm at nag-j.co.jp
Sun Jan 31 23:56:52 UTC 2021


Hi John,

 

This is *absolutely* not suitable for an interp.

 

The standard is clear (one clock). The standard is unambiguous (one clock). The standard is not contradictory. That some return values might overflow for some clock specifications is not in itself a defect, and it is long-standing (Fortran 2003) so not suitable for an “oops we got the words wrong” excuse.

 

This is a *NEW FEATURE*.

 

That some vendors have chosen to implement two or more clocks as an extension perhaps indicates that some improvement should be done. I am all in favour of improvements.

 

One might wonder whether the “two clock” extensions are currently standard-conforming. When I did the NAG one I thought it was an interesting question – the values are all processor-dependent so there is a lot of leeway for processor vagaries. I concluded that it probably was conforming, but specifying this rigorously may well be worth doing sometime soon. (I also felt that I wanted Fortran access to the High Precision Clock so was willing to live with complaints that we were perhaps not conforming in this regard.)

 

Oh, and as it’s a new feature, we are perfectly at liberty to introduce backward incompatibilities like “all integer kinds must be the same” if we think that is a good idea. Or to introduce a new argument that specifies whether the user wants a high precision clock or a high period clock. (We got complaints from users when the clock we provided wrapped around every twenty minutes or so.)

 

It’s perhaps not too difficult to get done in time for Fortran 202x, though IMO it would be a bit tight and it’s not even on the roadmap. Fortran 202y would be easier, but is of course further away.

 

Please consider writing this up as an “urgent” Fortran 202x submission, and see how that flies.

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210201/5cd0d872/attachment.htm>


More information about the J3 mailing list