DOES XLF'S MCLOCK RETURN SECONDS OR CLOCK TICKS?
ITEM: RTA000019779
Q: I am trying to compile and run several benchmark programs. The
benchmarks are written in FORTRAN. All of the programs call
"ETIME" to return the elapsed time. I don't believe ETIME is
available with XLF, so I replaced it with "MCLOCK". The programs
compile cleanly, but the results are not as expected. The programs
are expecting the elapsed time to be returned in seconds. (real
number) Does MCLOCK return seconds or clock ticks? If not seconds,
is there another XLF routine that will return seconds? (or an easy
way to convert)
---------- ---------- ---------- --------- ---------- ----------
A: The XL FORTRAN "MCLOCK" call returns the sum of the elapsed user
time of the current process and the elapsed user and system time of
all child processes. This time is measured in 1/100 of a second "CPU
clock ticks". Note that the information in InfoExplorer states that
this time is measured in 1/60 of a second increments; this is
incorrect. The file "/usr/lpp/xlf/DOC/README.xlf" contains this cor-
rection to Info.
To convert to seconds, you can divide the integer returned by
"MCLOCK" by 100 (this will give you the required "real", as well).
By the way, you are correct in stating that XLF does not provide
the "ETIME" function (although it is available in XL C). There are
no other XL FORTRAN calls that will return the elapsed time for a
process.
---------- ---------- ---------- --------- ---------- ----------
This item was created from library item Q549617 OJHD6
Additional search words:
AUG91 CLOCK CLOCKING COMPILERS IX MCLOCK OJHD6 RETURN RETURNING
RISCL RISCSYSTEM SECONDS SOFTWARE TICKS XLF
WWQA: ITEM: RTA000019779 ITEM: RTA000019779
Dated: 06/1996 Category: RISCL
This HTML file was generated 99/06/24~12:43:08
Comments or suggestions?
Contact us