Hi,
I am using a fortran 90 code that makes a call to system_clock,
something that looks like this:
program test
implicit none
integer :: clock0, hz, cmax
call system_clock(count=clock0,count_rate=hz,count_max=cmax)
print*, clock0,hz,cmax
end program test
When I compile it with intel complier, it works fine, however if I use the porland complier
(pgf90 on linux) I get 0 returned as the first argument (clock0).
Does anybody know why this happens?
Any solution?
The first time you call “system_clock”, the count will always be zero since you are initializing the “clock”. Each subsequent call to “system_clock” will yield the number of “tics”, where there are 1000 tics per second, that have passed since the initial call. Note that PGI and Intel are both correct, but just have slightly different intrepetations of what the inital value should be.