When I tried to use mclock() in PGI fortran,
it complains “: error S0038 : Symbol, mclock, has not been explicitly declared”. Do we need to include any module for this to work?
I tried to use system_clock() as an alternative for the timer:
program prog implicit none integer :: pstart, pend, i,a, j integer :: nprocs, hz, clock0, clock1 real :: time integer :: t call system_clock (count_rate=hz) ! call system_clock(count=clock0) do i = 1,100000 write(*,*), ' ' end do call system_clock(count=clock1) t = (clock1 - clock0) time = real(t) / real(hz) write(*,*) 'time = ',time end
But it is giving output 0.0000 always, but this is running for few seconds for sure. Any error in the code above?
Thanks in advance.