Odd behavior of pgf95 cpu_time

The Fortran 95 intrinsic subroutine cpu_time seems to always return a number based on the wall time rather than cpu time. Is this intended? If so, it is different than all the other f95 compilers that we use. Are there environment variables that can alter this behavior, as in xlf on AIX?

This occurrs with pgf95 6.2-2 on x86-64, but was worse on pre-6 versions where the cpu time could occasionally be longer than wall time.

Thanks,
Nate

Hi Nate,

The Fortran 95 standard is intentionally vague about what CPU_TIME should return, hence, all the compilers are correct. Though as you suggest, the ideal solution would be that the behavior be configurable. I’ve added a feature request (TPR#3951) to see if we can add an environment variable or other method to select which time to use, wall clock, user time, system time, or a combination.

Thanks!
Mat