In Fortran, SYSTEM_CLOCK()
internal subroutine is commonly used for timing.
However, on some platforms, it is difficult to measure a
time interval longer than one day, bucause the counter is reset once a day.
Here is a list of COUNT_RATE
and COUNT_MAX
from
CALL SYSTEM_CLOCK(COUNT, COUNT_RATE, COUNT_MAX)
on various platforms.
Platform | COUNT_RATE | COUNT_MAX |
---|---|---|
Linux 2.6.32 with gfortran 4.9.0 | 1000 | 2147483647 |
Mac OS X 10.9.4 with gfortran 4.8.2 | 1000 | 2147483647 |
SR16000: AIX 7.1 with XL Fortran 14.01 | 100 | 8639999 |
FX10: Linux 2.6 with frtpx 1.2.1 | 1000 | 86399999 |
cf. 2**31=2147483648, 1 day = 86400 second
On SR16000, it seems that the counter of system_clock starts at 00:00:00 of local time. What will happen when they do intercalation of a leap second?
This document is placed at https://gist.github.com/t-nissie/991dba9fd80b56f35e9f .
You can clone it with git clone https://gist.github.com/991dba9fd80b56f35e9f.git system_clock
or
git clone git@gist.github.com:991dba9fd80b56f35e9f.git system_clock
.